Links are coming

This commit is contained in:
Antoine Vignau 2023-08-20 11:10:34 +02:00
parent 8279eb456b
commit 591c6a939e
6 changed files with 4971 additions and 4551 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -62,6 +62,8 @@ texte_final ds max_colonnes*max_lignes ; the final text - known as b$ in Atari S
ds 2
asc "TEXTE_LIENS"
texte_liens ds max_colonnes*max_lignes ; FALSE: not a link, TRUE est un mot cliquable
asc "TEXTE_INDEX"
texte_index ds max_colonnes*max_lignes ; numŽro du mot
* Toujours en dŽcalŽ : index 1 dŽmarre ˆ 0 (NB_TEXTES est toujours > au nombre de sc<EFBFBD>nes)

View File

@ -950,9 +950,12 @@ prepare_texte
* 1- clear le texte final
ldx #0 ; on remplit de space chars
lda #texteSPACE
]lp sta texte_final,x
ldx #0 ; on initialise les buffers
]lp lda #texteSPACE
sta texte_final,x
lda #colorBLACK
sta texte_liens,x
stz texte_index,x
inx
cpx #max_colonnes*max_lignes
bcc ]lp
@ -1244,8 +1247,7 @@ fin_aventure
*-----------------------
* fin
fin
rts
fin rts
*-----------------------
* NOUVELLE_SCENE - OK
@ -1293,7 +1295,7 @@ surligner_mot
* 5,s w Y
* 7,s w X
* 9,s l text pointer
* 13,s l link pointer
* 13,s l color pointer
max_colonnes = 75 ; 80 - 75
max_lignes = 20 ; 20 - 18
@ -1675,6 +1677,7 @@ suite_forcee
bra sf_99
sf_false lda #FALSE
sf_99 sta deplacement
sta fgSUITEFORCEE
rts
strSUITE asc 'suite '
@ -1856,12 +1859,12 @@ help_str16 asc 'OA-Q : quitter le jeu'00
* mots_clicables(texte$)
mots_clicables
lda #0 ; on init les registres (mais pourquoi ?)
tax
tay
sep #$20 ; texte2$=UPPER$(texte$)
ldx #0
]lp lda #colorBLACK ; on efface texte_liens
sta texte_liens,x
lda texte_final,x ; on majusculinise le texte
]lp lda texte_final,x
tay
lda tblUPPER,y
sta texte,x
@ -1905,20 +1908,23 @@ mc_1 rep #$20
sta dpINDEX
lda ptrINDEX+2
sta dpINDEX+2
sep #$20 ; on majusculinise le mot
ldy #0 ; ˆ chercher
]lp lda [dpINDEX],y
lda #0 ; on initialise les registres
tax
lda tblUPPER,x
sta mot,y
tay
sep #$20 ; on majusculinise le mot
]lp lda [dpINDEX],y
cmp #instrSPACE
beq mc_2
tax
lda tblATARI,x ; from Atari to IIgs
tax
lda tblUPPER,x ; to upper case
sta mot,y
iny
bne ]lp
mc_2 dey
sty len_max
mc_2 sty len_max
*--- REPEAT
*--- pointeur_mot%=INSTR(texte2$,mot2$,pointeur_mot%)
@ -1929,12 +1935,12 @@ mc_3 ldy #0
]lp lda mot,y ; compare le mot
cmp texte,x
bne mc_5 ; pas le m<>me mot
inx
iny
cpy len_max
bne ]lp
bcc ]lp
jsr test_condition ; on a trouvŽ le mot
bra mc_6
@ -1977,11 +1983,14 @@ test_condition
* tax
* lda condition,x
lda #colorWHITE
]lp dex
dey
bmi tc_99
lda #colorWHITE
sta texte_liens,x
lda index_mot
inc
sta texte_index,x
bra ]lp
* IF (condition&>0 AND scene_visitee!(ABS(condition&))=TRUE) OR (condition&<0 AND scene_visitee!(ABS(-condition&))=FALSE)
@ -1993,6 +2002,17 @@ tc_ok
* sep %20
rts
*-----------------------
* DEBUG - OK
*-----------------------
mx %10
DEBUG ldal $c034
inc
stal $c034
rts
mx %00
*-----------------------

View File

@ -151,6 +151,11 @@ FALSE = 0
lda #^mots_clicables
stal $302
lda #LES_TEXTES
stal $310
lda #^LES_TEXTES
stal $312
*--- Version du systeme
jsl GSOS
@ -281,9 +286,6 @@ main
jsr initialisation_relative
jsr fadeOUT
lda #2
sta scene_actuelle
*---
mainLOOP lda scene_actuelle
@ -292,15 +294,17 @@ mainLOOP lda scene_actuelle
jsr image
lda scene_actuelle
jsr get_textes ; prend le texte de l'écran
jsr prepare_texte ; affiche-le
jsr mots_clicables
jsr affiche_texte
jsr attente
jsr prepare_texte ; prepare le texte
jsr mots_clicables ; ajoute les mots cliquables
jsr affiche_texte ; affiche le texte
* lda scene_actuelle
* cmp #$47
* bne okboss
* brk $bd
okboss jsr attente ; attend sur l'image
lda scene_actuelle
jsr suite_forcee
sta fgSUITEFORCEE ; true if no words but 'suite'
*----------------------------------------
* TASK MASTER (no more)
*----------------------------------------
@ -386,6 +390,17 @@ tblKEYADDRESS
doMOUSEDOWN
doMOUSEUP
lda scene_actuelle ; a-t-on des mots cliquables ?
jsr suite_forcee
lda fgSUITEFORCEE ; non, on sort
cmp #FALSE
beq mup1
rts
mup1 jsr clic_mot ; oui, on vérifie si on a cliqué sur un mot => mot$
*--- LOGO
lda scene_actuelle
inc
cmp nombre_scenes
@ -397,21 +412,6 @@ okok sta scene_actuelle
sta deplacement
rts
lda fgSUITEFORCEE
cmp #FALSE
beq mup1
rts
mup1 jsr clic_mot ; on vérifie si on a cliqué sur un mot => mot$
lda scene_actuelle
sta scene_nouvelle
*--- LOGO
lda scene_nouvelle
sta scene_actuelle
rts
*-----------------------------------
* AUTRES ROUTINES
*-----------------------------------

Binary file not shown.