mirror of
https://github.com/antoinevignau/source.git
synced 2024-06-15 00:29:33 +00:00
working on links
This commit is contained in:
parent
9a0387dc01
commit
8279eb456b
Binary file not shown.
File diff suppressed because it is too large
Load Diff
19
toutadisparu/sources/conditions scene 5
Normal file
19
toutadisparu/sources/conditions scene 5
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
23 04
|
||||||
|
|
||||||
|
#plage=LA PLAGE !Fred retourne sur ses pas, vers la plage
|
||||||
|
2B 01 03
|
||||||
|
|
||||||
|
#case-nourriture 3?=NOURRITURE 3? !Fred va … la case de son vieil ami
|
||||||
|
2D 1A 1A
|
||||||
|
|
||||||
|
#case-nourriture 2?=NOURRITURE 2? !Fred va … la case de son vieil ami
|
||||||
|
2D 16 16
|
||||||
|
|
||||||
|
#case-nourriture 1?=CASE !Fred va … la case de son vieil ami
|
||||||
|
2D 12 10
|
||||||
|
|
||||||
|
#case+nourriture 3?=CASE FERMEE !Fred va … la case de son vieil ami
|
||||||
|
2B 1A 11
|
||||||
|
|
||||||
|
#palmier-palmier=PALMIER !Fred grimpe sur l'arbre
|
||||||
|
2D 30 30
|
|
@ -15,6 +15,12 @@ NB_INDICATEURS = 10
|
||||||
NB_MOTS = 25 ; on ne peut pas avoir plus de 25 mots par ecran
|
NB_MOTS = 25 ; on ne peut pas avoir plus de 25 mots par ecran
|
||||||
NB_TEXTES = 160 ; nombre de textes du jeu
|
NB_TEXTES = 160 ; nombre de textes du jeu
|
||||||
|
|
||||||
|
linksON = TRUE
|
||||||
|
linksOFF = FALSE
|
||||||
|
|
||||||
|
colorBLACK = 0
|
||||||
|
colorWHITE = 15
|
||||||
|
|
||||||
*-----------------------
|
*-----------------------
|
||||||
* load_font
|
* load_font
|
||||||
*-----------------------
|
*-----------------------
|
||||||
|
@ -927,14 +933,14 @@ initialisation_cache
|
||||||
rts
|
rts
|
||||||
|
|
||||||
*-----------------------
|
*-----------------------
|
||||||
* AFFICHE_TEXTE
|
* PREPARE_TEXTE
|
||||||
*-----------------------
|
*-----------------------
|
||||||
* affiche_texte
|
* prepare_texte
|
||||||
|
|
||||||
texteSPACE = $5f
|
texteSPACE = $5f
|
||||||
texteRC = $9c
|
texteRC = $9c
|
||||||
|
|
||||||
affiche_texte
|
prepare_texte
|
||||||
stz i ; on commence ˆ 0
|
stz i ; on commence ˆ 0
|
||||||
|
|
||||||
lda #texte_final
|
lda #texte_final
|
||||||
|
@ -1096,14 +1102,32 @@ at_8 rep #$20
|
||||||
bcs at_9
|
bcs at_9
|
||||||
brl at_2 ; we loop
|
brl at_2 ; we loop
|
||||||
|
|
||||||
at_9
|
at_9 rep #$20
|
||||||
mx %00
|
rts
|
||||||
|
|
||||||
|
*--- output dans texte final
|
||||||
|
|
||||||
|
mx %10
|
||||||
|
|
||||||
|
set_textefinal
|
||||||
|
sta (dpTO)
|
||||||
|
inc dpTO
|
||||||
|
bne set_tf1
|
||||||
|
inc dpTO+1
|
||||||
|
set_tf1 rts
|
||||||
|
|
||||||
|
mx %00 ; on revient en 16-bits
|
||||||
|
|
||||||
|
*-----------------------
|
||||||
|
* AFFICHE_TEXTE
|
||||||
|
*-----------------------
|
||||||
|
* affiche_texte
|
||||||
|
|
||||||
* on imprime le texte (enfin)
|
* on imprime le texte (enfin)
|
||||||
|
|
||||||
modeForeCopy = $0004 ; QDII Table 16-10
|
modeForeCopy = $0004 ; QDII Table 16-10
|
||||||
|
|
||||||
rep #$20
|
affiche_texte
|
||||||
jsr switch_640 ; switch to 640
|
jsr switch_640 ; switch to 640
|
||||||
bra skipME
|
bra skipME
|
||||||
|
|
||||||
|
@ -1164,29 +1188,16 @@ skipME
|
||||||
PushWord #modeForeCopy
|
PushWord #modeForeCopy
|
||||||
_SetTextMode
|
_SetTextMode
|
||||||
|
|
||||||
|
PushLong #texte_liens
|
||||||
PushLong #texte_final
|
PushLong #texte_final
|
||||||
PushWord #1
|
PushWord #1
|
||||||
PushWord #1
|
PushWord #1
|
||||||
PushWord #0 ; c'est normalement le modeForeCopy
|
PushWord #linksON ; on affiche
|
||||||
jsr print
|
jsr print
|
||||||
|
|
||||||
_SetTextMode ; restore original mode
|
_SetTextMode ; restore original mode
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
*--- output dans texte final
|
|
||||||
|
|
||||||
mx %10
|
|
||||||
|
|
||||||
set_textefinal
|
|
||||||
sta (dpTO)
|
|
||||||
inc dpTO
|
|
||||||
bne set_tf1
|
|
||||||
inc dpTO+1
|
|
||||||
set_tf1 rts
|
|
||||||
|
|
||||||
mx %00 ; on revient en 16-bits
|
|
||||||
|
|
||||||
*-----------------------
|
*-----------------------
|
||||||
* DEBUT_AVENTURE - OK
|
* DEBUT_AVENTURE - OK
|
||||||
*-----------------------
|
*-----------------------
|
||||||
|
@ -1282,6 +1293,7 @@ surligner_mot
|
||||||
* 5,s w Y
|
* 5,s w Y
|
||||||
* 7,s w X
|
* 7,s w X
|
||||||
* 9,s l text pointer
|
* 9,s l text pointer
|
||||||
|
* 13,s l link pointer
|
||||||
|
|
||||||
max_colonnes = 75 ; 80 - 75
|
max_colonnes = 75 ; 80 - 75
|
||||||
max_lignes = 20 ; 20 - 18
|
max_lignes = 20 ; 20 - 18
|
||||||
|
@ -1291,7 +1303,11 @@ marge_gauche = 3 ; nombre de caract
|
||||||
|
|
||||||
*---
|
*---
|
||||||
|
|
||||||
print lda 11,s
|
print lda 15,s
|
||||||
|
sta dpTO+2
|
||||||
|
lda 13,s
|
||||||
|
sta dpTO
|
||||||
|
lda 11,s
|
||||||
sta dpFROM+2
|
sta dpFROM+2
|
||||||
lda 9,s
|
lda 9,s
|
||||||
sta dpFROM
|
sta dpFROM
|
||||||
|
@ -1312,6 +1328,8 @@ printEXIT lda 1,s
|
||||||
plx
|
plx
|
||||||
plx
|
plx
|
||||||
plx
|
plx
|
||||||
|
plx
|
||||||
|
plx
|
||||||
sta 1,s
|
sta 1,s
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -1341,7 +1359,19 @@ print1 cmp #instrSPACE ; skip space char
|
||||||
lda y_coord,y
|
lda y_coord,y
|
||||||
pha
|
pha
|
||||||
_MoveTo
|
_MoveTo
|
||||||
_DrawChar
|
|
||||||
|
* Check font color
|
||||||
|
|
||||||
|
lda printMODE
|
||||||
|
cmp #FALSE
|
||||||
|
beq print11
|
||||||
|
|
||||||
|
lda [dpTO]
|
||||||
|
and #$ff
|
||||||
|
pha
|
||||||
|
_SetForeColor
|
||||||
|
|
||||||
|
print11 _DrawChar
|
||||||
|
|
||||||
* 4- next character
|
* 4- next character
|
||||||
|
|
||||||
|
@ -1366,7 +1396,15 @@ print4 inc dpFROM
|
||||||
bne print5
|
bne print5
|
||||||
inc dpFROM+2
|
inc dpFROM+2
|
||||||
|
|
||||||
print5 brl printLOOP
|
print5 lda printMODE ; do we use links?
|
||||||
|
cmp #FALSE
|
||||||
|
beq print6
|
||||||
|
|
||||||
|
inc dpTO ; yes, we do
|
||||||
|
bne print6
|
||||||
|
inc dpTO+2
|
||||||
|
|
||||||
|
print6 brl printLOOP
|
||||||
|
|
||||||
*---
|
*---
|
||||||
|
|
||||||
|
@ -1451,11 +1489,12 @@ tblUPPER hex 000102030405060708090A0B0C0D0E0F
|
||||||
* A= ptr to string
|
* A= ptr to string
|
||||||
* Y= line index
|
* Y= line index
|
||||||
|
|
||||||
cprint pea ^cprint ; ptr to text
|
cprint PushLong #0 ; no link pointer
|
||||||
|
pea ^cprint ; ptr to text
|
||||||
pha
|
pha
|
||||||
pha ; X
|
pha ; X
|
||||||
phy ; Y
|
phy ; Y
|
||||||
pea $0000 ; mode
|
PushWord #linksOFF ; mode
|
||||||
|
|
||||||
pea $0000 ; count nb of chars in the string
|
pea $0000 ; count nb of chars in the string
|
||||||
sta dpFROM
|
sta dpFROM
|
||||||
|
@ -1819,7 +1858,7 @@ help_str16 asc 'OA-Q : quitter le jeu'00
|
||||||
mots_clicables
|
mots_clicables
|
||||||
sep #$20 ; texte2$=UPPER$(texte$)
|
sep #$20 ; texte2$=UPPER$(texte$)
|
||||||
ldx #0
|
ldx #0
|
||||||
]lp lda #FALSE ; on efface texte_liens
|
]lp lda #colorBLACK ; on efface texte_liens
|
||||||
sta texte_liens,x
|
sta texte_liens,x
|
||||||
|
|
||||||
lda texte_final,x ; on majusculinise le texte
|
lda texte_final,x ; on majusculinise le texte
|
||||||
|
@ -1878,13 +1917,14 @@ mc_1 rep #$20
|
||||||
iny
|
iny
|
||||||
bne ]lp
|
bne ]lp
|
||||||
|
|
||||||
mc_2 sty len_max
|
mc_2 dey
|
||||||
|
sty len_max
|
||||||
|
|
||||||
*--- REPEAT
|
*--- REPEAT
|
||||||
*--- pointeur_mot%=INSTR(texte2$,mot2$,pointeur_mot%)
|
*--- pointeur_mot%=INSTR(texte2$,mot2$,pointeur_mot%)
|
||||||
*--- IF INSTR(alphabet$,UPPER$(MID$(texte$,pointeur_mot%-1,1)),1)=0 AND INSTR(alphabet$,UPPER$(MID$(texte$,pointeur_mot%+LEN(mot$),1)))=0
|
*--- IF INSTR(alphabet$,UPPER$(MID$(texte$,pointeur_mot%-1,1)),1)=0 AND INSTR(alphabet$,UPPER$(MID$(texte$,pointeur_mot%+LEN(mot$),1)))=0
|
||||||
|
|
||||||
ldx i ; on commence avec -1
|
ldx i ; on commence avec 0
|
||||||
mc_3 ldy #0
|
mc_3 ldy #0
|
||||||
]lp lda mot,y ; compare le mot
|
]lp lda mot,y ; compare le mot
|
||||||
cmp texte,x
|
cmp texte,x
|
||||||
|
@ -1895,10 +1935,6 @@ mc_3 ldy #0
|
||||||
cpy len_max
|
cpy len_max
|
||||||
bne ]lp
|
bne ]lp
|
||||||
|
|
||||||
ldal $c034
|
|
||||||
inc
|
|
||||||
stal $c034
|
|
||||||
|
|
||||||
jsr test_condition ; on a trouvŽ le mot
|
jsr test_condition ; on a trouvŽ le mot
|
||||||
bra mc_6
|
bra mc_6
|
||||||
|
|
||||||
|
@ -1941,7 +1977,7 @@ test_condition
|
||||||
* tax
|
* tax
|
||||||
* lda condition,x
|
* lda condition,x
|
||||||
|
|
||||||
lda #TRUE
|
lda #colorWHITE
|
||||||
]lp dex
|
]lp dex
|
||||||
dey
|
dey
|
||||||
bmi tc_99
|
bmi tc_99
|
||||||
|
|
|
@ -292,9 +292,11 @@ mainLOOP lda scene_actuelle
|
||||||
jsr image
|
jsr image
|
||||||
lda scene_actuelle
|
lda scene_actuelle
|
||||||
jsr get_textes ; prend le texte de l'écran
|
jsr get_textes ; prend le texte de l'écran
|
||||||
jsr affiche_texte ; affiche-le
|
jsr prepare_texte ; affiche-le
|
||||||
jsr mots_clicables
|
jsr mots_clicables
|
||||||
|
jsr affiche_texte
|
||||||
|
jsr attente
|
||||||
|
|
||||||
lda scene_actuelle
|
lda scene_actuelle
|
||||||
jsr suite_forcee
|
jsr suite_forcee
|
||||||
sta fgSUITEFORCEE ; true if no words but 'suite'
|
sta fgSUITEFORCEE ; true if no words but 'suite'
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user