A2osX/LIB/LIBGUI.S.PTR.txt
burniouf dad22dfc30 CC:SWITCH/CASE
ASM:added \%
KERNEL:BUGFIX in DevMgr
LIBGUI:New API
2022-10-18 07:56:59 +02:00

162 lines
2.6 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
lda PTR.bVisible
bpl .1
jsr PTR.Hide.I
.1 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
lda PTR.bVisible
bmi PTR.Show.I
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
lda PTR.bVisible
bmi PTR.Show.I
clc
rts
*--------------------------------------
PTR.Hide lda PTR.bVisible
bpl .9
jsr PTR.Hide.I
stz PTR.bVisible
.9 clc
rts
*--------------------------------------
PTR.Show lda PTR.bVisible
bmi .9
jsr PTR.Show.I
dec PTR.bVisible
.9 rts
*--------------------------------------
PTR.Hide.I lda #S.CB.OP.RESTORE
bra PTR.Draw.I
*--------------------------------------
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 OBJ.GetInCache
>LDYA L.CB.PTR
jsr CLIP.YA
bcs .8
jsr CB.GFXWrite
.8 clc
rts
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.ptr
LOAD usr/src/lib/libgui.s
ASM