2021-09-07 12:32:31 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* LBOX.New hParent,X1,Y1,W,H,F,pList,pVar 10
|
|
|
|
|
*--------------------------------------
|
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
|
|
|
|
|
|
|
|
|
|
ldy #S.LBOX.pVar
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
>PULLA
|
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
jsr OBJ.PullHW
|
|
|
|
|
|
|
|
|
|
jsr OBJ.PullY1X1hParent
|
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
jsr OBJ.Insert
|
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
lda hObj
|
|
|
|
|
* clc
|
|
|
|
|
rts
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
.9 >POP 10
|
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
.99 rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBOX.Destroy
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
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
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
ldy #S.OBJ.pBuf
|
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
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bne .9
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
inc pStack
|
2021-09-07 12:32:31 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 lda #0
|
|
|
|
|
sec
|
2021-09-07 12:32:31 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBOX.Draw ldy #S.LBOX.VScroll
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
clc
|
|
|
|
|
adc (pStack) Relative Y
|
|
|
|
|
tax
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-09-04 20:12:49 +00:00
|
|
|
|
ldy #S.OBJ.pBuf
|
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
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBOX.Activate
|
|
|
|
|
LBOX.Deactivate
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jmp OBJ.Draw.Body
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/lib/libtui.s.lbox
|
|
|
|
|
LOAD usr/src/lib/libtui.s
|
|
|
|
|
ASM
|