desktop powa

This commit is contained in:
Antoine Vignau 2024-02-05 11:39:51 +01:00
parent d9ffb921dc
commit 0eca7837a8
6 changed files with 4530 additions and 4274 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -103,7 +103,9 @@ condition ds nombre_paragraphes+1
consequence ds nombre_paragraphes+1
deja_lu ds nombre_paragraphes+1
texteDEBUT ds 4
ds nombre_paragraphes*4 ; un long
ds nombre_paragraphes*4 ; long
texteLEN ds 4
ds nombre_paragraphes*4 ; long
MES_DONNEES = * ; on dŽmarre l'index ˆ 1...
@ -123,6 +125,37 @@ textes_encore_presents ds 2 ; false or true
FIN_DATA = *
*--- The Window
theWINDOW dw $0050
dw %00000000_00100000 ; visible only
ds 4
ds 4
ds 2
ds 2
ds 2
ds 2
ds 4
ds 2
ds 2
ds 2
ds 2
ds 2
ds 2
ds 2
ds 2
ds 2
ds 2
ds 4
ds 2
ds 4
ds 4
ds 4
winRECT ds 8 ; content rect
adrl $ffffffff
adrl teCONTROL
dw %00000000_00000000
*--- The Text Edit control
haCONTROL ds 4 ; handle to the control

View File

@ -508,7 +508,8 @@ it_1 cmp #'*'
beq it_ok
jsr it_next
bra it_1
it_ok jsr it_objpec ; enregistre le *
it_ok jsr it_fin ; le pointeur de fin
jsr it_objpec ; enregistre le *
jsr it_condit ; le &, condition
jsr it_conseq ; le =, consequence
jsr it_texte ; le pointeur du texte
@ -590,6 +591,26 @@ it_next inc Debut
it_next1 lda [Debut]
rts
*--- fin du texte (adresse d'*)
it_fin cpx #1
bne it_fin1
rts
it_fin1 rep #$20
txa
asl
asl
tay
lda Debut
sec
sbc texteDEBUT-4,y
dec
sta texteLEN-4,y
sep #$20
rts
mx %00
*--- adresse du texte
it_texte rep #$20
@ -657,7 +678,9 @@ to_2 plx
cpx #nombre_objets
bcc ]lp
beq ]lp
rts
jmp setDESKTOP
* rts
*-----------------------
* TEST_PECHES
@ -710,9 +733,9 @@ do_2 plx
cpx #nombre_peches
bcc ]lp
beq ]lp
rts
rts
jmp setDESKTOP
* rts
*-----------------------
* RETOUR
@ -998,7 +1021,7 @@ carreRECT ds 2 ; y0
ds 2 ; y0+12
*-----------------------
* CREE_FENETRE
* CREE_FENETRE - OK
*-----------------------
* cree_fenetre(objet%,paragraphe%)
* A : objet
@ -1008,27 +1031,34 @@ cree_fenetre
lda #$0fff
stal $019e1e
stal $e19e1e
* 1. les coordonnees de la fenetre
lda objet_selectionne
asl
tax
lda fenetre_y,x
sta fenetreRECT
sta teRECT
sta winRECT
lda fenetre_x,x
sta fenetreRECT+2
sta teRECT+2
sta winRECT+2
lda fenetre_yy,x
sta fenetreRECT+4
sta teRECT+4
sta winRECT+4
lda fenetre_xx,x
sta fenetreRECT+6
sta teRECT+6
sta winRECT+6
* 2. on en deduit les dimensions du controle
lda fenetre_yy,x
sec
sbc fenetre_y,x
sta teRECT+4
PushLong #fenetreRECT
PushWord #$0000
PushWord #$0000
_SpecialRect
lda fenetre_xx,x
sec
sbc fenetre_x,x
sta teRECT+6
* 3. on ajoute le texte et sa longueur
lda texte_selectionne
asl
@ -1039,21 +1069,21 @@ cree_fenetre
lda texteDEBUT+2,x
sta teTEXT+2
lda texteDEBUT+4,x
sec
sbc teTEXT
lda texteLEN,x
sta teLEN
lda texteDEBUT+6,x
sbc teTEXT+2
sta teLEN+2
* 4. on affiche le tout
PushLong #0
PushLong wiMAIN
PushWord #0
PushLong #teCONTROL
_NewControl2
PullLong haCONTROL
PushLong #0
PushLong #wMAIN
PushLong #PAINTMAIN
PushLong #0
PushWord #refIsPointer
PushLong #theWINDOW
PushWord #$800e
_NewWindow2
PullLong wiMAIN
rts
*-----------------------

View File

@ -196,7 +196,18 @@ okMEM1 sty ptrIMAGE
sty ptrUNPACK
stx ptrUNPACK+2
*--- 32KB pour le pseudo desktop
pha
pha
PushLong #$7d08
PushWord myID
PushWord #%11000000_00000000
PushLong #0
_NewHandle
PullLong haDESKTOP
*--- Chargement des outils
pha
@ -248,25 +259,17 @@ noSOUND _HideMenuBar
_InitCursor
PushLong #0
PushWord #5 ; SetDeskPat
PushWord #$4000
PushWord #$0000
_Desktop
pla
pla
pha
pha
PushLong #0
PushLong #wMAIN
PushLong #PAINTMAIN
PushLong #0
PushWord #refIsResource
PushLong #wMAIN
PushWord #$800e
_NewWindow2
PullLong wiMAIN
* pha
* pha
* PushLong #0
* PushLong #wMAIN
* PushLong #PAINTMAIN
* PushLong #0
* PushWord #refIsResource
* PushLong #wMAIN
* PushWord #$800e
* _NewWindow2
* PullLong wiMAIN
*----------------------------------------
* INITIALISATIONS
@ -1058,6 +1061,31 @@ LZ4_End sty lenDATA ; Y = length of unpacked data
lenDATA ds 4
*-----------------------------------
* SET THE DESKTOP
*-----------------------------------
setDESKTOP _HideCursor
PushLong ptrSCREEN
PushLong haDESKTOP
PushLong #$7d08
_PtrToHand
_ShowCursor
* PushWord #1 ; add message of desktop type
* PushWord #2
* PushLong haDESKTOP
* _MessageCenter
* pha
* pha
* PushWord #3 ; SetDesktop
* PushLong haDESKTOP
* _Desktop
* pla
* pla
rts
*-----------------------------------
* SAVE THE SHR SCREEN
*-----------------------------------
@ -1154,6 +1182,8 @@ ptrUNPACK ds 4 ; $0000: where the background picture is laoded
ptrTEXTES ds 4 ; les pointeurs des textes
haDESKTOP ds 4 ; handle du desktop
haBEAT ds 4
ptrBEAT ds 4