A2osX/LIB/LIBGUI.S.PTR.txt
2022-11-03 17:21:26 +01:00

162 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
*--------------------------------------
PTR.Update lda PTR.T
cmp #PTR.T.WAIT
bcc PTR.Set.RTS
inc
inc
cmp #PTR.T.WAIT+12
bne PTR.Set
lda #PTR.T.WAIT
*--------------------------------------
* Set X2,Y2,SrcPtr
*--------------------------------------
PTR.Set sta PTR.T
jsr PTR.Disable
ldx PTR.T
lda L.Cursors,x
sta CB.PTR+S.CB.SrcPtr
sta ZPPtr1
lda L.Cursors+1,x
sta CB.PTR+S.CB.SrcPtr+1
sta ZPPtr1+1
ldy #S.BM.W
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcW
clc
adc CB.PTR+S.CB.X1
pha
iny
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcW+1
adc CB.PTR+S.CB.X1+1
tax
pla
bne .2
dex
.2 dec
sta CB.PTR+S.CB.X2
stx CB.PTR+S.CB.X2+1
iny S.BM.H
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcH
clc
adc CB.PTR+S.CB.Y1
pha
iny
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcH+1
adc CB.PTR+S.CB.Y1+1
tax
pla
bne .3
dex
.3 dec
sta CB.PTR+S.CB.Y2
stx CB.PTR+S.CB.Y2+1
bra PTR.Enable
PTR.Set.RTS rts
*--------------------------------------
* Set DestX,DestY
*--------------------------------------
PTR.SetPos >PULLW ZPPtr1
lda PTR.bVisible
bpl .1
jsr PTR.Hide.I
.1 ldy #S.POINT-1
.2 lda (ZPPtr1),y
sta PTR.Pos,y
dey
bpl .2
*--------------------------------------
PTR.Enable bit PTR.bVisible
bmi PTR.Show.I
clc
rts
*--------------------------------------
PTR.Disable bit PTR.bVisible
bmi PTR.Hide.I
PTR.Disable.8 clc
rts
*--------------------------------------
PTR.Hide lda PTR.bVisible
bpl PTR.Disable.8
stz PTR.bVisible
*--------------------------------------
PTR.Hide.I lda #S.CB.OP.RESTORE
bra PTR.Draw.I
*--------------------------------------
PTR.Show lda PTR.bVisible
bmi PTR.Disable.8
dec PTR.bVisible
*--------------------------------------
PTR.Show.I ldx PTR.T
lda PTR.Pos+S.POINT.X
sec
sbc PTR.HotPoints,x
sta CB.PTR+S.CB.X1
lda PTR.Pos+S.POINT.X+1
sbc #0
sta CB.PTR+S.CB.X1+1
lda PTR.Pos+S.POINT.Y
sec
sbc PTR.HotPoints+1,x
sta CB.PTR+S.CB.Y1
lda PTR.Pos+S.POINT.Y+1
sbc #0
sta CB.PTR+S.CB.Y1+1
lda #S.CB.OP.ORA+S.CB.OP.MASK+S.CB.OP.SAVE
*--------------------------------------
PTR.Draw.I sta CB.PTR+S.CB.OP
>LDYA L.WND.Screen
jsr CLIP.GetRect
* >LDYA L.CB.PTR
* jsr CB.GetInCache
* jsr CLIP.CB.Cache
* bcs .8
>PUSHB WND.Screen+S.OBJ.hPARENT
>PUSHBI IOCTL.WRITE
>PUSHW L.CB.PTR
>SYSCALL2 IOCTL
.8 clc
rts
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.ptr
LOAD usr/src/lib/libgui.s
ASM