2020-10-26 06:38:50 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
*--------------------------------------
|
2022-10-18 05:56:59 +00:00
|
|
|
|
* A = Object Class
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.New pha
|
|
|
|
|
tax
|
|
|
|
|
ldy OBJ.SizeOf,x
|
|
|
|
|
lda #0
|
|
|
|
|
|
|
|
|
|
>SYSCALL GetMem
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>STYA ZPObjPtr
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
sta (ZPObjPtr)
|
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
tay
|
|
|
|
|
lda OBJ.SizeOf,y
|
|
|
|
|
tay
|
2022-10-18 05:56:59 +00:00
|
|
|
|
dey
|
|
|
|
|
lda #0
|
|
|
|
|
|
|
|
|
|
.1 sta (ZPObjPtr),y
|
|
|
|
|
dey
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
* clc
|
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.9 rts
|
2022-10-18 05:56:59 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
OBJ.Enter lda (ZPObjPtr)
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.OBJ.Enter,x)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.Leave lda (ZPObjPtr)
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.OBJ.Leave,x)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.Paint lda (ZPObjPtr)
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.OBJ.fPaintX,x)
|
|
|
|
|
*--------------------------------------
|
2020-10-26 06:38:50 +00:00
|
|
|
|
* hOBJ, Prop8, Value16
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.SetProp ldy #3
|
|
|
|
|
|
|
|
|
|
lda (pStack),y hOBJ
|
|
|
|
|
|
|
|
|
|
>SYSCALL2 GetMemPtr
|
|
|
|
|
>STYA ZPObjPtr
|
|
|
|
|
|
|
|
|
|
ldy #2
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
pha old value
|
|
|
|
|
>PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
>PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
ply
|
|
|
|
|
|
|
|
|
|
>RET 2
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* hOBJ, Prop8
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.GetProp >PULLA
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
>PULLA
|
|
|
|
|
>SYSCALL2 GetMemPtr
|
|
|
|
|
>STYA ZPObjPtr
|
|
|
|
|
|
|
|
|
|
ply
|
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
OBJ.GetPropAtY lda (ZPObjPtr),y
|
2020-10-26 06:38:50 +00:00
|
|
|
|
pha
|
|
|
|
|
iny
|
2022-11-02 06:54:30 +00:00
|
|
|
|
ora (ZPObjPtr),y
|
|
|
|
|
clc
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPObjPtr),y
|
2020-10-26 06:38:50 +00:00
|
|
|
|
ply
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2023-07-10 04:57:04 +00:00
|
|
|
|
OBJ.PullDXDY >PULLW DY
|
|
|
|
|
>PULLW DX
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
OBJ.SetDXDYX1Y1 ldx #3
|
|
|
|
|
ldy #S.OBJ.X1+3
|
|
|
|
|
|
|
|
|
|
.1 lda DX,x
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-10-18 05:56:59 +00:00
|
|
|
|
OBJ.SetX2Y2 >STYA ZPPtr1
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ldy #S.OBJ.W+1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
tax
|
2022-12-07 07:02:29 +00:00
|
|
|
|
dey
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.1 dec
|
2022-10-18 05:56:59 +00:00
|
|
|
|
clc
|
|
|
|
|
ldy #S.OBJ.X1
|
|
|
|
|
adc (ZPPtr1),y
|
|
|
|
|
pha
|
|
|
|
|
txa
|
|
|
|
|
iny
|
|
|
|
|
adc (ZPPtr1),y
|
|
|
|
|
ldy #S.OBJ.X2+1
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
dey
|
|
|
|
|
pla
|
|
|
|
|
sta (ZPPtr1),y
|
2022-12-07 07:02:29 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
ldy #S.OBJ.H+1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
tax
|
2022-12-07 07:02:29 +00:00
|
|
|
|
dey
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.2 dec
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
ldy #S.OBJ.Y1
|
|
|
|
|
adc (ZPPtr1),y
|
|
|
|
|
pha
|
|
|
|
|
txa
|
|
|
|
|
iny
|
|
|
|
|
adc (ZPPtr1),y
|
|
|
|
|
ldy #S.OBJ.Y2+1
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
dey
|
|
|
|
|
pla
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.GetPtr lda (ZPObjPtr),y
|
|
|
|
|
pha
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
beq .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ply
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 plx
|
|
|
|
|
>LDYA L.BMs,x
|
2022-10-18 05:56:59 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-11-02 06:54:30 +00:00
|
|
|
|
OBJ.SetAXAtY sta (ZPObjPtr),y
|
|
|
|
|
iny
|
|
|
|
|
txa
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2023-07-10 04:57:04 +00:00
|
|
|
|
OBJ.PullY1X1 ldy #S.OBJ.Y1
|
|
|
|
|
jsr OBJ.PullWordAtY
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.X1
|
|
|
|
|
*--------------------------------------
|
2022-11-02 06:54:30 +00:00
|
|
|
|
OBJ.PullWordAtY >PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
OBJ.PullByteAtY >PULLA
|
|
|
|
|
sta (ZPObjPtr),y
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OBJ.PullHWND >PULLA
|
|
|
|
|
|
|
|
|
|
OBJ.GetHWNDA >SYSCALL2 GetMemPtr
|
|
|
|
|
>STYA ZPWNDPtr
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
OBJ.DrawBorders >STYA ZPObjPtr
|
|
|
|
|
stx IY
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ldy #S.OBJ.F
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
* and #S.OBJ.F.BORDER
|
|
|
|
|
* bne .1
|
|
|
|
|
|
|
|
|
|
bmi .1
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
.9 rts
|
|
|
|
|
|
|
|
|
|
.1 jsr CB.GetBuf
|
|
|
|
|
bcs .9
|
|
|
|
|
|
2022-10-27 15:14:06 +00:00
|
|
|
|
jsr CB.BorderLineH
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.X1
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sec
|
|
|
|
|
sbc IY
|
|
|
|
|
sta CB.Cache+S.CB.X1
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sbc #0
|
|
|
|
|
sta CB.Cache+S.CB.X1+1
|
|
|
|
|
|
|
|
|
|
iny #S.OBJ.Y1
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sec
|
|
|
|
|
sbc IY
|
|
|
|
|
sta CB.Cache+S.CB.Y1
|
|
|
|
|
sta CB.Cache+S.CB.Y2
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
sbc #0
|
|
|
|
|
sta CB.Cache+S.CB.Y1+1
|
|
|
|
|
sta CB.Cache+S.CB.Y2+1 top X1-1,Y1-1,X2+1,Y1-1
|
|
|
|
|
|
|
|
|
|
iny #S.OBJ.X2
|
|
|
|
|
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
clc
|
|
|
|
|
adc IY
|
|
|
|
|
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cache+S.CB.X2
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
adc #0
|
|
|
|
|
sta CB.Cache+S.CB.X1+1
|
|
|
|
|
sta CB.Cache+S.CB.X2+1 right X2+1,Y1-1,X2+1,Y2+1
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
jsr CB.Cache2CBBuf
|
|
|
|
|
|
|
|
|
|
jmp CB.FlushBuf
|
2022-10-25 06:05:54 +00:00
|
|
|
|
*-------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
OBJ.GetNext ldy #S.OBJ.pNext
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
tax
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPObjPtr),y
|
|
|
|
|
stx ZPObjPtr
|
|
|
|
|
sta ZPObjPtr+1
|
|
|
|
|
ora ZPObjPtr
|
|
|
|
|
rts
|
2022-10-18 05:56:59 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-26 06:38:50 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/lib/libgui.s.obj
|
|
|
|
|
LOAD usr/src/lib/libgui.s
|
|
|
|
|
ASM
|