avec la version mac

This commit is contained in:
Antoine Vignau 2024-02-04 13:07:16 +01:00
parent db43fecb04
commit 3cd87fc0f9
11 changed files with 5428 additions and 5423 deletions

View File

@ -34,9 +34,10 @@ OK 11 image de fond avec ic
-------------------------------
&x est la rŽfŽrence du texte
=x donne le texte d'apr<70>s
*xy active les deux rŽfŽrences j'imagine
*xy x : numero_objet
y : numero_peche
&x : numero condition
=x : consequence
& ou = ------------------------
0
@ -59,6 +60,15 @@ OK 11 image de fond avec ic
17 DOC JOSEPHINE
18 STERILITE
* ICONES
1
2 gourmandise
3
4
5
6 paresse
7
* -----------------------------
1 LUNETTES
2 CUILLERE
@ -68,14 +78,14 @@ OK 11 image de fond avec ic
6 BIJOUX
7 CLES
8 ARGENT
!
! 1 ORGUEIL
! 2 AVARICE
! 3 GOURMANDISE
! 4 ENVIE
! 5 LUXURE
! 6 COLERE
! 7 PARESSE
! ICONES
! 1 ORGUEIL 5
! 2 AVARICE 1
! 3 GOURMANDISE 2
! 4 ENVIE 7
! 5 LUXURE 3
! 6 COLERE 4
! 7 PARESSE 6
! !
\ /
vv
@ -205,4 +215,14 @@ OK 8 Argent
OK Indics
OK RŽservŽ
OK Lisez-moi (mode d'emploi)
Un fichier se termine par *FIN
Un fichier se termine par *FIN
---------------
Au dŽbut, on a les lunettes uniquement
Quand on clique sur les lunettes, <20>a fait appara”tre la col<6F>re (14)
apr<EFBFBD>s avoir lu le premier texte, on fait appara”tre
le carnet (4)
le rouge (6)
l'argent (8)
puis quand je clique sur le carnet (4), j'ai l'ic™ne de l'avarice (2)

Binary file not shown.

View File

@ -0,0 +1,442 @@
on startMovie
global affiche,indicateur,objet,peche,condition
global consequence,deja_lu,objet_selectionne
global codage_original,visibilite,volume_original
set the switchColorDepth to false
set the exitLock to true
set codage_original=the colorDepth
set the colorDepth to 8
set volume_original=the soundLevel
set the soundLevel to 4
set the volume of sound 1 to 255
set the volume of sound 2 to 127
set the textSize of field "sous titre" to 10
set the textFont of field "sous titre" to "Geneva"
set the textStyle of field "sous titre" to "Bold"
set the text of cast "sous titre" to " "
put tableau(mNew) into affiche -- sous-titre dŽjˆ affichŽ? (pendant la musique)
put tableau(mNew) into indicateur -- tableau des 18 indicateurs
indicateur(mPut,0,true) -- le numŽro 0 est vrai (pour lire le 1er texte)
put tableau(mNew) into objet -- objet des 65 textes
put tableau(mNew) into peche -- pŽchŽ des 65 textes
put tableau(mNew) into condition -- condition des 65 textes (avec "&")
put tableau(mNew) into consequence -- consequence des 65 textes (avec "=")
put tableau(mNew) into deja_lu -- flag lu/non lu des 65 textes
put tableau(mNew) into visibilite -- 8 objets visibles ou non
set hasard=random(7)
if hasard=1 then set texte= "Militaires"
if hasard=2 then set texte= "Fachos"
if hasard=3 then set texte= "Chasseurs"
if hasard=4 then set texte= "Ivrognes"
if hasard=5 then set texte= "Beaufs"
if hasard=6 then set texte= "Exploitateurs"
if hasard=7 then set texte= "RŽacs"
set the text of cast "texte militaires" to texte&": "&random(1000000)+100000&"FF"
set hasard=random(7)
if hasard=1 then set texte= "FauchŽs, mais gŽnŽreux quand m<>me: 50FF"
if hasard=2 then set texte= "Objecteurs de conscience: 50FF"
if hasard=3 then set texte= "Contribution anormale: 150FF"
if hasard=4 then set texte= "Avares: 50FF"
if hasard=5 then set texte= "Pingres: 50FF"
if hasard=6 then set texte= "Pauvres (sur justificatif): 50FF"
if hasard=7 then set texte= "Bienfaiteurs: 150FF"
set the text of cast "texte sympas" to texte
OpenResFile "Curseur"
-- go to "shareware"
end startMovie
on FIN
global codage_original,volume_original
global deja_lu,indicateur
if the CommandDown=true and the key="q" then
set the soundlevel to volume_original
set the colorDepth=codage_original
put FILEIO(mNew,"write","Zohra (Marque-page)") into fichier
if objectP(fichier) then
set sauvegarde=EMPTY
repeat with numero=1 to 65
set sauvegarde=sauvegarde&&deja_lu(mGet,numero)
end repeat
repeat with numero=1 to 18
set sauvegarde=sauvegarde&&indicateur(mGet,numero)
end repeat
fichier(mWriteString,sauvegarde)
fichier(mWriteString,RETURN&RETURN&"Mettez ce fichier ˆ la poubelle Â
pour recommencer la lecture au dŽbut."&RETURN)
fichier(mDispose)
else
updatestage
alert "Fichier non sauvegardŽ."
end if
set the soundEnabled=false
QUIT
end if
end FIN
on stopMovie
repeat with piste=1 to 24
set the visibility of sprite piste to true
end repeat
closeResFile
end stopMovie
on GESTION_COUPLET1
if the key="1" then EFFET "ce monsieur!","1 ce monsieur",1
if the key="2" then EFFET "sa femme!","1 sa femme",2
if the key="3" then EFFET "le chameau!","1 le chameau",3
if the key="4" then EFFET "et toute la smala!","1 et toute la smala",4
if the key="5" then EFFET " ","1 batterie",5
if the key="6" then EFFET " ","1 flžte",6
if the key="7" then EFFET " ","1 synthŽ",7
if the key="8" then EFFET " ","1 trompette",8
if the key="9" then EFFET " ","1 trompette2",9
if the key="0" then
RAZ_ST
go to "couplet2"
end if
end GESTION_COUPLET1
on GESTION_COUPLET2
if the key="1" then EFFET "des coins o<> les flics ne vont plus",Â
"2 des coins o<> les flics",1
if the key="2" then EFFET "y'a des quartiers arab'",Â
"2 y'a des quartiers arabes",2
if the key="3" then EFFET "si c'Žtait des quartiers bretons...",Â
"2 si c'Žtait des quartiers",3
if the key="4" then EFFET "some people from Nanterre, some people from Belleville!",Â
"2 des gens de nanterre",4
if the key="5" then EFFET " ", "2 boing",5
if the key="6" then EFFET " ", "2 couic",6
if the key="7" then EFFET " ", "2 sir<69>nes",7
if the key="8" then EFFET " ", "2 guitare",8
if the key="9" then EFFET " ", "2 guitare2",9
if the key="0" then
RAZ_ST
go to "couplet3"
end if
end GESTION_COUPLET2
on GESTION_COUPLET3
if the key="1" then EFFET "ces beaux-parleurs de la tŽlŽvision?",Â
"3 ces beaux parleurs",1
if the key="2" then EFFET "qu'est-ce qu'ils ont fait pour la france?",Â
"3 qu'est-ce qu'ils ont fait",2
if the key="3" then EFFET "les trois quarts du temps, Â
ils n'ont pas fait leur service miliaire","3 les trois quarts du temps",3
if the key="4" then EFFET "y sont m<>me un peu pŽdŽs sur les bords!",Â
"3 ils sont m<>me un peu pŽdŽs",4
if the key="5" then EFFET "hey hey hey!","3 hey hey hey",5
if the key="6" then EFFET " ", "3 cuivres",6
if the key="7" then EFFET " ", "3 dzoin",7
if the key="8" then EFFET " ", "3 dŽh<C5BD>me",8
if the key="9" then EFFET " ", "3 dŽh<C5BD>me2",9
if the key="0" then
RAZ_ST
go to "couplet4"
end if
end GESTION_COUPLET3
on GESTION_COUPLET4
if the key="1" then EFFET "nous n'Žtions pas pour l'algŽrie fran<61>aise (??)",Â
"4 nous n'Žtions pas pour",1
if the key="2" then EFFET "nous Žtions pour l'algŽrie et le sahara fran<61>ais!",Â
"4 nous Žtions pour l'algŽrie",2
if the key="3" then EFFET "les sous-off' de la coloniale dont j'Žtais!",Â
"4 les sous-off",3
if the key="0" then
RAZ_ST
go to "couplet5"
end if
end GESTION_COUPLET4
on GESTION_COUPLET5
if the key="1" then EFFET "qui a la haine de l'Žtranger?",Â
"5 qui a la haine de l'Žtranger?",1
if the key="2" then EFFET "la terre de france, elle est d'abord aux fran<61>ais",Â
"5 la terre de france",2
if the key="3" then EFFET "on nous parle des collabos, y z'en ont fait moins",Â
"5 on nous parle des collabos",3
if the key="4" then EFFET "c'est le pen (de ch'val)","5 c'est le pen",4
if the key="5" then EFFET "est anti-fran<61>ais","5 est anti-fran<61>ais",5
if the key="6" then EFFET "nous sommes des a.....s",Â
"5 nous sommes des abrutis",6
if the key="7" then EFFET " ", "5 beat",7
if the key="8" then EFFET " ", "5 gling",8
if the key="9" then EFFET " ", "5 gling2",9
if the key="0" then PRESENTATION
end GESTION_COUPLET5
on PRESENTATION
RAZ_ST
when keydown then FIN
repeat while the mouseDown=true
end repeat
go to "prŽsentation"
end PRESENTATION
on EFFET message,son,numero
global affiche
if affiche(mget,numero)=0 then
set the text of cast "sous titre" to message
affiche(mPut,numero,1)
starttimer
else
set the text of cast "sous titre" to " "
end if
puppetSound son
end EFFET
on RAZ_ST
global affiche
affiche(mDispose)
put tableau(mNew) into affiche
set the text of cast "sous titre" to " "
sound Stop 1
sound Stop 2
end RAZ_ST
factory TABLEAU
end TABLEAU
on ATTENTE temps
starttimer
repeat while the timer<(60*temps)
if the mouseDown=true then go to "shareware"
end repeat
end ATTENTE
on INITIALISATION_TEXTES
global objet,peche,condition,consequence
repeat with numero_texte=1 to 65
set texte=the text of cast (the number of cast "texte"+numero_texte-1)
set numero_objet=value(char 2 of texte)
objet(mPut,numero_texte,numero_objet)
set numero_peche=char 3 of texte
peche(mPut,numero_texte,numero_peche)
set numero_condition=value(char 2 to 3 of line 2 of texte)
condition(mPut,numero_texte,numero_condition)
set numero_consequence=value(char 2 to 3 of line 3 of texte)
consequence(mPut,numero_texte,numero_consequence)
-- put line 5 of texte
-- put "texte :"&numero_texte
-- put "objet :"&objet(mGet,numero_texte)
-- put "peche :"&peche(mGet,numero_texte)
-- put "condit:"&condition(mGet,numero_texte)
-- put "conseq:"&consequence(mGet,numero_texte)
-- put " "
end repeat
end INITIALISATION_TEXTES
on CHARGEMENT
global deja_lu,indicateur
put FILEIO(mNew,"read","Zohra (Marque-page)") into fichier
if objectP(fichier) then
repeat with numero=1 to 65
put fichier(mReadWord) into charge
deja_lu(mPut,numero,charge)
end repeat
repeat with numero=1 to 18
put fichier(mReadWord) into charge
indicateur(mPut,numero,charge)
end repeat
fichier(mDispose)
end if
end CHARGEMENT
on GARDE argument
global objet_selectionne
set objet_selectionne=argument
repeat with numero_objet=1 to 8
if numero_objet<>objet_selectionne then
set the visibility of sprite (1+numero_objet) to false
end if
end repeat
end GARDE
on TEST_OBJETS
global deja_lu,objet,indicateur,condition,visibilite
cursor 200
set textes_encore_presents=false
repeat with numero_objet=1 to 8
set the visibility of sprite (1+numero_objet) to false
visibilite(mPut,numero_objet,false)
end repeat
repeat with numero_texte =1 to 65
if deja_lu(mGet,numero_texte)=false then
if indicateur(Mget,condition(mGet,numero_texte))=true then
visibilite(mPut,objet(mGet,numero_texte),true)
set textes_encore_presents=true
end if
end if
end repeat
cursor 128
if textes_encore_presents=false then
repeat with piste=1 to 24
set the visibility of sprite piste to true
end repeat
go to "texte fin"
end if
end TEST_OBJETS
on TEST_PECHES
global deja_lu,objet,indicateur,condition,peche,objet_selectionne
cursor 200
repeat with numero_peche=1 to 8
set the visibility of sprite (9+numero_peche) to false
end repeat
repeat with numero_texte=1 to 65
if objet(mGet,numero_texte)=objet_selectionne then
if deja_lu(mGet,numero_texte)=false then
if indicateur(mGet,condition(mGet,numero_texte))=true then
set the visibility of sprite (9+peche(mGet,numero_texte)) to true
-- put "texte peche "&numero_texte
end if
end if
end if
end repeat
cursor 128
end TEST_PECHES
on AIGUILLAGE
global peche_selectionne,objet_selectionne,objet,peche
global deja_lu,condition,indicateur,consequence,texte_selectionne
set texte_selectionne=0
repeat with texte=1 to 65
if objet(mGet,texte)=objet_selectionne then
if peche(mGet,texte)=peche_selectionne then
if deja_lu(mGet,texte)=false then
if indicateur(mGet,condition(mGet,texte))=true then
if texte_selectionne=0 then
set texte_selectionne=texte
end if
end if
end if
end if
end if
end repeat
repeat with piste=1 to 24
set the visibility of sprite piste to true
end repeat
go to (marker ("textes"))+(texte_selectionne-1)*2
end AIGUILLAGE
on PRE_SCROLL
global position_texte,haut_maxi,objet_selectionne
puppetsprite 2,true
starttimer
set the locV of sprite 2 to 68
set the locH of sprite 2 to 19
if objet_selectionne=4 or objet_selectionne=6 Â
or objet_selectionne=7 then
set the locV of sprite 2 to -36
set the locH of sprite 2 to 144
end if
if objet_selectionne=8 then
set the locV of sprite 2 to -25
set the locH of sprite 2 to 14
end if
set position_texte=the locV of sprite 2
set haut_maxi=position_texte
delay 60-the timer
end PRE_SCROLL
on SCROLL
global position_texte,haut_maxi
if the mousecast=the number of cast "contour blanc" then
set position_souris=the mouseV-(the top of sprite 7)-(the height of sprite 7)/2
set vitesse=(30.0/the height of sprite 7)*position_souris
cursor 200
repeat while the mouseDown=true
if the bottom of sprite 2 - vitesse < (the bottom of sprite 7)-20 then
set position_texte=(-the height of sprite 2)-19+the bottom of sprite 7
set vitesse=0
end if
if the top of sprite 2 - vitesse > haut_maxi then
set position_texte=haut_maxi
set vitesse=0
end if
set position_texte=position_texte-vitesse
set the locV of sprite 2 = position_texte
updatestage
end repeat
cursor 128
end if
end SCROLL
on RETOUR
global texte_selectionne,deja_lu,indicateur,consequence
if the doubleClick=true then
puppetsprite 2,false
repeat with piste=1 to 24
set the visibility of sprite piste to true
end repeat
deja_lu(mPut,texte_selectionne,true)
indicateur(mPut,consequence(mGet,texte_selectionne),true)
go to "bureau objets"
end if
end RETOUR

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -85,24 +85,39 @@ fgTHEEND ds 2 ; LOGO
i ds 2
j ds 2
index ds 2
theA ds 2
theX ds 2
theY ds 2
*--- Variables du jeu
nombre_indicateurs = 30 ; NOMBRE MAXI D'INDICATEURS
nombre_paragraphes = 110 ; NOMBRE MAXI DE TEXTES
nombre_indicateurs = 18 ; NOMBRE MAXI D'INDICATEURS
nombre_paragraphes = 65 ; NOMBRE MAXI DE TEXTES
nombre_objets = 8 ; NOMBRE D'OBJETS
nombre_peches = 7 ; NOMBRE DE PECHES
pointeur_indicateurs ds 2
indicateurTEXT ds nombre_indicateurs ; NOM DES INDICATEURS UTILISES PAR MOI
indicateur ds nombre_indicateurs ; INDICATEUR EN LUI-MEME
paragraphe_lu ds nombre_paragraphes
indicateur_paragraphes ds nombre_paragraphes ; NUMERO DE L'INDIC CR<43>E A CHAQUE TEXTE
indicateur_paragraphes_prealables ds nombre_paragraphes ; NUMERO DE L'INDIC NECESSAIRE POUR LIRE CE TEXTE
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
objet_selectionne ds 2 ; l'objet selectionne
peche_selectionne ds 2 ; le peche selectionne
texte_selectionne ds 2 ; le texte ˆ afficher
textes_encore_presents ds 2 ; false or true
FIN_DATA = *
*---
icone_objets ds nombre_objets ; ICONES ALLUM<55>ES OU ETEINTES
icone_objets ds nombre_objets+1 ; ICONES ALLUM<55>ES OU ETEINTES
icone_peches ds nombre_peches+1 ; (+1 POUR L'INDICATEUR DE SUITE...)
*---
@ -114,8 +129,6 @@ fenetre_yy dw 190,190,190,190,190,190,190,190,190
*---
nombre_objets = 8 ; NOMBRE D'OBJETS
objetTEXT da objetSTR1 ; !NOM DE CHAQUE OBJET
da objetSTR2
da objetSTR3
@ -124,7 +137,6 @@ objetTEXT da objetSTR1 ; !NOM DE CHAQUE OBJET
da objetSTR6
da objetSTR7
da objetSTR8
da objetSTR9
objetSTR1 asc "LUNETTES"
objetSTR2 asc "CUILLERE"
@ -134,9 +146,6 @@ objetSTR5 asc "DICO"
objetSTR6 asc "BIJOUX"
objetSTR7 asc "CLES"
objetSTR8 asc "ARGENT"
objetSTR9 asc "FIN"
ancien_objet ds 2
objet_x dw 238,222,195,0,27,131,276,133
objet_y dw 51,110,0,17,55,32,19,69
@ -144,8 +153,6 @@ objet_xx dw 283,268,266,57,106,178,319,188
objet_yy dw 88,151,39,54,103,64,50,101
*---
nombre_peches = 7 ; NOMBRE DE PECHES
pecheTEXT da pecheSTR1 ; NOM DE CHAQUE PECHE (+1 POUR L'INDIC SUITE...)
da pecheSTR2
@ -154,7 +161,6 @@ pecheTEXT da pecheSTR1 ; NOM DE CHAQUE PECHE (+1 POUR L'INDIC SUITE...)
da pecheSTR5
da pecheSTR6
da pecheSTR7
da pecheSTR8
pecheSTR1 asc "ORGUEIL"
pecheSTR2 asc "AVARICE"
@ -163,28 +169,12 @@ pecheSTR4 asc "ENVIE"
pecheSTR5 asc "LUXURE"
pecheSTR6 asc "COLERE"
pecheSTR7 asc "PARESSE"
pecheSTR8 asc "suite"
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
*---
bloc_texte ds 2000
mot ds 128
*---
paragraphe ds nombre_paragraphes ; INDEX DE DES DEBUTS DES PARAGRAPHES
pointeur_paragraphes ds 2
paragraphes_lus ds 2
reference_objet ds nombre_paragraphes ; NUMERO DE L'OBJET ASSOCIE A CHAQUE PARAGRAPHE
reference_peche ds nombre_paragraphes ; NUMERO DU PECHE ASSOCIE A CHAQUE PARAGRAPHE
FIN_DATA = *
*--- Sound files
* SNDxy.SND where x is the scene, y the file index (0..9)

View File

@ -90,12 +90,10 @@ load_texte
lda [3]
sta ptrTEXTES
sta proREAD+4
stal $300
ldy #2
lda [3],y
sta ptrTEXTES+2
sta proREAD+6
stal $302
pld
pla
pla
@ -419,14 +417,15 @@ vigil
* TEST_FIN - OK
*-----------------------
teste_fin lda paragraphes_lus
sec
sbc pointeur_paragraphes
cmp #1
bne tf_99
jmp the_end
teste_fin
* lda paragraphes_lus
* sec
* sbc pointeur_paragraphes
* cmp #1
* bne tf_99
*
* jmp the_end
*
tf_99 rts
*-----------------------
@ -434,36 +433,36 @@ tf_99 rts
*-----------------------
demande_objet
ldx #1
]lp lda reference_peche-1,x
and #$ff
cmp #8
beq do_1
lda paragraphe_lu-1,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
* 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
@ -508,30 +507,14 @@ recherche_references
affiche_image
rts
*-----------------------
* SAUVEGARDE - OK
*-----------------------
* sauvegarde -> doSAVE
sauvegarde
rts
*-----------------------
* CHARGEMENT - OK
*-----------------------
* chargement -> doLOAD
chargement
rts
*-----------------------
* THE_END - OK
*-----------------------
* the_end
the_end
@cree_fenetre #9;pointeur_paragraphes
jsr pre_scrolling
* @cree_fenetre #9;pointeur_paragraphes
* jsr pre_scrolling
PushWord #0
_ClearScreen
@ -546,16 +529,6 @@ the_end
* pre_scrolling
pre_scrolling
sep #$20
ldx paragraphe
lda #TRUE
sta paragraphe_lu,x
rep #$20
inc paragraphes_lus
* LOGO
rts
*-----------------------
@ -610,78 +583,29 @@ laPREZ jmp presentation
init PushWord #$ffff
_ClearScreen
jsr init_resolution
jsr mouse_off
jmp init_routines
rts
*-----------------------
* INIT2 - OK
*-----------------------
init2 jsr init_objets
jsr init_peches
jsr init_icones
jsr init_indicateurs
jsr init_fenetres
jsr init_souris
jsr load_texte ; au lieu d'init_texte
jsr chargement
jmp mouse_on
init2
ldx #FIN_DATA-DEBUT_DATA
]lp stz fgTHEEND,x
dex
bne ]lp
*-----------------------
* INIT_RESOLUTION - OK
*-----------------------
init_resolution
rts
*-----------------------
* INIT_INDICATEURS - OK
*-----------------------
* init_indicateurs
init_indicateurs
ldx #0 ; l'indicateur 0 est toujours vrai
sep #$20
ldx #0
]lp stz indicateurTEXT,x
stz indicateur,x
inx
cpx #nombre_indicateurs
bcc ]lp
stz pointeur_indicateurs
ldx #0
]lp stz paragraphe_lu,x
stz indicateur_paragraphes,x
stz indicateur_paragraphes_prealables,x
inx
cpx #nombre_paragraphes
bcc ]lp
ldx #0
lda #TRUE
sta indicateur,x
rep #$20
rts
*-----------------------
* INIT_OBJETS - OK
*-----------------------
* init_objets
init_objets
stz ancien_objet
rts
*-----------------------
* INIT_PECHES - OK
*-----------------------
* init_peches
init_peches
rts
jsr init_icones
jsr init_souris
jsr load_texte
jsr init_texte
jmp mouse_on
*-----------------------
* INIT_ICONES - OK
@ -689,29 +613,10 @@ init_peches
* init_icones
init_icones
PushWord #0
_ClearScreen
@loadfile #pFOND;ptrFOND
@loadfile #pICONES;ptrICONES
rts
*-----------------------
* INIT_ROUTINES - OK
*-----------------------
* init_routines
init_routines
rts
*-----------------------
* INIT_FENETRES - OK
*-----------------------
* init_fenetres
init_fenetres
rts
*-----------------------
* INIT_SOURIS - OK
*-----------------------
@ -723,49 +628,246 @@ init_souris
rts
*-----------------------
* DATAS_INIT - OK
*-----------------------
* datas_init
datas_init
rts
*-----------------------
* INIT_TEXTE - OK
* INIT_TEXTE
*-----------------------
* init_texte
init_texte
rts
lda ptrTEXTES
sta Debut
lda ptrTEXTES+2
sta Debut+2
*-----------------------
* INIT_INDICATEURS_TEXTE
*-----------------------
* init_indicateurs_texte
init_indicateurs_texte
ldx #1
sep #$20
ldx #0
]lp stz paragraphe,x
]lp lda [Debut] ; un paragraphe dŽbute toujours par *
it_1 cmp #'*'
beq it_ok
jsr it_next
bra it_1
it_ok jsr it_objpec ; enregistre le *
jsr it_condit ; le &, condition
jsr it_conseq ; le =, consequence
jsr it_texte ; le pointeur du texte
inx
cpx #nombre_paragraphes
bcc ]lp
beq ]lp
rep #$20
rts
* paragraphe%(1)=0
mx %10
*--- * - objet + peche (tjs 2)
it_objpec jsr it_next
sec
sbc #'0'
sta objet,x
jsr it_next
sec
sbc #'0'
sta peche,x
jmp it_return
*--- & - condition
it_condit jsr it_next
sec
sbc #'0'
sta condition,x
jsr it_next
cmp #' '
beq it_condit1 ; c'Žtait bien une unitŽ
cmp #chrRET
beq it_condit1
sec ; c'Žtait une dizaine
sbc #'0'
clc
adc #10
sta condition,x
it_condit1 jmp it_return
*--- =
it_conseq jsr it_next
sec
sbc #'0'
sta consequence,x
jsr it_next
cmp #' '
beq it_conseq1 ; c'Žtait bien une unitŽ
cmp #chrRET
beq it_conseq1
sec ; c'Žtait une dizaine
sbc #'0'
clc
adc #10
sta consequence,x
it_conseq1 ; fall into it_return
*--- positionnne juste apr<EFBFBD>s un return
it_return lda [Debut]
]lp cmp #chrRET
beq it_return1
jsr it_next
bra ]lp
it_return1 ; fall into it_next
*--- next value
it_next inc Debut
bne it_next1
inc Debut+1
bne it_next1
inc Debut+2
it_next1 lda [Debut]
rts
*--- adresse du texte
it_texte rep #$20
txa
asl
asl
tay
lda Debut
sta texteDEBUT,y
lda Debut+2
sta texteDEBUT+2,y
sep #$20
rts
mx %00
*-----------------------
* TEST_OBJETS
*-----------------------
* test_objets = affiche les objets possibles
test_objets stz textes_encore_presents
sep #$30
ldx #1
]lp stz icone_objets,x
stz visibilite,x
inx
cpx #nombre_objets
bcc ]lp
beq ]lp
ldx #1
]lp lda deja_lu,x
cmp #FALSE
bne to_1
ldy condition,x
lda indicateur,y
cmp #TRUE
bne to_1
ldy objet,x
lda #TRUE
sta visibilite,y
sta textes_encore_presents
to_1 inx
cpx #nombre_paragraphes
bcc ]lp
beq ]lp
stz pointeur_paragraphes
stz paragraphes_lus
rep #$30
* LOGO
* LoGo - Voir comment on traite la fin
rts
*-----------------------
*
* TEST_PECHES
*-----------------------
* test_peches = affiche les peches possibles
lookindex
test_peches sep #$30
ldx #1
]lp stz icone_peches,x
inx
cpx #nombre_peches
bcc ]lp
beq ]lp
ldx #1
]lp lda objet,x
cmp objet_selectionne
bne tp_1
lda deja_lu,x
cmp #FALSE
bne tp_1
ldy condition,x
lda indicateur,y
cmp #TRUE
bne tp_1
ldy peche,x
lda #TRUE
sta icone_peches-1,y
tp_1 inx
cpx #nombre_paragraphes
bcc ]lp
beq ]lp
rep #$30
rts
*-----------------------
* RETOUR
*-----------------------
* retour = le texte est lu
retour sep #$30
ldx texte_selectionne
lda #TRUE
sta deja_lu,x
ldy consequence,x
sta indicateur,y
rep #$30
rts
*-----------------------
* AIGUILLAGE
*-----------------------
* aiguillage = le texte ˆ afficher
aiguillage stz texte_selectionne
sep #$30
ldx #1
]lp lda objet,x
cmp objet_selectionne
bne ai_next
lda peche,x
cmp peche_selectionne
bne ai_next
lda deja_lu,x
cmp #FALSE
bne ai_next
ldy condition,x
lda indicateur,y
cmp #TRUE
bne ai_next
lda texte_selectionne
bne ai_next
stx texte_selectionne
ai_next inx
cpx #nombre_paragraphes
bcc ]lp
beq ]lp
rep #$30
rts
*-----------------------
@ -791,8 +893,9 @@ presentation
lda index
inc
cmp #nombre_objets+1
cmp #nombre_objets
bcc ]lp
beq ]lp
rts
*---
@ -1093,8 +1196,7 @@ show_screen2
*-----------------------
* mouse_on
mouse_on
_ShowCursor
mouse_on _ShowCursor
rts
*-----------------------
@ -1102,8 +1204,7 @@ mouse_on
*-----------------------
* mouse_off
mouse_off
_HideCursor
mouse_off _HideCursor
rts
*-----------------------

