mirror of
https://github.com/antoinevignau/source.git
synced 2024-12-30 18:31:21 +00:00
Hyperlinks work!
This commit is contained in:
parent
ab5da6cb27
commit
78fab679f2
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -42,26 +42,21 @@ valeur_condition ds 2 ; valeur condition 2B xx ou 2D yy
|
||||
aventure ds 2
|
||||
nombre_scenes ds 2
|
||||
scene_actuelle ds 2
|
||||
scene_nouvelle ds 2
|
||||
scene_ancienne ds 2
|
||||
deplacement ds 2 ; BOOL - TRUE (new scene) or FALSE (same scene)
|
||||
image_chargee ds 2 ; WORD - TRUE or FALSE
|
||||
escape ds 2 ; BOOL - TRUE or FALSE
|
||||
fgSUITEFORCEE ds 2 ; BOOL - TRUE or FALSE
|
||||
|
||||
mot ds 128 ; le mot ˆ chercher (jusqu'au caract<63>re espace)
|
||||
option_mot ds 128 ; le mot est enregistrŽ s'il est dans la liste
|
||||
|
||||
* Le texte ˆ afficher
|
||||
|
||||
ligne_max ds max_colonnes ; une ligne du texte
|
||||
asc "TEXTE"
|
||||
texte ds max_colonnes*max_lignes ; the text from the .TXT file
|
||||
asc "TEXTE_FINAL"
|
||||
texte_final ds max_colonnes*max_lignes ; the final text - known as b$ in Atari ST
|
||||
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)
|
||||
|
@ -889,7 +889,6 @@ doDIESE jsr next_index
|
||||
jsr next_index
|
||||
|
||||
lda localOFFSET ; 0/25/50 => 0/50/100
|
||||
asl
|
||||
clc
|
||||
adc localPOINT ; +=
|
||||
tax
|
||||
@ -1209,7 +1208,10 @@ skipME
|
||||
debut_aventure
|
||||
lda #1
|
||||
sta scene_actuelle
|
||||
|
||||
lda #-1
|
||||
sta scene_ancienne
|
||||
sta mot_ancien
|
||||
|
||||
ldx #1
|
||||
sep #$20
|
||||
lda #FALSE
|
||||
@ -1257,17 +1259,22 @@ fin rts
|
||||
nouvelle_scene
|
||||
cmp #0 ; not 0
|
||||
beq ns_99
|
||||
cmp scene_ancienne
|
||||
beq ns_98
|
||||
|
||||
ldx scene_actuelle
|
||||
stx scene_ancienne
|
||||
|
||||
dec
|
||||
tax
|
||||
lda #TRUE
|
||||
sep #$20
|
||||
sta scene_visitee,x
|
||||
rep #$20
|
||||
|
||||
lda #FALSE
|
||||
|
||||
ns_98 lda #FALSE
|
||||
sta deplacement
|
||||
|
||||
stz option_mot
|
||||
ns_99 rts
|
||||
|
||||
*-----------------------
|
||||
@ -1311,11 +1318,6 @@ tc_2 ldx mot_clique ; on sauvegarde l'ancien mot
|
||||
* affiche_commentaire
|
||||
|
||||
affiche_commentaire
|
||||
sep #$20
|
||||
ldal $c034
|
||||
inc
|
||||
stal $c034
|
||||
rep #$20
|
||||
rts
|
||||
|
||||
*-----------------------
|
||||
@ -1736,8 +1738,7 @@ suite_forcee
|
||||
lda #TRUE
|
||||
bra sf_99
|
||||
sf_false lda #FALSE
|
||||
sf_99 sta deplacement
|
||||
sta fgSUITEFORCEE
|
||||
sf_99 sta fgSUITEFORCEE
|
||||
rts
|
||||
|
||||
strSUITE asc 'suite '
|
||||
@ -1748,7 +1749,12 @@ strSUITE asc 'suite '
|
||||
* aiguille(scene)
|
||||
* parce que le tableau aiguillag existe
|
||||
|
||||
aiguille cmp #0
|
||||
aiguille ldx mot_clique ; a-t-on cliquŽ de nouveau sur le m<>me mot ?
|
||||
cpx mot_ancien
|
||||
beq ai_entry
|
||||
jmp affiche_commentaire
|
||||
|
||||
ai_entry cmp #0
|
||||
beq ai_false
|
||||
|
||||
dec ; prend la scene
|
||||
@ -1763,20 +1769,17 @@ aiguille cmp #0
|
||||
sta dpFROM ; on pointe sur l'index du premier mot
|
||||
pla
|
||||
|
||||
ldy mot_clique
|
||||
ldy mot_clique ; 1..+
|
||||
dey
|
||||
lda (dpFROM),y ; la prochaine sc<73>ne
|
||||
and #$ff
|
||||
sta scene_actuelle
|
||||
|
||||
lda #TRUE
|
||||
sta deplacement
|
||||
lda #FALSE
|
||||
sta fgSUITEFORCEE
|
||||
rts
|
||||
|
||||
ai_false lda #FALSE
|
||||
sta deplacement
|
||||
sta fgSUITEFORCEE
|
||||
rts
|
||||
|
||||
*-----------------------
|
||||
@ -1786,7 +1789,7 @@ ai_false lda #FALSE
|
||||
|
||||
charge_image
|
||||
rts
|
||||
1F9C
|
||||
|
||||
*-----------------------
|
||||
* IMAGE_ECRAN - OK
|
||||
*-----------------------
|
||||
|
@ -148,6 +148,11 @@ FALSE = 0
|
||||
tdc
|
||||
sta myDP
|
||||
|
||||
lda #SUITE_DATA
|
||||
stal $300
|
||||
lda #^SUITE_DATA
|
||||
stal $302
|
||||
|
||||
*--- Version du systeme
|
||||
|
||||
jsl GSOS
|
||||
@ -246,6 +251,12 @@ okMEM1 sty ptrIMAGE
|
||||
okTOOL _HideMenuBar
|
||||
_InitCursor
|
||||
|
||||
PushWord #0
|
||||
PushWord #%11111111_11111111
|
||||
PushWord #0
|
||||
_FlushEvents
|
||||
pla
|
||||
|
||||
PushLong #0
|
||||
_GetPort
|
||||
PullLong mainPORT
|
||||
@ -268,6 +279,12 @@ okTOOL _HideMenuBar
|
||||
jsr initialisation_absolue
|
||||
jsr generique
|
||||
|
||||
PushWord #0
|
||||
PushWord #%11111111_11111111
|
||||
PushWord #0
|
||||
_FlushEvents
|
||||
pla
|
||||
|
||||
*-----------------------
|
||||
* MAIN - OK
|
||||
*-----------------------
|
||||
@ -281,15 +298,20 @@ main
|
||||
*---
|
||||
|
||||
mainLOOP lda scene_actuelle
|
||||
jsr nouvelle_scene
|
||||
jsr nouvelle_scene ; on initialise la scène
|
||||
lda scene_actuelle
|
||||
jsr image
|
||||
jsr image ; on charge une image éventuelle
|
||||
lda scene_actuelle
|
||||
jsr get_textes ; prend le texte de l'écran
|
||||
jsr prepare_texte ; prepare le texte
|
||||
jsr mots_clicables ; ajoute les mots cliquables
|
||||
jsr affiche_texte ; affiche le texte
|
||||
jsr attente ; attend sur l'image
|
||||
jsr get_textes ; on détermine le texte
|
||||
jsr prepare_texte ; que l'on prepare le texte
|
||||
jsr mots_clicables ; on y ajoute les mots cliquables
|
||||
jsr affiche_texte ; et on l'affiche
|
||||
|
||||
PushWord #0
|
||||
PushWord #%11111111_11111111
|
||||
PushWord #0
|
||||
_FlushEvents
|
||||
pla
|
||||
|
||||
*----------------------------------------
|
||||
* TASK MASTER (no more)
|
||||
@ -297,6 +319,8 @@ mainLOOP lda scene_actuelle
|
||||
|
||||
taskLOOP inc VBLCounter0
|
||||
|
||||
* jsr DEBUG
|
||||
|
||||
* PushWord #0
|
||||
* PushWord #%11111111_11111111
|
||||
* PushLong #taskREC
|
||||
@ -312,11 +336,36 @@ taskLOOP inc VBLCounter0
|
||||
tax
|
||||
jsr (taskTBL,x)
|
||||
|
||||
lda fgSUITEFORCEE
|
||||
cmp #TRUE
|
||||
beq mainLOOP
|
||||
|
||||
lda deplacement ; si on doit bouger, on fait un...
|
||||
cmp #TRUE
|
||||
beq mainLOOP ; ...grand saut
|
||||
bne taskLOOP ; ...sinon on attend
|
||||
|
||||
*---------- DEBUG
|
||||
|
||||
DEBUG
|
||||
lda #' '
|
||||
sta theSTRING
|
||||
sta theSTRING+2
|
||||
|
||||
PushWord scene_actuelle
|
||||
PushLong #theSTRING
|
||||
PushWord #4
|
||||
_Int2Hex
|
||||
|
||||
PushWord #150
|
||||
PushWord #150
|
||||
_MoveTo
|
||||
|
||||
PushLong #theSTRING
|
||||
_DrawCString
|
||||
rts
|
||||
|
||||
theSTRING asc ' '00
|
||||
*----------------------------------- Gestion du keyDown
|
||||
* on gère les open-apple-qqch
|
||||
|
||||
@ -387,16 +436,10 @@ doMOUSEUP
|
||||
mup1 jsr clic_mot ; oui, on vérifie si on a cliqué sur un mot => mot$
|
||||
bcc mup2 ; oui
|
||||
rts
|
||||
|
||||
mup2 lda mot_clique ; a-t-on cliqué de nouveau sur le même mot ?
|
||||
cmp mot_ancien
|
||||
beq mup3
|
||||
jsr affiche_commentaire
|
||||
rts
|
||||
mup3 lda scene_actuelle
|
||||
mup2 lda scene_actuelle
|
||||
jsr aiguille ; on aiguille le joueur si c'est le second clic
|
||||
rts
|
||||
|
||||
|
||||
*-----------------------------------
|
||||
* AUTRES ROUTINES
|
||||
*-----------------------------------
|
||||
@ -507,8 +550,7 @@ copyPATH
|
||||
|
||||
*--- Charge le fichier de sauvegarde en mémoire
|
||||
|
||||
loadALL
|
||||
jsl GSOS
|
||||
loadALL jsl GSOS
|
||||
dw $2010
|
||||
adrl proOPENGAME
|
||||
bcs loadKO99
|
||||
@ -523,21 +565,22 @@ loadALL
|
||||
dw $2014
|
||||
adrl proCLOSE
|
||||
|
||||
loadKO99
|
||||
rts
|
||||
loadKO99 rts
|
||||
|
||||
*---
|
||||
|
||||
loadPART
|
||||
ldx #NB_INDICATEURS
|
||||
ldy #C1
|
||||
loadPART ldx #2
|
||||
lda #aventure
|
||||
jsr loadIT
|
||||
|
||||
ldx #2
|
||||
lda #scene_actuelle
|
||||
jsr loadIT
|
||||
|
||||
ldx #2
|
||||
ldy #P
|
||||
ldx #NB_TEXTES
|
||||
ldy #scene_visitee
|
||||
|
||||
loadIT
|
||||
stx proREADGAME+8
|
||||
loadIT stx proREADGAME+8
|
||||
sty proREADGAME+4
|
||||
jsl GSOS
|
||||
dw $2012
|
||||
@ -546,8 +589,7 @@ loadIT
|
||||
|
||||
*--- Enregistre le fichier de sauvegarde
|
||||
|
||||
saveALL
|
||||
jsl GSOS
|
||||
saveALL jsl GSOS
|
||||
dw $2002
|
||||
adrl proDESTROYGAME
|
||||
|
||||
@ -571,21 +613,22 @@ saveALL
|
||||
dw $2014
|
||||
adrl proCLOSE
|
||||
|
||||
saveKO99
|
||||
rts
|
||||
saveKO99 rts
|
||||
|
||||
*---
|
||||
|
||||
savePART
|
||||
ldx #NB_INDICATEURS
|
||||
ldy #C1
|
||||
savePART ldx #2
|
||||
lda #aventure
|
||||
jsr saveIT
|
||||
|
||||
ldx #2
|
||||
lda #scene_actuelle
|
||||
jsr saveIT
|
||||
|
||||
ldx #2
|
||||
ldy #P
|
||||
|
||||
saveIT
|
||||
stx proWRITEGAME+8
|
||||
ldx #NB_TEXTES
|
||||
ldy #scene_visitee
|
||||
|
||||
saveIT stx proWRITEGAME+8
|
||||
sty proWRITEGAME+4
|
||||
jsl GSOS
|
||||
dw $2013
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user