working on aiguillage
This commit is contained in:
parent
f50fe0abdb
commit
ab5da6cb27
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -36,6 +36,9 @@ rvb5 ds 2
|
|||
rvbA ds 2
|
||||
index_mot ds 2 ; un autre index qui pointe
|
||||
nb_mots ds 2 ; nombre de mots dans la scene
|
||||
mot_clique ds 2 ; index du mot cliquŽ
|
||||
mot_ancien ds 2 ; index du mot prŽcŽdemment cliquŽ
|
||||
valeur_condition ds 2 ; valeur condition 2B xx ou 2D yy
|
||||
aventure ds 2
|
||||
nombre_scenes ds 2
|
||||
scene_actuelle ds 2
|
||||
|
|
|
@ -865,7 +865,7 @@ doDIESE jsr next_index
|
|||
|
||||
*--- condition&(scene|,pointeur_mots|(scene|)) =
|
||||
*--- ASC(MID$(ligne$,espace%+2,1))*VAL(MID$(ligne$,espace%+1,1)+"1")
|
||||
*--- Ici, on ne fait pas le calcul de la version Atari pour le moment
|
||||
*--- Ici, on ne fait pas le calcul de la version Atari
|
||||
|
||||
jsr next_index
|
||||
|
||||
|
@ -1271,13 +1271,53 @@ nouvelle_scene
|
|||
ns_99 rts
|
||||
|
||||
*-----------------------
|
||||
* CLIC_MOT
|
||||
* CLIC_MOT - OK
|
||||
*-----------------------
|
||||
* clic_mot
|
||||
* on regarde sur quel mot on a cliquŽ
|
||||
|
||||
clic_mot
|
||||
lda taskWHERE+2 ; X
|
||||
asl
|
||||
tax
|
||||
lda x_text,x
|
||||
bpl tc_1
|
||||
lda #0
|
||||
tc_1 pha
|
||||
|
||||
lda taskWHERE ; Y
|
||||
asl
|
||||
tax
|
||||
lda y_text,x
|
||||
clc
|
||||
adc 1,s
|
||||
tax
|
||||
pla
|
||||
|
||||
lda texte_index,x
|
||||
and #$ff
|
||||
bne tc_2
|
||||
sec ; pas de mot
|
||||
rts
|
||||
tc_2 ldx mot_clique ; on sauvegarde l'ancien mot
|
||||
stx mot_ancien
|
||||
sta mot_clique ; et le nouveau
|
||||
clc ; on a un mot
|
||||
rts
|
||||
|
||||
*-----------------------
|
||||
* AFFICHE_COMMENTAIRE
|
||||
*-----------------------
|
||||
* affiche_commentaire
|
||||
|
||||
affiche_commentaire
|
||||
sep #$20
|
||||
ldal $c034
|
||||
inc
|
||||
stal $c034
|
||||
rep #$20
|
||||
rts
|
||||
|
||||
*-----------------------
|
||||
* SURLIGNER_MOT
|
||||
*-----------------------
|
||||
|
@ -1703,114 +1743,41 @@ sf_99 sta deplacement
|
|||
strSUITE asc 'suite '
|
||||
|
||||
*-----------------------
|
||||
* TEST_CURSEUR
|
||||
* AIGUILLAGE
|
||||
*-----------------------
|
||||
* test_curseur
|
||||
* on regarde si le curseur se trouve sur un mot cliquable
|
||||
* aiguille(scene)
|
||||
* parce que le tableau aiguillag existe
|
||||
|
||||
test_curseur
|
||||
lda taskWHERE+2
|
||||
sta x1
|
||||
lda taskWHERE
|
||||
sta y1
|
||||
|
||||
lda #' '
|
||||
sta strX1
|
||||
sta strX1+2
|
||||
sta strY1
|
||||
sta strY1+2
|
||||
sta strX2
|
||||
sta strX2+2
|
||||
sta strY2
|
||||
sta strY2+2
|
||||
sta strIDX
|
||||
sta strIDX+2
|
||||
|
||||
lda taskWHERE+2 ; X
|
||||
asl
|
||||
tax
|
||||
lda x_text,x
|
||||
bpl tc_1
|
||||
lda #0
|
||||
tc_1 sta x2
|
||||
aiguille cmp #0
|
||||
beq ai_false
|
||||
|
||||
dec ; prend la scene
|
||||
pha ; calcul l'index dans la dimension NB_MOTS
|
||||
pha
|
||||
|
||||
lda taskWHERE ; Y
|
||||
asl
|
||||
tax
|
||||
lda y_text,x
|
||||
sta y2
|
||||
|
||||
clc
|
||||
adc 1,s
|
||||
tax
|
||||
sta idx
|
||||
pla ; on a l'index dans le texte
|
||||
pha ; index de sc<73>ne
|
||||
PushWord #NB_MOTS ; taille d'une dimension
|
||||
_Multiply
|
||||
pla
|
||||
clc ; 0=>0, 1=>25, 2=>50
|
||||
adc #aiguillage
|
||||
sta dpFROM ; on pointe sur l'index du premier mot
|
||||
pla
|
||||
|
||||
lda texte_index,x
|
||||
ldy mot_clique
|
||||
dey
|
||||
lda (dpFROM),y ; la prochaine sc<73>ne
|
||||
and #$ff
|
||||
ora #'0'
|
||||
sep #$20
|
||||
sta strHIT
|
||||
rep #$20
|
||||
|
||||
PushWord x1
|
||||
PushLong #strX1
|
||||
PushWord #4
|
||||
_Int2Hex
|
||||
sta scene_actuelle
|
||||
|
||||
PushWord y1
|
||||
PushLong #strY1
|
||||
PushWord #4
|
||||
_Int2Hex
|
||||
|
||||
PushWord x2
|
||||
PushLong #strX2
|
||||
PushWord #4
|
||||
_Int2Hex
|
||||
|
||||
PushWord y2
|
||||
PushLong #strY2
|
||||
PushWord #4
|
||||
_Int2Hex
|
||||
|
||||
PushWord idx
|
||||
PushLong #strIDX
|
||||
PushWord #4
|
||||
_Int2Hex
|
||||
|
||||
PushWord #150
|
||||
PushWord #150
|
||||
_MoveTo
|
||||
PushLong #string
|
||||
_DrawCString
|
||||
|
||||
ldal KBD-1
|
||||
bmi boum
|
||||
lda #TRUE
|
||||
sta deplacement
|
||||
lda #FALSE
|
||||
sta fgSUITEFORCEE
|
||||
rts
|
||||
ai_false lda #FALSE
|
||||
sta deplacement
|
||||
sta fgSUITEFORCEE
|
||||
rts
|
||||
boum stal KBDSTROBE-1
|
||||
|
||||
lda #texte_index
|
||||
brk $bd
|
||||
|
||||
x1 ds 2
|
||||
y1 ds 2
|
||||
x2 ds 2
|
||||
y2 ds 2
|
||||
idx ds 2
|
||||
|
||||
string asc 'X1='
|
||||
strX1 asc ' '
|
||||
asc ' Y1='
|
||||
strY1 asc ' '
|
||||
asc ' X2='
|
||||
strX2 asc ' '
|
||||
asc ' Y2='
|
||||
strY2 asc ' '
|
||||
asc ' IDX='
|
||||
strIDX asc ' '
|
||||
asc ' HIT='
|
||||
strHIT asc ' '00
|
||||
|
||||
*-----------------------
|
||||
* CHARGE_IMAGE - OK
|
||||
|
@ -1989,6 +1956,9 @@ help_str16 asc 'OA-Q : quitter le jeu'00
|
|||
* mots_clicables(texte$)
|
||||
|
||||
mots_clicables
|
||||
lda #-1 ; force un mot diffŽrent en entrŽe de sc<73>ne
|
||||
sta mot_ancien
|
||||
|
||||
lda #0 ; on init les registres (mais pourquoi ?)
|
||||
tax
|
||||
tay
|
||||
|
|
|
@ -297,8 +297,6 @@ mainLOOP lda scene_actuelle
|
|||
|
||||
taskLOOP inc VBLCounter0
|
||||
|
||||
jsr test_curseur
|
||||
|
||||
* PushWord #0
|
||||
* PushWord #%11111111_11111111
|
||||
* PushLong #taskREC
|
||||
|
@ -381,19 +379,23 @@ doMOUSEUP
|
|||
lda scene_actuelle ; a-t-on des mots cliquables ?
|
||||
jsr suite_forcee
|
||||
|
||||
lda fgSUITEFORCEE ; non, on sort
|
||||
lda fgSUITEFORCEE
|
||||
cmp #FALSE
|
||||
beq mup1
|
||||
rts
|
||||
rts ; non, on sort
|
||||
|
||||
mup1 jsr clic_mot ; oui, on vérifie si on a cliqué sur un mot => mot$
|
||||
bcs mup9 ; on sort sans clic sur un mot
|
||||
jsr aiguillage ; on aiguille le joueur
|
||||
bcc mup2 ; oui
|
||||
rts
|
||||
|
||||
lda #TRUE ; aiguillons les amis !
|
||||
sta deplacement
|
||||
|
||||
mup9 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
|
||||
jsr aiguille ; on aiguille le joueur si c'est le second clic
|
||||
rts
|
||||
|
||||
*-----------------------------------
|
||||
* AUTRES ROUTINES
|
||||
|
@ -440,8 +442,7 @@ mainPORT ds 4
|
|||
|
||||
*----------------------------------- Open
|
||||
|
||||
doLOAD
|
||||
jsr suspendMUSIC ; NTP off
|
||||
doLOAD jsr suspendMUSIC ; NTP off
|
||||
jsr saveBACK
|
||||
|
||||
PushWord #30
|
||||
|
@ -465,8 +466,7 @@ doLOAD1
|
|||
|
||||
*----------------------------------- Save
|
||||
|
||||
doSAVE
|
||||
jsr suspendMUSIC ; NTP off
|
||||
doSAVE jsr suspendMUSIC ; NTP off
|
||||
jsr saveBACK
|
||||
|
||||
PushWord #25
|
||||
|
@ -594,8 +594,7 @@ saveIT
|
|||
|
||||
*----------------------------------- Restart - LOGO (must handle escape)
|
||||
|
||||
doRESTART
|
||||
jsr saveBACK
|
||||
doRESTART jsr saveBACK
|
||||
|
||||
PushWord #0
|
||||
PushWord #5
|
||||
|
@ -613,13 +612,11 @@ doRESTART
|
|||
beq re1
|
||||
rts
|
||||
|
||||
re1
|
||||
jmp initialisation_relative
|
||||
re1 jmp initialisation_relative
|
||||
|
||||
*----------------------------------- Quit
|
||||
|
||||
doQUIT
|
||||
jsr saveBACK
|
||||
doQUIT jsr saveBACK
|
||||
|
||||
PushWord #0
|
||||
PushWord #5
|
||||
|
@ -639,8 +636,7 @@ doQUIT
|
|||
|
||||
*----------------------------------- Quit
|
||||
|
||||
meQUIT
|
||||
jsr stopNTP
|
||||
meQUIT jsr stopNTP
|
||||
|
||||
meQUIT0
|
||||
PushWord #refIsHandle
|
||||
|
@ -666,8 +662,7 @@ meQUIT1
|
|||
* MEMOIRE
|
||||
*----------------------------------------
|
||||
|
||||
make64KB
|
||||
pha
|
||||
make64KB pha
|
||||
pha
|
||||
PushLong #$010000
|
||||
PushWord myID
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue