2021-09-07 12:32:31 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2024-01-26 14:05:51 +00:00
|
|
|
|
* LBOX.New hParent,X1,Y1,W,H,EV.CHANGED,EV.PRESSED,pList,pVar,F 12
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-09-04 20:12:49 +00:00
|
|
|
|
LBOX.New lda #S.OBJ.T.LBOX
|
|
|
|
|
jsr OBJ.Create
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2024-01-20 13:13:22 +00:00
|
|
|
|
>PULLA
|
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
2023-03-26 17:42:38 +00:00
|
|
|
|
ldy #S.OBJ.pVar
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr OBJ.PullWordY
|
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
ldy #S.OBJ.pBuf
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr OBJ.PullWordY
|
2024-01-26 14:05:51 +00:00
|
|
|
|
|
|
|
|
|
>PULLA
|
|
|
|
|
ldy #S.LBOX.EV.PRESSED
|
|
|
|
|
sta (ZPObjPtr),y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2024-01-26 14:05:51 +00:00
|
|
|
|
>PULLA
|
|
|
|
|
ldy #S.LBOX.EV.CHANGED
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr OBJ.PullHW
|
|
|
|
|
|
|
|
|
|
jsr OBJ.PullY1X1hParent
|
|
|
|
|
|
2023-02-10 18:19:29 +00:00
|
|
|
|
jsr CONT.Insert
|
2022-09-04 20:12:49 +00:00
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
lda hObj
|
|
|
|
|
* clc
|
|
|
|
|
rts
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2024-01-26 14:05:51 +00:00
|
|
|
|
.9 >POP 12
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
.99 rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
LBOX.Run ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
bpl .9
|
|
|
|
|
|
|
|
|
|
lda (pStack) Event
|
2021-09-07 12:32:31 +00:00
|
|
|
|
cmp #C.LF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bne .2
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.LBOX.Idx
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
inc
|
|
|
|
|
tax
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr OBJ.GetLineXAtY
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
ldy #S.LBOX.Idx
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
clc
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.LBOX.VScroll
|
|
|
|
|
adc (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.InnerH
|
|
|
|
|
cmp (ZPObjPtr),y
|
|
|
|
|
bcc .7
|
|
|
|
|
|
|
|
|
|
ldy #S.LBOX.VScroll
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
bra .7
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.2 cmp #C.VT
|
2024-01-26 14:05:51 +00:00
|
|
|
|
bne .3
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.LBOX.Idx
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
beq .8
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
dec
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.LBOX.VScroll
|
|
|
|
|
cmp (ZPObjPtr),y
|
|
|
|
|
bcs .7
|
|
|
|
|
|
|
|
|
|
ldy #S.LBOX.VScroll
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
dec
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
.7 ldy #1 hObj
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
jsr OBJ.Draw.Body
|
2024-01-26 14:05:51 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
inc pStack
|
2024-01-26 14:05:51 +00:00
|
|
|
|
|
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
ldy #S.LBOX.EV.CHANGED
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
* clc
|
2021-09-07 12:32:31 +00:00
|
|
|
|
rts
|
2024-01-26 14:05:51 +00:00
|
|
|
|
|
|
|
|
|
.3 cmp #C.SPACE
|
|
|
|
|
bne .9
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2024-01-26 14:05:51 +00:00
|
|
|
|
ldy #S.LBOX.EV.PRESSED
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 lda #0
|
|
|
|
|
clc
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 lda #0
|
|
|
|
|
sec
|
2024-01-26 14:05:51 +00:00
|
|
|
|
.99 rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBOX.Draw ldy #S.LBOX.VScroll
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
clc
|
|
|
|
|
adc (pStack) Relative Y
|
|
|
|
|
tax
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
jsr OBJ.GetLineXAtY
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs .5
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
ldy #S.LBOX.Idx
|
|
|
|
|
cmp (ZPObjPtr),y
|
|
|
|
|
bne .1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #S.OBJ.S
|
|
|
|
|
lda (ZPObjPtr),y S.OBJ.S.bActive
|
|
|
|
|
bpl .1
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldx #SEQ.INVERSE-SEQS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr LB.SeqOut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
.1 ldy #S.OBJ.InnerW
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
jsr LB.Ptr1OutEscMaxX
|
|
|
|
|
txa
|
2021-09-07 12:32:31 +00:00
|
|
|
|
beq .8
|
2022-09-04 20:12:49 +00:00
|
|
|
|
bne .6
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.5 ldy #S.OBJ.InnerW
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
.6 lda #C.SPACE
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.7 jsr LB.COut
|
2021-09-07 12:32:31 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/lib/libtui.s.lbox
|
|
|
|
|
LOAD usr/src/lib/libtui.s
|
|
|
|
|
ASM
|