2018-01-10 16:34:57 +00:00
|
|
|
|
NEW
|
2019-07-30 08:57:25 +00:00
|
|
|
|
AUTO 3,1
|
2018-01-10 16:34:57 +00:00
|
|
|
|
*--------------------------------------
|
2021-06-03 17:43:28 +00:00
|
|
|
|
WND.Init >PUSHW L.DEVNAME.GFX
|
|
|
|
|
>PUSHBI 0
|
2019-05-05 17:15:37 +00:00
|
|
|
|
>SYSCALL2 open
|
2018-05-16 06:02:57 +00:00
|
|
|
|
bcs .9
|
2020-09-02 15:47:23 +00:00
|
|
|
|
|
2020-09-06 12:24:04 +00:00
|
|
|
|
sta WND.Screen+S.OBJ.hPARENT
|
2020-09-02 15:47:23 +00:00
|
|
|
|
|
2019-01-09 16:42:20 +00:00
|
|
|
|
>LDYA L.DCB.GFX
|
|
|
|
|
>STYA IOCTL+S.IOCTL.BUFPTR
|
2021-05-04 17:31:21 +00:00
|
|
|
|
lda #S.IOCTL.S.GETDCB
|
|
|
|
|
sta IOCTL+S.IOCTL.S
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2020-09-06 12:24:04 +00:00
|
|
|
|
>PUSHB WND.Screen+S.OBJ.hPARENT
|
2019-01-09 16:42:20 +00:00
|
|
|
|
>PUSHBI IOCTL.STATUS
|
2020-09-02 15:47:23 +00:00
|
|
|
|
>PUSHW L.IOCTL
|
2019-05-05 17:15:37 +00:00
|
|
|
|
>SYSCALL2 IOCTL
|
2020-09-06 12:24:04 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.9 rts
|
2019-01-10 16:26:58 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-26 06:38:50 +00:00
|
|
|
|
WND.Setup
|
2020-10-20 06:01:04 +00:00
|
|
|
|
* stz WND.Stack.Top
|
2022-10-18 05:56:59 +00:00
|
|
|
|
* stz MENU.Stack.Cnt
|
2020-10-08 15:33:38 +00:00
|
|
|
|
|
|
|
|
|
>LDYA DCB.GFX+S.DCB.GFX.W
|
2020-09-06 12:24:04 +00:00
|
|
|
|
>STYA WND.Screen+S.OBJ.W
|
2019-01-10 16:26:58 +00:00
|
|
|
|
>STYA WND.Desktop+S.OBJ.W
|
|
|
|
|
>STYA WND.SysBar+S.OBJ.W
|
2022-12-07 07:02:29 +00:00
|
|
|
|
cpy #0
|
|
|
|
|
bne .1
|
2020-09-06 12:24:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
dec
|
2020-09-06 12:24:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.1 dey
|
|
|
|
|
>STYA CLIP.Screen+S.RECT.X2
|
|
|
|
|
*--------------------------------------
|
2019-01-09 06:58:19 +00:00
|
|
|
|
lda DCB.GFX+S.DCB.GFX.H
|
2020-09-06 12:24:04 +00:00
|
|
|
|
sta WND.Screen+S.OBJ.H
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda SYSFON.Hp2
|
|
|
|
|
sta WND.SysBar+S.OBJ.H
|
|
|
|
|
|
|
|
|
|
lda DCB.GFX+S.DCB.GFX.H
|
2018-05-16 06:02:57 +00:00
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc SYSFON.Hp2
|
2019-01-10 16:26:58 +00:00
|
|
|
|
sta WND.Desktop+S.OBJ.H
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2020-10-06 06:27:35 +00:00
|
|
|
|
sta WND.SysBar+S.OBJ.Y1
|
2020-10-20 06:01:04 +00:00
|
|
|
|
sta RECT.SysBut+S.RECT.Y1
|
|
|
|
|
sta RECT.SysWNDs+S.RECT.Y1
|
|
|
|
|
sta RECT.SysClk+S.RECT.Y1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
clc
|
|
|
|
|
adc SYSFON.Hp1
|
|
|
|
|
|
2020-10-20 06:01:04 +00:00
|
|
|
|
sta RECT.SysBut+S.RECT.Y2
|
|
|
|
|
sta RECT.SysWNDs+S.RECT.Y2
|
|
|
|
|
sta RECT.SysClk+S.RECT.Y2
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sta CLIP.Screen+S.RECT.Y2
|
2020-09-02 15:47:23 +00:00
|
|
|
|
|
2020-09-06 12:24:04 +00:00
|
|
|
|
>LDYA L.WND.Screen
|
2020-10-06 06:27:35 +00:00
|
|
|
|
>STYA WND.Desktop+S.OBJ.hPARENT
|
|
|
|
|
>STYA WND.SysBar+S.OBJ.hPARENT
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
|
|
|
|
* >LDYA L.WND.Screen
|
2019-01-10 16:26:58 +00:00
|
|
|
|
jsr OBJ.SetX2Y2
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2019-01-10 16:26:58 +00:00
|
|
|
|
>LDYA L.WND.Desktop
|
|
|
|
|
jsr OBJ.SetX2Y2
|
2020-09-02 15:47:23 +00:00
|
|
|
|
|
2019-01-10 16:26:58 +00:00
|
|
|
|
>LDYA L.WND.SysBar
|
2020-09-05 13:38:04 +00:00
|
|
|
|
jsr OBJ.SetX2Y2
|
2022-12-07 07:02:29 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-08 15:33:38 +00:00
|
|
|
|
>LDYA L.WND.SysBar.2osX
|
|
|
|
|
ldx hSYSFON
|
|
|
|
|
jsr FON.GetTextSize
|
|
|
|
|
|
|
|
|
|
lda CB.Cache+S.CB.SrcW
|
|
|
|
|
clc
|
2022-12-07 07:02:29 +00:00
|
|
|
|
adc #25 4 + BM width(16) + 1 + "2osX" + 4
|
2020-10-20 06:01:04 +00:00
|
|
|
|
sta RECT.SysBut+S.RECT.X2
|
|
|
|
|
sta RECT.SysWNDs+S.RECT.X1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-20 06:01:04 +00:00
|
|
|
|
>LDYA L.WND.SysBar.Clk
|
|
|
|
|
ldx hSYSFON
|
|
|
|
|
jsr FON.GetTextSize
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2020-10-20 06:01:04 +00:00
|
|
|
|
lda CB.Cache+S.CB.SrcW
|
2022-12-07 07:02:29 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #2 1 + "00:00" + 1
|
|
|
|
|
sta CB.Cache+S.CB.SrcW
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2020-10-20 06:01:04 +00:00
|
|
|
|
lda DCB.GFX+S.DCB.GFX.W
|
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc CB.Cache+S.CB.SrcW
|
2020-10-20 06:01:04 +00:00
|
|
|
|
sta RECT.SysWNDs+S.RECT.X2
|
|
|
|
|
sta RECT.SysClk+S.RECT.X1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-10-20 06:01:04 +00:00
|
|
|
|
lda DCB.GFX+S.DCB.GFX.W+1
|
|
|
|
|
sbc #0
|
|
|
|
|
sta RECT.SysWNDs+S.RECT.X2+1
|
|
|
|
|
sta RECT.SysClk+S.RECT.X1+1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2020-10-20 06:01:04 +00:00
|
|
|
|
lda DCB.GFX+S.DCB.GFX.W
|
2021-06-05 15:48:54 +00:00
|
|
|
|
clc
|
2020-10-20 06:01:04 +00:00
|
|
|
|
sbc #0
|
|
|
|
|
sta RECT.SysClk+S.RECT.X2
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda DCB.GFX+S.DCB.GFX.W+1
|
2020-10-20 06:01:04 +00:00
|
|
|
|
sbc #0
|
|
|
|
|
sta RECT.SysClk+S.RECT.X2+1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2020-10-06 06:27:35 +00:00
|
|
|
|
jsr SYSBAR.Show
|
|
|
|
|
|
2019-01-10 16:26:58 +00:00
|
|
|
|
rts
|
2018-05-16 06:02:57 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-06 12:24:04 +00:00
|
|
|
|
WND.Quit lda WND.Screen+S.OBJ.hPARENT
|
2019-01-08 16:29:26 +00:00
|
|
|
|
beq .8
|
2020-09-06 12:24:04 +00:00
|
|
|
|
|
2019-01-08 16:29:26 +00:00
|
|
|
|
pha
|
|
|
|
|
>PUSHBI IOCTL.CLOSE
|
2019-06-07 15:02:51 +00:00
|
|
|
|
>PUSHWZ
|
2019-01-08 16:29:26 +00:00
|
|
|
|
pla
|
2019-05-05 17:15:37 +00:00
|
|
|
|
>SYSCALL2 IOCTL
|
2019-01-08 16:29:26 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.8 clc
|
2020-10-01 15:30:25 +00:00
|
|
|
|
WND.Quit.RTS rts
|
2018-01-10 16:34:57 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
* guiNewWnd(sFlags, iX1, iY1, iW, iH)
|
2020-09-08 15:31:41 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-18 05:56:59 +00:00
|
|
|
|
WND.New ldy WND.Stack.Top
|
2020-10-01 15:30:25 +00:00
|
|
|
|
cpy #WND.MAX
|
2022-11-02 06:54:30 +00:00
|
|
|
|
bcs .98
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
lda #S.OBJ.T.WND
|
2022-10-18 05:56:59 +00:00
|
|
|
|
jsr OBJ.New
|
2022-11-02 06:54:30 +00:00
|
|
|
|
bcs .99
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
* >STYA ZPObjPtr
|
|
|
|
|
phx
|
2020-10-01 15:30:25 +00:00
|
|
|
|
|
2020-09-08 15:31:41 +00:00
|
|
|
|
ldy #S.OBJ.H
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr OBJ.PullWordAtY
|
2020-10-26 16:32:51 +00:00
|
|
|
|
|
2020-09-08 15:31:41 +00:00
|
|
|
|
ldy #S.OBJ.W
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr OBJ.PullWordAtY
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-08 15:31:41 +00:00
|
|
|
|
ldy #S.OBJ.Y1
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr OBJ.PullWordAtY
|
2020-09-08 15:31:41 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.X1
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr OBJ.PullWordAtY
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2020-09-08 15:31:41 +00:00
|
|
|
|
>PULLA
|
2020-10-23 06:03:23 +00:00
|
|
|
|
bit #S.WND.F.RESIZE
|
|
|
|
|
beq .2
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ora #S.OBJ.F.BORDER
|
2020-10-23 06:03:23 +00:00
|
|
|
|
|
|
|
|
|
.2 ldy #S.OBJ.F
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta (ZPObjPtr),y
|
2020-09-08 15:31:41 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.PS.PID
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.hOWNER
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta (ZPObjPtr),y
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2020-10-06 06:27:35 +00:00
|
|
|
|
lda L.WND.Desktop
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ldx L.WND.Desktop+1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
ldy #S.OBJ.hPARENT
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr OBJ.SetAXAtY
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
lda L.WND.fPaint
|
|
|
|
|
ldx L.WND.fPaint+1
|
|
|
|
|
ldy #S.WND.fPaint
|
|
|
|
|
jsr OBJ.SetAXAtY
|
|
|
|
|
|
|
|
|
|
pla ID
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2020-09-08 15:31:41 +00:00
|
|
|
|
* clc
|
|
|
|
|
rts
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
|
|
|
|
.98 lda #E.OOH
|
|
|
|
|
|
|
|
|
|
.99 >POP 9
|
|
|
|
|
|
|
|
|
|
rts
|
2020-09-08 15:31:41 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
WND.SetMBar >PULLW ZPPtr1
|
|
|
|
|
|
|
|
|
|
jsr OBJ.PullHWND
|
|
|
|
|
|
|
|
|
|
>LDYA ZPPtr1
|
|
|
|
|
jsr MBAR.New
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
ldy #S.WND.pMBAR
|
|
|
|
|
sta (ZPWNDPtr),y
|
|
|
|
|
|
|
|
|
|
* clc
|
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.ClrStatus ldy #S.OBJ.S
|
|
|
|
|
eor #$ff
|
|
|
|
|
and (ZPWNDPtr),y
|
|
|
|
|
sta (ZPWNDPtr),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.SetStatus ldy #S.OBJ.S
|
|
|
|
|
ora (ZPWNDPtr),y
|
|
|
|
|
sta (ZPWNDPtr),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* ZPWNDPtr
|
|
|
|
|
* ZPObjPtr
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.AddChild.I ldy #S.OBJ.pChilds
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
ora ZPPtr1
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
lda ZPObjPtr+1
|
|
|
|
|
sta (ZPWNDPtr),y
|
|
|
|
|
dey
|
|
|
|
|
lda ZPObjPtr
|
|
|
|
|
sta (ZPWNDPtr),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 ldy #S.OBJ.pNext
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
tax
|
|
|
|
|
iny
|
|
|
|
|
ora (ZPPtr1),y
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
stx ZPPtr1
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.2 lda ZPObjPtr+1
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
dey
|
|
|
|
|
lda ZPObjPtr
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.Enter
|
|
|
|
|
WND.Leave
|
|
|
|
|
*--------------------------------------
|
2020-10-01 15:30:25 +00:00
|
|
|
|
WND.Destroy clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-11-02 06:54:30 +00:00
|
|
|
|
WND.Activate jsr OBJ.GetHWNDA
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
clc
|
|
|
|
|
WND.Activate.RTS
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.Bring2Front ldx WND.Stack.Idx
|
|
|
|
|
cpx WND.Stack.Top
|
|
|
|
|
beq WND.Activate.RTS
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
lda WND.Stack-1,x
|
|
|
|
|
pha
|
2020-09-08 15:31:41 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
.1 lda WND.Stack,x
|
|
|
|
|
sta WND.Stack-1,x
|
|
|
|
|
inx
|
|
|
|
|
cpx WND.Stack.Top
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
dec WND.Stack.Top
|
2020-09-08 15:31:41 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
.2 pla
|
2020-09-08 15:31:41 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
* guiShowWnd( hWND )
|
2020-09-08 15:31:41 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-26 06:38:50 +00:00
|
|
|
|
WND.Show sta WND.hWND
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>LDYA L.WND.Desktop
|
|
|
|
|
jsr CLIP.GetRect
|
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldx WND.Stack.Top
|
2022-11-02 06:54:30 +00:00
|
|
|
|
beq .1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
|
|
|
|
lda WND.Stack-1,x
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr OBJ.GetHWNDA
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
lda #S.WND.S.ACTIVE
|
|
|
|
|
jsr WND.ClrStatus
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
jsr WND.DrawTitleBar
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.1 lda WND.hWND
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldx WND.Stack.Top
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sta WND.Stack,x
|
2022-11-02 06:54:30 +00:00
|
|
|
|
inc WND.Stack.Top
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.Draw jsr OBJ.GetHWNDA Y,A = ZPWNDPtr
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr OBJ.SetX2Y2
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr WND.ResetInnerW
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
lda #S.WND.S.ACTIVE
|
|
|
|
|
jsr WND.SetStatus
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>LDYA ZPWNDPtr
|
|
|
|
|
ldx #1
|
|
|
|
|
jsr OBJ.DrawBorders
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.1 ldy #S.OBJ.Y1
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta Counter
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta Counter+1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldy #S.WND.pTITLE+1
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-13 19:05:38 +00:00
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.S
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-13 19:05:38 +00:00
|
|
|
|
and #S.WND.F.MOVE+S.WND.F.CLOSE+S.WND.F.MIN+S.WND.F.MAX
|
|
|
|
|
beq .3
|
2020-09-08 15:31:41 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
.2 lda SYSFON.Hp2
|
|
|
|
|
jsr WND.Add2Counter
|
2020-09-08 15:31:41 +00:00
|
|
|
|
|
2020-10-02 14:57:05 +00:00
|
|
|
|
ldy #S.WND.TBarY2
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr WND.SetAXAtY
|
2020-09-29 15:37:26 +00:00
|
|
|
|
|
|
|
|
|
lda #S.WND.S.HASTBAR
|
2020-09-13 19:05:38 +00:00
|
|
|
|
jsr WND.SetStatus
|
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
jsr WND.DrawTitleBar
|
2020-10-26 06:38:50 +00:00
|
|
|
|
bcs .9
|
2020-10-02 05:59:41 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
.3 ldy #S.WND.pMBAR
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2022-10-25 06:05:54 +00:00
|
|
|
|
beq .4
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ldy #S.WND.MBarY1
|
|
|
|
|
jsr WND.SetCounterAtY
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
lda SYSFON.Hp1
|
|
|
|
|
jsr WND.Add2Counter
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldy #S.WND.MBarY2
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr WND.SetAXAtY
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2020-09-29 15:37:26 +00:00
|
|
|
|
lda #S.WND.S.HASMBAR
|
2020-09-15 14:48:35 +00:00
|
|
|
|
jsr WND.SetStatus
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldy #S.WND.pMBAR
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
jsr MBAR.Draw
|
2022-12-07 07:02:29 +00:00
|
|
|
|
bcs .9
|
2020-10-02 05:59:41 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.4 jsr CB.GetBuf
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
ldy #S.WND.InnerY1
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr WND.SetCounterAtY
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldy #S.WND.pSTATUS+1
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-15 06:12:52 +00:00
|
|
|
|
beq .8
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
lda SYSFON.H
|
2022-10-25 06:05:54 +00:00
|
|
|
|
jsr WND.Add2Counter
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldy #S.WND.InnerY2
|
2020-10-02 05:59:41 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2022-11-02 06:54:30 +00:00
|
|
|
|
clc +1
|
2022-10-26 06:12:16 +00:00
|
|
|
|
sbc SYSFON.H
|
2022-10-25 06:05:54 +00:00
|
|
|
|
sta (ZPWNDPtr),y
|
2022-11-02 06:54:30 +00:00
|
|
|
|
tax
|
2020-10-02 05:59:41 +00:00
|
|
|
|
iny
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sbc #0
|
|
|
|
|
sta (ZPWNDPtr),y
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
inx
|
|
|
|
|
bne .5
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
inc
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.5 ldy #S.WND.SBarY1+1
|
|
|
|
|
sta (ZPWNDPtr),y
|
|
|
|
|
dey
|
|
|
|
|
txa
|
|
|
|
|
sta (ZPWNDPtr),y
|
2020-10-02 05:59:41 +00:00
|
|
|
|
|
2020-09-29 15:37:26 +00:00
|
|
|
|
lda #S.WND.S.HASSBAR
|
2020-09-15 14:48:35 +00:00
|
|
|
|
jsr WND.SetStatus
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
jsr WND.DrawStatusBar
|
2020-10-02 05:59:41 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-06 06:27:35 +00:00
|
|
|
|
.8 ldy #S.WND.InnerH
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sec
|
2022-10-25 06:05:54 +00:00
|
|
|
|
sbc Counter
|
2020-10-06 06:27:35 +00:00
|
|
|
|
sta (ZPWNDPtr),y
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2020-10-06 06:27:35 +00:00
|
|
|
|
iny
|
|
|
|
|
lda (ZPWNDPtr),y
|
2022-10-25 06:05:54 +00:00
|
|
|
|
sbc Counter+1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
sta (ZPWNDPtr),y
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr CB.FlushBuf
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
|
|
|
|
lda WND.hWND
|
|
|
|
|
pha
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jmp WND.Paint1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.9 rts
|
2020-09-08 15:31:41 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
WND.ResetInnerW ldy #S.OBJ.X1
|
|
|
|
|
ldx #S.WND.InnerX1
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr .1
|
2020-10-01 15:30:25 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ldy #S.OBJ.Y1
|
|
|
|
|
ldx #S.WND.InnerY1
|
|
|
|
|
|
2020-10-01 15:30:25 +00:00
|
|
|
|
ldy #S.OBJ.X2
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ldx #S.WND.InnerX2
|
|
|
|
|
jsr .1
|
2020-10-01 15:30:25 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ldy #S.OBJ.Y2
|
|
|
|
|
ldx #S.WND.InnerY2
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr .1
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.W
|
|
|
|
|
ldx #S.WND.InnerW
|
|
|
|
|
jsr .1
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.H
|
|
|
|
|
ldx #S.WND.InnerH
|
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.1 lda (ZPWNDPtr),y
|
|
|
|
|
pha
|
2020-10-01 15:30:25 +00:00
|
|
|
|
iny
|
|
|
|
|
lda (ZPWNDPtr),y
|
2022-11-02 06:54:30 +00:00
|
|
|
|
phx
|
|
|
|
|
ply
|
2020-10-26 16:32:51 +00:00
|
|
|
|
iny
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta (ZPWNDPtr),y
|
2020-10-26 16:32:51 +00:00
|
|
|
|
dey
|
2022-11-02 06:54:30 +00:00
|
|
|
|
pla
|
|
|
|
|
sta (ZPWNDPtr),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.Add2Counter clc
|
|
|
|
|
adc Counter
|
|
|
|
|
sta Counter
|
|
|
|
|
bcc .8
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
inc Counter+1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.8 ldx Counter+1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
rts
|
2022-11-02 06:54:30 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.SetCounterAtY
|
|
|
|
|
lda Counter
|
|
|
|
|
ldx Counter+1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.SetAXAtY sta (ZPWNDPtr),y
|
|
|
|
|
iny
|
|
|
|
|
txa
|
|
|
|
|
sta (ZPWNDPtr),y
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
|
|
|
|
WND.SetAXAtY.9 rts
|
2020-09-10 15:28:59 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
WND.DrawTitleBar
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr CB.GetBuf
|
|
|
|
|
bcs WND.SetAXAtY.9
|
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
lda #S.CB.CMD.FILLRECT
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.CMD
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2020-09-13 19:05:38 +00:00
|
|
|
|
lda #S.CB.OP.SET
|
2020-10-26 06:38:50 +00:00
|
|
|
|
sta CB.Cache+S.CB.OP
|
2020-09-13 19:05:38 +00:00
|
|
|
|
lda #S.CB.M.C16
|
2020-10-26 06:38:50 +00:00
|
|
|
|
sta CB.Cache+S.CB.M
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ldx PREFS.TBarColorI
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2020-09-15 14:48:35 +00:00
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
and #S.WND.S.ACTIVE
|
|
|
|
|
beq .10
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ldx PREFS.TBarColorA
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
.10 stx CB.Cache+S.CB.COLOR
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldy #S.OBJ.X1+5 X1,Y1,X2
|
|
|
|
|
ldx #5
|
2020-09-14 14:31:41 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
.11 lda (ZPWNDPtr),y
|
|
|
|
|
sta CB.Cache+S.CB.X1,x
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .11
|
2020-09-14 14:31:41 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.Y1
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.Y1
|
2020-09-14 14:31:41 +00:00
|
|
|
|
sec
|
|
|
|
|
adc SYSFON.H
|
2020-10-26 06:38:50 +00:00
|
|
|
|
sta CB.Cache+S.CB.Y2
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
2020-09-14 14:31:41 +00:00
|
|
|
|
iny
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.Y1+1
|
2020-09-14 14:31:41 +00:00
|
|
|
|
adc #0
|
2020-10-26 06:38:50 +00:00
|
|
|
|
sta CB.Cache+S.CB.Y2+1
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
2022-10-18 05:56:59 +00:00
|
|
|
|
jsr CB.Cache2CBBuf
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr CB.IncY1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2020-09-14 14:31:41 +00:00
|
|
|
|
* TOP LEFT ICON
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ldy #S.WND.ICON+1
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-13 19:05:38 +00:00
|
|
|
|
tax
|
|
|
|
|
dey
|
2020-09-15 14:48:35 +00:00
|
|
|
|
ora (ZPWNDPtr),y
|
2020-09-13 19:05:38 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
>LDYA L.BM.Apple
|
2020-09-13 19:05:38 +00:00
|
|
|
|
bra .2
|
|
|
|
|
|
2020-09-15 14:48:35 +00:00
|
|
|
|
.1 lda (ZPWNDPtr),y
|
2020-10-26 06:38:50 +00:00
|
|
|
|
tay
|
|
|
|
|
txa
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.2 jsr DRAW.yaBM
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
jsr WND.DrawTitleBarText
|
2020-09-14 14:31:41 +00:00
|
|
|
|
bcs .9
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
* TOP RIGHT ICONS
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldy #S.OBJ.X2
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-14 14:31:41 +00:00
|
|
|
|
sec
|
2020-10-26 06:38:50 +00:00
|
|
|
|
sbc #48
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.X1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
|
2020-09-14 14:31:41 +00:00
|
|
|
|
iny
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-14 14:31:41 +00:00
|
|
|
|
sbc #0
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.X1+1
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
bit #S.WND.F.MIN
|
|
|
|
|
beq .3
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldx #BM.ID.MIN
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr DRAW.xBM
|
2020-09-14 14:31:41 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.3 lda CB.Cache+S.CB.X1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #16
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.X1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
bcc .31
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
|
|
|
|
inc CB.Cache+S.CB.X1+1
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
.31 ldy #S.OBJ.F
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
bit #S.WND.F.MAX
|
2020-09-14 14:31:41 +00:00
|
|
|
|
beq .4
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldx #BM.ID.MAX
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr DRAW.xBM
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.4 lda CB.Cache+S.CB.X1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #16
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.X1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
bcc .41
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
inc CB.Cache+S.CB.X1+1
|
2020-09-14 14:31:41 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
.41 ldy #S.OBJ.F
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-10-26 06:38:50 +00:00
|
|
|
|
bit #S.WND.F.CLOSE
|
2020-09-14 14:31:41 +00:00
|
|
|
|
beq .8
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldx #BM.ID.CLOSE
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr DRAW.xBM
|
2020-09-14 14:31:41 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.8 jmp CB.FlushBuf
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
WND.DrawTitleBarText
|
2022-10-18 05:56:59 +00:00
|
|
|
|
ldy #S.WND.pTITLE
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-10-01 15:30:25 +00:00
|
|
|
|
pha
|
2020-09-13 19:05:38 +00:00
|
|
|
|
iny
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-10-01 15:30:25 +00:00
|
|
|
|
ply
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldx hSYSFON
|
2020-10-01 15:30:25 +00:00
|
|
|
|
jsr FON.GetTextSize
|
2020-09-13 19:05:38 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda PREFS.XMargin
|
|
|
|
|
asl
|
|
|
|
|
* clc
|
|
|
|
|
adc CB.Cache+S.CB.SrcW
|
|
|
|
|
sta CB.Cache+S.CB.SrcW
|
|
|
|
|
bcc .1
|
|
|
|
|
|
|
|
|
|
inc CB.Cache+S.CB.SrcW+1
|
|
|
|
|
|
|
|
|
|
.1 ldy #S.OBJ.W
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-14 14:31:41 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc CB.Cache+S.CB.SrcW
|
|
|
|
|
sta DX
|
|
|
|
|
iny
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-14 14:31:41 +00:00
|
|
|
|
sbc CB.Cache+S.CB.SrcW+1
|
|
|
|
|
|
|
|
|
|
lsr
|
|
|
|
|
ror DX
|
|
|
|
|
sta DX+1
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2020-09-14 14:31:41 +00:00
|
|
|
|
ldy #S.OBJ.X1
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-11 20:54:15 +00:00
|
|
|
|
clc
|
2020-09-14 14:31:41 +00:00
|
|
|
|
adc DX
|
2022-12-07 07:02:29 +00:00
|
|
|
|
* and PREFS.BestViewedX
|
|
|
|
|
and #$f8
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.X1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
tax
|
|
|
|
|
|
2020-09-11 20:54:15 +00:00
|
|
|
|
iny
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-09-14 14:31:41 +00:00
|
|
|
|
adc DX+1
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.X1+1
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
pha
|
|
|
|
|
txa
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
adc CB.Cache+S.CB.SrcW
|
|
|
|
|
* ora PREFS.nBestViewedX
|
|
|
|
|
and #$f8
|
|
|
|
|
sta CB.Cache+S.CB.X2
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
adc CB.Cache+S.CB.SrcW+1
|
|
|
|
|
sta CB.Cache+S.CB.X2+1
|
|
|
|
|
|
|
|
|
|
jsr CB.DecY2
|
|
|
|
|
|
|
|
|
|
lda #C.WHITE
|
|
|
|
|
jsr CB.FillRectMonoA
|
|
|
|
|
|
|
|
|
|
jsr CB.Cache2CBBuf
|
|
|
|
|
|
|
|
|
|
lda PREFS.XMargin
|
|
|
|
|
jsr CB.AddA2X1
|
|
|
|
|
|
2022-10-18 05:56:59 +00:00
|
|
|
|
ldy #S.WND.pTITLE
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-10-26 06:38:50 +00:00
|
|
|
|
pha
|
2020-09-11 20:54:15 +00:00
|
|
|
|
iny
|
2020-09-15 14:48:35 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ply
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldx hSYSFON
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jmp DRAW.YAText
|
2020-09-15 06:12:52 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
WND.DrawStatusBar
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr CB.GetBuf
|
|
|
|
|
bcs .9
|
|
|
|
|
|
2022-10-27 15:14:06 +00:00
|
|
|
|
jsr CB.BorderLineH
|
2020-09-15 06:12:52 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldy #S.OBJ.X1
|
2022-10-26 06:12:16 +00:00
|
|
|
|
ldx #S.CB.X1
|
|
|
|
|
jsr CB.GetWndYCacheX
|
2020-09-15 06:12:52 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldy #S.OBJ.X2
|
2022-10-26 06:12:16 +00:00
|
|
|
|
ldx #S.CB.X2
|
|
|
|
|
jsr CB.GetWndYCacheX
|
2020-09-15 06:12:52 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ldy #S.WND.SBarY1
|
|
|
|
|
ldx #S.CB.Y1
|
|
|
|
|
jsr CB.GetWndYCacheX
|
2020-09-15 14:48:35 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr CB.Cache2CBBuf
|
2020-09-30 15:32:54 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr CB.IncY1
|
2020-09-15 14:48:35 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda PREFS.SBarColor
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr CB.FillRectMonoA
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.Y2
|
2022-10-26 06:12:16 +00:00
|
|
|
|
ldx #S.CB.Y2
|
|
|
|
|
jsr CB.GetWndYCacheX
|
2020-09-15 06:12:52 +00:00
|
|
|
|
|
2022-10-18 05:56:59 +00:00
|
|
|
|
jsr CB.Cache2CBBuf
|
2020-09-15 06:12:52 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda #4
|
|
|
|
|
jsr CB.AddA2X1
|
|
|
|
|
|
2022-10-18 05:56:59 +00:00
|
|
|
|
ldy #S.WND.pSTATUS
|
2020-10-26 06:38:50 +00:00
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
pha
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
ply
|
2020-09-15 06:12:52 +00:00
|
|
|
|
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ldx hSYSFON
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr DRAW.YAText
|
|
|
|
|
|
|
|
|
|
jmp CB.FlushBuf
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2020-09-13 19:05:38 +00:00
|
|
|
|
*--------------------------------------
|
2022-11-02 06:54:30 +00:00
|
|
|
|
WND.Paint pha hWND
|
|
|
|
|
|
|
|
|
|
jsr OBJ.GetHWNDA
|
|
|
|
|
|
|
|
|
|
WND.Paint1 ldy #S.WND.fPaint
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
|
|
|
|
|
jmp (ZPPtr1)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.fPaint jsr OBJ.GetHWNDA
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr WND.GetInnerInClip
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr WND.fPaint.BG
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
jsr WND.GetChilds
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
.1 jsr OBJ.Paint
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
jsr OBJ.GetNext
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.GetInnerInClip
|
|
|
|
|
ldy #S.WND.InnerX1+7
|
|
|
|
|
ldx #7
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPWNDPtr),y
|
|
|
|
|
sta CLIP.Rect+S.RECT.X1,x
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WND.fPaint.BG jsr CB.GetBuf
|
|
|
|
|
bcs .9
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
|
|
|
|
lda #S.CB.CMD.FILLRECT
|
|
|
|
|
sta CB.Cache+S.CB.CMD
|
|
|
|
|
|
|
|
|
|
lda #S.CB.OP.SET+S.CB.OP.COLOR
|
|
|
|
|
sta CB.Cache+S.CB.OP
|
|
|
|
|
|
|
|
|
|
lda #S.CB.M.MONO
|
|
|
|
|
sta CB.Cache+S.CB.M
|
|
|
|
|
|
|
|
|
|
ldy #S.WND.BGCOLOR
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta CB.Cache+S.CB.COLOR
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ldx #7
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.1 lda CLIP.Rect+S.RECT.X1,x
|
|
|
|
|
sta CB.Cache+S.CB.X1,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
jsr CB.Cache2CBBuf
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
ldy #S.WND.BGBM
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta CB.Cache+S.CB.SrcPtr
|
|
|
|
|
iny
|
|
|
|
|
ora (ZPWNDPtr),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta CB.Cache+S.CB.SrcPtr+1
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr CB.ResetSrcXY
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.WND.InnerW+3
|
|
|
|
|
ldx #3
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.2 lda (ZPWNDPtr),y
|
2022-11-02 06:54:30 +00:00
|
|
|
|
sta CB.Cache+S.CB.SrcW,x
|
|
|
|
|
dey
|
|
|
|
|
dex
|
2022-12-07 07:02:29 +00:00
|
|
|
|
bpl .2
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
|
|
|
|
lda #S.CB.CMD.BITBLT
|
|
|
|
|
sta CB.Cache+S.CB.CMD
|
|
|
|
|
|
|
|
|
|
jsr CB.Cache2CBBuf
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.8 jmp CB.FlushBuf
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
2022-10-18 05:56:59 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
WND.GetChilds ldy #S.OBJ.pChilds
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta ZPObjPtr
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPWNDPtr),y
|
|
|
|
|
sta ZPObjPtr+1
|
|
|
|
|
ora ZPObjPtr
|
2020-09-13 19:05:38 +00:00
|
|
|
|
rts
|
2020-09-10 15:28:59 +00:00
|
|
|
|
*--------------------------------------
|
2018-01-10 16:34:57 +00:00
|
|
|
|
MAN
|
2020-06-30 15:32:23 +00:00
|
|
|
|
SAVE usr/src/lib/libgui.s.wnd
|
|
|
|
|
LOAD usr/src/lib/libgui.s
|
2018-01-10 16:34:57 +00:00
|
|
|
|
ASM
|