close to the end

This commit is contained in:
Antoine Vignau 2024-02-04 21:08:00 +01:00
parent 3cd87fc0f9
commit 991473de1e
6 changed files with 4463 additions and 4628 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -96,40 +96,48 @@ nombre_paragraphes = 65 ; NOMBRE MAXI DE TEXTES
nombre_objets = 8 ; NOMBRE D'OBJETS
nombre_peches = 7 ; NOMBRE DE PECHES
MES_DONNEES = * ; on dŽmarre l'index ˆ 1...
indicateur ds nombre_indicateurs+1
objet ds nombre_paragraphes+1
peche ds nombre_paragraphes+1
condition ds nombre_paragraphes+1
consequence ds nombre_paragraphes+1
deja_lu ds nombre_paragraphes+1
visibilite ds nombre_objets+1
texteDEBUT ds 4
ds nombre_paragraphes*4 ; un long
MES_DONNEES = * ; on dŽmarre l'index ˆ 1...
asc "ICONE_OBJETS"
icone_objets ds nombre_objets+1 ; ICONES ALLUM<55>ES OU ETEINTES
asc "ICONE_PECHES"
icone_peches ds nombre_peches+1
asc "OBJET_SELECTIONNE"
objet_selectionne ds 2 ; l'objet selectionne
asc "PECHE_SELECTIONNE"
peche_selectionne ds 2 ; le peche selectionne
asc "TEXTE_SELECTIONNE"
texte_selectionne ds 2 ; le texte ˆ afficher
asc "TEXTES_ENCORE_PRESENTS"
textes_encore_presents ds 2 ; false or true
FIN_DATA = *
*---
*--- The Text Edit control
icone_objets ds nombre_objets+1 ; ICONES ALLUM<55>ES OU ETEINTES
icone_peches ds nombre_peches+1 ; (+1 POUR L'INDICATEUR DE SUITE...)
teCONTROL dw 9
*---
fenetre_x dw 10,10,10,120,10,10,10,10,10
fenetre_y dw 100,100,100,10,100,100,100,10,100
fenetre_xx dw 310,310,310,310,310,310,310,200,310
fenetre_yy dw 190,190,190,190,190,190,190,190,190
fenetre_x dw 0,10,10,10,120,10,10,10,10,10
fenetre_y dw 0,100,100,100,10,100,100,100,10,100
fenetre_xx dw 0,310,310,310,310,310,310,310,200,310
fenetre_yy dw 0,190,190,190,190,190,190,190,190,190
*---
objetTEXT da objetSTR1 ; !NOM DE CHAQUE OBJET
objetTEXT da $bdbd ; !NOM DE CHAQUE OBJET
da objetSTR1
da objetSTR2
da objetSTR3
da objetSTR4
@ -147,14 +155,15 @@ objetSTR6 asc "BIJOUX"
objetSTR7 asc "CLES"
objetSTR8 asc "ARGENT"
objet_x dw 238,222,195,0,27,131,276,133
objet_y dw 51,110,0,17,55,32,19,69
objet_xx dw 283,268,266,57,106,178,319,188
objet_yy dw 88,151,39,54,103,64,50,101
objet_x dw 0,238,222,195,0,27,131,276,133
objet_y dw 0,51,110,0,17,55,32,19,69
objet_xx dw 0,283,268,266,57,106,178,319,188
objet_yy dw 0,88,151,39,54,103,64,50,101
*---
pecheTEXT da pecheSTR1 ; NOM DE CHAQUE PECHE (+1 POUR L'INDIC SUITE...)
pecheTEXT da $bdbd ; NOM DE CHAQUE PECHE (+1 POUR L'INDIC SUITE...)
da pecheSTR1
da pecheSTR2
da pecheSTR3
da pecheSTR4
@ -170,10 +179,10 @@ pecheSTR5 asc "LUXURE"
pecheSTR6 asc "COLERE"
pecheSTR7 asc "PARESSE"
peche_x dw 184,0,46,276,92,138,230
peche_y dw 162,162,162,162,162,162,162
peche_xx dw 227,43,89,319,135,181,273
peche_yy dw 199,199,199,199,199,199,199
peche_x dw 0,184,0,46,276,92,138,230
peche_y dw 0,162,162,162,162,162,162,162
peche_xx dw 0,227,43,89,319,135,181,273
peche_yy dw 0,199,199,199,199,199,199,199
*--- Sound files
* SNDxy.SND where x is the scene, y the file index (0..9)

View File

@ -110,14 +110,20 @@ lt_err1 jsl GSOS
lt_err2 rts
*-----------------------
* GESTION DES ICONES
* TEST LA FIN DU JEU
*-----------------------
test_icone
lda #0 ; from 1
test_fin
rts
*-----------------------
* GESTION DES ICONES DES PECHES
*-----------------------
test_peche stz peche_selectionne
lda #1 ; from 1
]lp pha
asl
asl
asl
tax
lda taskWHERE+2 ; compare le X
@ -135,52 +141,50 @@ test_icone
bcc icone_ko
pla ; on a notre ic™ne
inc
* sta instruction2
sta peche_selectionne
clc
rts
icone_ko
pla
icone_ko pla
inc
cmp #nombre_objets-1 ; et non plus nombre_icones
cmp #nombre_peches ; et non plus nombre_icones
bcc ]lp
beq ]lp
sec
rts
*---
efface_icone ; X is object
efface_peche ; X is object
cpx #0
beq ei1
jsr set_icone
jsr set_peche
_HideCursor
PushLong #iconParamPtr
PushLong #fondParamPtr
_PaintPixels
_ShowCursor
ei1 rts
*---
affiche_icone ; X is object
affiche_peche ; X is object
cpx #0
beq ai1
jsr set_icone
jsr set_peche
_HideCursor
PushLong #fondParamPtr
PushLong #iconParamPtr
_PaintPixels
_ShowCursor
ai1 rts
*---
set_icone txa
dec
set_peche txa
asl
asl
asl ; because we are 16-bit
tax
lda peche_y,x
lda peche_y,x ; x is 2..4..6..8
sta iconToSourceRect
sta iconToDestPoint
lda peche_x,x
@ -214,19 +218,19 @@ fondToSourceLocInfo
dw mode_320 ; mode 320
ds 4 ; ptrFOND - $0000 on entry, high set after _NewHandle
dw 160
dw 0,0,199,319
dw 0,0,200,320
iconToSourceLocInfo
dw mode_320 ; mode 320
adrl $8000 ; ptrICON - $8000 on entry, high set after _NewHandle
dw 160
dw 0,0,199,319
dw 0,0,200,320
iconToDestLocInfo
dw mode_320 ; mode 320
adrl ptrE12000
dw mode_320 ; +0 mode 320
adrl ptr012000 ; +2
dw 160
dw 0,0,199,319
dw 0,0,200,320
iconToSourceRect
dw 3,0,109,272
@ -237,11 +241,10 @@ iconToDestPoint
* GESTION DES OBJETS
*-----------------------
test_objet
lda #0 ; from 1
test_objet stz objet_selectionne
lda #1 ; from 1
]lp pha
asl
asl
asl
tax
lda taskWHERE+2 ; compare le X
@ -259,15 +262,15 @@ test_objet
bcc objet_ko
pla ; on a notre ic™ne
inc
* sta instruction2
sta objet_selectionne
clc
rts
objet_ko
pla
inc
objet_ko pla
cmp #nombre_objets ; et non plus nombre_objets
bcc ]lp
beq ]lp
sec
rts
*---
@ -278,7 +281,7 @@ efface_objet ; X is object
jsr set_objet
_HideCursor
PushLong #iconParamPtr
PushLong #fondParamPtr
_PaintPixels
_ShowCursor
eo1 rts
@ -291,7 +294,7 @@ affiche_objet ; X is object
jsr set_objet
_HideCursor
PushLong #fondParamPtr
PushLong #iconParamPtr
_PaintPixels
_ShowCursor
ao1 rts
@ -299,12 +302,9 @@ ao1 rts
*---
set_objet txa
dec
asl
asl
asl ; because we are 16-bit
tax
lda objet_y,x
lda objet_y,x ; x is 2..4..6..8
sta iconToSourceRect
sta iconToDestPoint
lda objet_x,x
@ -391,122 +391,6 @@ tblLANG asc 'us' ; 0
asc 'hi'
asc 'us' ; 19
*-----------------------
* XX - OK
*-----------------------
xx
rts
*-----------------------
* MAIN - OK
*-----------------------
main
rts
*-----------------------
* VIGIL - OK
*-----------------------
* vigil(max_x%,max_y%,max_xx%,max_yy%,sauvegarde!)
vigil
rts
*-----------------------
* TEST_FIN - OK
*-----------------------
teste_fin
* lda paragraphes_lus
* sec
* sbc pointeur_paragraphes
* cmp #1
* bne tf_99
*
* jmp the_end
*
tf_99 rts
*-----------------------
* DEMANDE_OBJET
*-----------------------
demande_objet
* ldx #1
*]lp lda reference_peche-1,x
* and #$ff
* cmp #8
* beq do_1
*
* lda deja_lu,x
* and #$ff
* cmp #FALSE
* bne do_1
*
* lda indicateur_paragraphes_prealables-1,x
* and #$ff
* tay
* lda indicateur-1,y
* and #$ff
* cmp #TRUE
* bne do_1
*
* lda reference_objet-1,x
* and #$ff
* tay
* sep #$20
* lda #TRUE
* sta icone_objets-1,y
*
*do_1 inx
* cpx pointeur_paragraphes
* bcc ]lp
* beq ]lp
*-------- Affichage des objets
ldx #1
]lp phx
lda icone_objets-1,x
and #$ff
cmp #TRUE
bne do_2
jsr affiche_objet
do_2 plx
inx
cpx #nombre_objets
bcc ]lp
beq ]lp
*-------- Attend un clic
rts
*-----------------------
*
*-----------------------
demande_peche
rts
*-----------------------
*
*-----------------------
recherche_references
rts
*-----------------------
*
*-----------------------
affiche_image
rts
*-----------------------
* THE_END - OK
*-----------------------
@ -523,28 +407,6 @@ the_end
sta fgTHEEND
rts
*-----------------------
* PRE_SCROLLING
*-----------------------
* pre_scrolling
pre_scrolling
rts
*-----------------------
* SCROLLING - OK
*-----------------------
scrolling
rts
*-----------------------
* VERIF - OK
*-----------------------
verif
rts
*-----------------------
* CHOIX D'ENTREE - OK
*-----------------------
@ -590,10 +452,10 @@ init PushWord #$ffff
*-----------------------
init2
ldx #FIN_DATA-DEBUT_DATA
]lp stz fgTHEEND,x
dex
bne ]lp
* ldx #FIN_DATA-DEBUT_DATA
*]lp stz fgTHEEND,x
* dex
* bne ]lp
ldx #0 ; l'indicateur 0 est toujours vrai
sep #$20
@ -754,7 +616,6 @@ test_objets stz textes_encore_presents
sep #$30
ldx #1
]lp stz icone_objets,x
stz visibilite,x
inx
cpx #nombre_objets
bcc ]lp
@ -770,7 +631,7 @@ test_objets stz textes_encore_presents
bne to_1
ldy objet,x
lda #TRUE
sta visibilite,y
sta icone_objets,y
sta textes_encore_presents
to_1 inx
@ -780,8 +641,22 @@ to_1 inx
rep #$30
* LoGo - Voir comment on traite la fin
*-------- Affichage des objets
ldx #1
]lp phx
lda icone_objets,x
and #$ff
cmp #TRUE
bne to_2
jsr affiche_objet
to_2 plx
inx
cpx #nombre_objets
bcc ]lp
beq ]lp
rts
*-----------------------
@ -811,13 +686,32 @@ test_peches sep #$30
bne tp_1
ldy peche,x
lda #TRUE
sta icone_peches-1,y
sta icone_peches,y
tp_1 inx
cpx #nombre_paragraphes
bcc ]lp
beq ]lp
rep #$30
*-------- Affichage des peches
ldx #1
]lp phx
lda icone_peches,x
and #$ff
cmp #TRUE
bne do_2
jsr affiche_peche
do_2 plx
inx
cpx #nombre_peches
bcc ]lp
beq ]lp
rts
rts
*-----------------------
@ -861,7 +755,7 @@ aiguillage stz texte_selectionne
bne ai_next
lda texte_selectionne
bne ai_next
stx texte_selectionne
stx texte_selectionne ; on a trouvŽ un texte
ai_next inx
cpx #nombre_paragraphes
bcc ]lp

