works on affiche_texte

This commit is contained in:
Antoine Vignau 2023-08-14 18:47:29 +02:00
parent 6186ffd178
commit 4c3cede376
5 changed files with 4805 additions and 3868 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -30,15 +30,8 @@ P ds 1
aventure ds 2
nombre_scenes ds 2
scene_actuelle ds 2
*i ds 2
*j ds 2
*scene ds 2
deplacement ds 2
*fichier ds 2
*espace ds 2
longueur ds 2
index ds 2
pointeur ds 2
scene_nouvelle ds 2
deplacement ds 2 ; BOOL - TRUE (new scene) or FALSE (same scene)
numero_mot ds 2 ; WORD
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
@ -46,6 +39,12 @@ image_chargee ds 2 ; WORD - TRUE or FALSE
escape ds 2 ; BOOL - TRUE or FALSE
fgSUITEFORCEE ds 2 ; BOOL - TRUE or FALSE
* Le texte ˆ afficher
texte ds max_colonnes*max_lignes ; the text from the .TXT file
texte_final ds max_colonnes*max_lignes ; the final text - known as b$ in Atari ST
ds 2
* Toujours en dŽcalŽ : index 1 dŽmarre ˆ 0 (NB_TEXTES est toujours > au nombre de sc<EFBFBD>nes)
asc "SUITE_DATA"

View File

@ -345,8 +345,7 @@ get_textes2 dec
*-----------------------
* generique
generique
jsr switch_640
generique jsr switch_640
jsr tag
PushWord #0
@ -931,7 +930,51 @@ localPOINT ds 2 ; index du mot
initialisation_cache
rts
*-----------------------
* AFFICHE_TEXTE
*-----------------------
* affiche_texte
texteSPACE = $5f
texteRC = $9c
affiche_texte
* 1- saute les premiers RC
ldy #0
tyx
sep #$20
]lp lda [dpTEXTES],y
cmp #texteRC
bne at_1
iny
bne ]lp
* 2- recopie le texte
at_1 lda [dpTEXTES],y
sta texte,x
iny
inx
cmp #0
bne at_1 ; jusqu'ˆ la fin du texte de la sc<73>ne
inx
stx longueur_texte
rep #$20
* 3- calcul le texte final
rts
*--- Local data
longueur_texte ds 2 ; nombre de caracteres du texte d'origine
return ds 2 ; nombre de RC dans une ligne
*-----------------------
* DEBUT_AVENTURE - OK
*-----------------------
@ -1001,7 +1044,15 @@ nouvelle_scene
stz option_mot
ns_99 rts
*-----------------------
* CLIC_MOT
*-----------------------
* clic_mot
clic_mot
rts
*-----------------------
* SURLIGNER_MOT
*-----------------------
@ -1051,9 +1102,11 @@ printEXIT lda 1,s
sta 1,s
rts
* 1- Get address of character in ptrFONT
* 1- print char
print1 pha
print1 cmp #instrSPACE ; skip space char
beq print2
pha
lda printX
asl
@ -1071,16 +1124,16 @@ print1 pha
* 4- next character
inc dpFROM
bne print2
print2 inc dpFROM
bne print3
inc dpFROM+2
* 5- next X/Y in SHR
print2 inc printX
print3 inc printX
lda printX
cmp #max_colonnes
bcc print3
bcc print4
lda 7,s ; reset X-coord
sta printX
@ -1088,13 +1141,13 @@ print2 inc printX
inc printY
lda printY
cmp #max_lignes
bcc print3
bcc print4
brl printEXIT ; out of SHR screen, we exit
* 6- we loop
print3 brl printLOOP
print4 brl printLOOP
*---

View File

@ -297,8 +297,11 @@ mainLOOP lda scene_actuelle
jsr nouvelle_scene
lda scene_actuelle
jsr image
* jsr affiche_texte
lda scene_actuelle
jsr get_textes ; prend le texte de l'écran
jsr affiche_texte ; affiche-le
lda scene_actuelle
jsr suite_forcee
sta fgSUITEFORCEE ; true if no words but 'suite'
@ -306,8 +309,7 @@ mainLOOP lda scene_actuelle
* TASK MASTER
*----------------------------------------
taskLOOP
PushWord #0
taskLOOP PushWord #0
PushWord #0
PushWord #$c000
PushWord #0
@ -328,15 +330,15 @@ taskLOOP
tax
jsr (taskTBL,x)
*--- Handle clicks
bra taskLOOP
lda deplacement ; si on doit bouger, on fait un...
cmp #TRUE
beq mainLOOP ; ...grand saut
bne taskLOOP ; ...sinon on attend
*----------------------------------- Gestion du keyDown
* on gère les open-apple-qqch
doKEYDOWN
lda taskMODIFIERS
doKEYDOWN lda taskMODIFIERS
and #appleKey
cmp #appleKey
beq doOPENAPPLE
@ -381,16 +383,28 @@ tblKEYADDRESS
da help
*----------------------------------- Gestion des contrôles (ça veut dire boutons ou lineedit)
doCONTROL
lda taskREC+38
rts
*
*doCONTROL
* lda taskREC+38
* rts
*----------------------------------- Gestion du mouseUp
* on compare les coordonnées avec celles du incontent
* si dans le même rectangle, on traite
doMOUSEUP
doMOUSEUP 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
*-----------------------------------
@ -597,7 +611,7 @@ saveIT
adrl proWRITEGAME
rts
*----------------------------------- Restart
*----------------------------------- Restart - LOGO (must handle escape)
doRESTART
jsr saveBACK
@ -1152,7 +1166,7 @@ taskTBL da doNOT ; Null
da doNOT ; wInCalledSysEdit
da doNOT ; wInTrackZoom
da doNOT ; wInHitFrame
da doCONTROL ; wInControl
da doNOT ; wInControl
da doNOT ; wInControlMenu
*----------------------------------------