View File

@ -124,6 +124,11 @@ fgRESTART = 2
tdc
sta myDP
lda #MES_DONNEES
stal $300
lda #^MES_DONNEES
stal $302
*--- Version du systeme
jsl GSOS
@ -261,7 +266,7 @@ noSOUND _HideMenuBar
PushWord #$800e
_NewWindow2
PullLong wiMAIN
*----------------------------------------
* INITIALISATIONS
*----------------------------------------
@ -488,38 +493,16 @@ loadALL jsl GSOS
sta proREADGAME+2
sta proCLOSE+2
jsr loadPART
jsl GSOS
dw $2012
adrl proREADGAME
jsl GSOS
dw $2014
adrl proCLOSE
loadKO99 rts
*---
loadPART ldx #2
ldy #pointeur_indicateurs
jsr loadIT
ldx #2
ldy #pointeur_paragraphes
jsr loadIT
ldx #nombre_indicateurs
ldy #indicateur
jsr loadIT
ldx #nombre_paragraphes
ldy #paragraphe_lu
loadIT stx proREADGAME+8
sty proREADGAME+4
jsl GSOS
dw $2012
adrl proREADGAME
rts
*--- Enregistre le fichier de sauvegarde
saveALL jsl GSOS
@ -540,7 +523,9 @@ saveALL jsl GSOS
sta proWRITEGAME+2
sta proCLOSE+2
jsr savePART
jsl GSOS
dw $2013
adrl proWRITEGAME
jsl GSOS
dw $2014
@ -548,30 +533,6 @@ saveALL jsl GSOS
saveKO99 rts
*---
savePART ldx #2
ldy #pointeur_indicateurs
jsr saveIT
ldx #2
ldy #pointeur_paragraphes
jsr saveIT
ldx #nombre_indicateurs
ldy #indicateur
jsr saveIT
ldx #nombre_paragraphes
ldy #paragraphe_lu
saveIT stx proWRITEGAME+8
sty proWRITEGAME+4
jsl GSOS
dw $2013
adrl proWRITEGAME
rts
*----------------------------------- Restart
doRESTART
@ -1449,15 +1410,15 @@ proOPENGAME
proREADGAME
dw 4 ; 0 - pcount
ds 2 ; 2 - ref_num
adrl pGAME ; 4 - data_buffer
ds 4 ; 8 - request_count
adrl DEBUT_DATA ; 4 - data_buffer
adrl FIN_DATA-DEBUT_DATA ; 8 - request_count
ds 4 ; C - transfer_count
proWRITEGAME
dw 5 ; 0 - pcount
ds 2 ; 2 - ref_num
adrl pGAME ; 4 - data_buffer (we are in same bank)
ds 4 ; 8 - request_count
adrl DEBUT_DATA ; 4 - data_buffer (we are in same bank)
adrl FIN_DATA-DEBUT_DATA ; 8 - request_count
ds 4 ; C - transfer_count
dw 1 ; cache_priority

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long