View File

@ -217,7 +217,7 @@ okMEM1 sty ptrIMAGE
pla
brl meQUIT0
*---
*--- Test default shadowing...
okTOOL PushWord #0
_GetMasterSCB
@ -226,6 +226,7 @@ okTOOL PushWord #0
lda #^ptrE12000 ; shadowing is off, use slow RAM
sta ptrSCREEN+2
sta iconToDestLocInfo+4
*--- Et la musique...
@ -283,11 +284,9 @@ entryPOINT
*-----------------------
@fadein ptrFOND;#TRUE
jsr waitEVENT
@fadein ptrICONES;#TRUE
mainLOOP jsr teste_fin
jsr demande_objet
mainLOOP jsr test_fin
jsr test_objets
*----------------------------------------
* TASK MASTER
@ -380,24 +379,31 @@ doMUSIK rts
* on compare les coordonnées avec celles du incontent
* si dans le même rectangle, on traite
doMOUSEDOWN
doMOUSEUP lda objet_selectionne ; on a déjà un objet, saute
bne domu_2
doMOUSEUP
* lda fgSUITEFORCEE
* cmp #FALSE
* beq mup1
* rts ; non, on sort
*
*mup1 jsr clic_mot ; oui, on vérifie si on a cliqué sur un mot => mot$
* bcc mup2 ; oui
* rts
*mup2 jsr aiguille ; on aiguille le joueur (1 ou 2 clics)
* 1. vérifie si on a cliqué dans un objet
jsr test_objet ; on teste
bcc domu_1 ; on a clique dans un objet
rts
domu_1 jmp test_peches ; on a clique dans un objet, affiche les peches qui correspondent
* 2. on a déjà un objet, a-t-on cliqué dans un péché ?
domu_2 lda peche_selectionne ; on a aussi déjà un péché, saute
bne domu_4
jsr test_peche ; on teste
bcc domu_3
rts
domu_3 jmp aiguillage ; choisit le texte correspondant
domu_4 rts
*----------------------------------- Gestion des controles
doCONTROL
lda taskREC+38
doCONTROL lda taskREC+38
asl
tax
jmp (ctrlTBL,x)
@ -406,8 +412,7 @@ doCONTROL
* FENETRES
*----------------------------------------
PAINTMAIN
PushLong wiMAIN
PAINTMAIN PushLong wiMAIN
_DrawControls
rtl
@ -1246,8 +1251,8 @@ taskDATA ds 4 ; wmTaskData +16
ds 4 ; wmLastClickPt +42
taskTBL da doNOT ; 0 Null
da doMOUSEDOWN ; 1 mouseDownEvt
da doNOT ; 2 mouseUpEvt
da doNOT ; 1 mouseDownEvt
da doMOUSEUP ; 2 mouseUpEvt
da doKEYDOWN ; 3 keyDownEvt
da doNOT
da doNOT ; 5 autoKeyEvt