2017-11-29 16:28:13 +00:00
|
|
|
|
NEW
|
2019-07-30 08:57:25 +00:00
|
|
|
|
AUTO 3,1
|
2017-11-29 16:28:13 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
CLIP.GetRect >STYA .1+1
|
|
|
|
|
|
|
|
|
|
ldy #S.OBJ.Y2+1
|
|
|
|
|
ldx #7
|
|
|
|
|
|
|
|
|
|
.1 lda $ffff,y
|
|
|
|
|
sta CLIP.Rect,x
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-11-30 16:33:33 +00:00
|
|
|
|
* CLIPPING Functions:
|
2020-09-05 13:38:04 +00:00
|
|
|
|
* In:
|
2022-11-03 06:59:03 +00:00
|
|
|
|
* Target Clipping Region in CLIP.Rect
|
2017-12-01 15:53:29 +00:00
|
|
|
|
* YA = Control Block
|
|
|
|
|
* Out:
|
2022-12-07 07:02:29 +00:00
|
|
|
|
* CC : CLIP.Cache clipped & visible
|
|
|
|
|
* CS : CLIP.Cache invisible
|
2017-11-30 16:33:33 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
CLIP.CB.Cache ldx #S.CB
|
|
|
|
|
|
|
|
|
|
.1 lda CB.Cache-1,x
|
|
|
|
|
sta CLIP.Cache-1,x
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
* lda CB.Cache+S.CB.CMD
|
|
|
|
|
|
2020-10-01 15:30:25 +00:00
|
|
|
|
and #$7F remove S.CB.CMD.OSD
|
2020-09-02 15:47:23 +00:00
|
|
|
|
tax
|
2020-10-01 15:30:25 +00:00
|
|
|
|
jmp (J.CLIP-2,x)
|
2017-12-01 15:53:29 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CLIP.Point
|
2020-09-03 15:19:25 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
CLIP.HLine >LDYA CLIP.Cache+S.CB.Y1
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPYA CLIP.Rect+S.RECT.Y2
|
2020-09-10 15:28:59 +00:00
|
|
|
|
bpl .9
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>LDYA CLIP.Cache+S.CB.Y1
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPYA CLIP.Rect+S.RECT.Y1
|
2020-09-10 15:28:59 +00:00
|
|
|
|
bmi .9
|
|
|
|
|
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>LDYA CLIP.Rect+S.RECT.X1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>STYAIFGTR CLIP.Cache+S.CB.X1
|
|
|
|
|
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>LDYA CLIP.Rect+S.RECT.X2
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>STYAIFLWR CLIP.Cache+S.CB.X2
|
2020-09-10 15:28:59 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-10 15:28:59 +00:00
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
2017-12-01 15:53:29 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
CLIP.VLine >LDYA CLIP.Cache+S.CB.X1
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPYA CLIP.Rect+S.RECT.X2
|
2020-09-10 15:28:59 +00:00
|
|
|
|
bpl .9
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>LDYA CLIP.Cache+S.CB.X1
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPYA CLIP.Rect+S.RECT.X1
|
2020-09-10 15:28:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
bpl CLIP.Y1Y2
|
|
|
|
|
|
|
|
|
|
* bmi .9
|
2020-09-10 15:28:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
* >LDYA CLIP.Rect+S.RECT.Y1
|
|
|
|
|
* >STYAIFGTR CLIP.Cache+S.CB.Y1
|
2020-09-10 15:28:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
* >LDYA CLIP.Rect+S.RECT.Y2
|
|
|
|
|
* >STYAIFLWR CLIP.Cache+S.CB.Y2
|
|
|
|
|
|
|
|
|
|
* clc
|
|
|
|
|
* rts
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2020-09-10 15:28:59 +00:00
|
|
|
|
.9 sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
rts
|
2020-09-04 15:21:15 +00:00
|
|
|
|
*--------------------------------------
|
2022-11-03 06:59:03 +00:00
|
|
|
|
CLIP.Rectangle jsr CLIP.Rect.Overlap
|
2022-12-07 07:02:29 +00:00
|
|
|
|
bcs CLIP.Text.RTS
|
2020-09-02 15:47:23 +00:00
|
|
|
|
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>LDYA CLIP.Rect+S.RECT.X1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>STYAIFGTR CLIP.Cache+S.CB.X1
|
2017-12-04 16:42:08 +00:00
|
|
|
|
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>LDYA CLIP.Rect+S.RECT.X2
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>STYAIFLWR CLIP.Cache+S.CB.X2
|
2017-12-04 07:18:24 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
CLIP.Y1Y2 >LDYA CLIP.Rect+S.RECT.Y1
|
|
|
|
|
>STYAIFGTR CLIP.Cache+S.CB.Y1
|
2020-09-03 15:19:25 +00:00
|
|
|
|
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>LDYA CLIP.Rect+S.RECT.Y2
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>STYAIFLWR CLIP.Cache+S.CB.Y2
|
2020-09-03 15:19:25 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
* clc
|
|
|
|
|
* rts
|
2020-09-04 15:21:15 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
CLIP.Text clc
|
2020-09-05 13:38:04 +00:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
CLIP.Text.9 sec
|
2020-09-04 15:21:15 +00:00
|
|
|
|
CLIP.Text.RTS rts
|
|
|
|
|
*--------------------------------------
|
2020-09-05 13:38:04 +00:00
|
|
|
|
* BitBlt :
|
2020-09-04 15:21:15 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
CLIP.BitBlt jsr CLIP.SetX2Y2
|
2022-11-03 06:59:03 +00:00
|
|
|
|
jsr CLIP.Rect.Overlap
|
2020-09-04 15:21:15 +00:00
|
|
|
|
bcs CLIP.Text.RTS
|
2017-12-04 16:42:08 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ldx #S.RECT select CLIP.Rect
|
|
|
|
|
|
|
|
|
|
CLIP.BitBltX lda CLIP.Screen+S.RECT.X1,x
|
2017-12-04 07:18:24 +00:00
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc CLIP.Cache+S.CB.X1
|
|
|
|
|
sta TmpW
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Screen+S.RECT.X1+1,x
|
|
|
|
|
sbc CLIP.Cache+S.CB.X1+1
|
|
|
|
|
sta TmpW+1
|
2020-09-04 15:21:15 +00:00
|
|
|
|
bvc .1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-04 15:21:15 +00:00
|
|
|
|
eor #$80
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-04 15:21:15 +00:00
|
|
|
|
.1 bmi .2
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.X1
|
2020-09-04 15:21:15 +00:00
|
|
|
|
clc
|
2022-12-07 07:02:29 +00:00
|
|
|
|
adc TmpW
|
|
|
|
|
sta CLIP.Cache+S.CB.X1
|
2020-09-03 15:19:25 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.X1+1
|
|
|
|
|
adc TmpW+1
|
|
|
|
|
sta CLIP.Cache+S.CB.X1+1
|
2020-09-03 15:19:25 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcX
|
2020-09-04 15:21:15 +00:00
|
|
|
|
clc
|
2022-12-07 07:02:29 +00:00
|
|
|
|
adc TmpW
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcX
|
2020-09-04 15:21:15 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcX+1
|
|
|
|
|
adc TmpW+1
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcX+1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcW
|
2017-12-05 07:09:16 +00:00
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc TmpW
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcW
|
2020-09-03 15:19:25 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcW+1
|
|
|
|
|
sbc TmpW+1
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcW+1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
bcc CLIP.Text.9
|
2022-12-07 07:02:29 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.2 lda CLIP.Cache+S.CB.X2
|
2017-12-05 07:09:16 +00:00
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc CLIP.Screen+S.RECT.X2,x
|
|
|
|
|
sta TmpW
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.X2+1
|
|
|
|
|
sbc CLIP.Screen+S.RECT.X2+1,x
|
|
|
|
|
sta TmpW+1
|
2020-09-04 15:21:15 +00:00
|
|
|
|
bvc .3
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-04 15:21:15 +00:00
|
|
|
|
eor #$80
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-04 15:21:15 +00:00
|
|
|
|
.3 bmi .4
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcW
|
2017-12-05 07:09:16 +00:00
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc TmpW
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcW
|
2017-12-07 07:42:58 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcW+1
|
|
|
|
|
sbc TmpW+1
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcW+1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
bcc .9
|
2022-12-07 07:02:29 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.4 lda CLIP.Screen+S.RECT.Y1,x
|
2020-09-05 13:38:04 +00:00
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc CLIP.Cache+S.CB.Y1
|
|
|
|
|
sta TmpW
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Screen+S.RECT.Y1+1,x
|
|
|
|
|
sbc CLIP.Cache+S.CB.Y1+1
|
|
|
|
|
sta TmpW+1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
bvc .5
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-05 13:38:04 +00:00
|
|
|
|
eor #$80
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-05 13:38:04 +00:00
|
|
|
|
.5 bmi .6
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.Y1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
clc
|
2022-12-07 07:02:29 +00:00
|
|
|
|
adc TmpW
|
|
|
|
|
sta CLIP.Cache+S.CB.Y1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.Y1+1
|
|
|
|
|
adc TmpW+1
|
|
|
|
|
sta CLIP.Cache+S.CB.Y1+1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcY
|
2020-09-05 13:38:04 +00:00
|
|
|
|
clc
|
2022-12-07 07:02:29 +00:00
|
|
|
|
adc TmpW
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcY
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcY+1
|
|
|
|
|
adc TmpW+1
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcY+1
|
2017-12-05 16:33:06 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcH
|
2020-09-05 13:38:04 +00:00
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc TmpW
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcH
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcH+1
|
|
|
|
|
sbc TmpW+1
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcH+1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
bcc .9
|
2022-12-07 07:02:29 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.6 lda CLIP.Cache+S.CB.Y2
|
2020-09-05 13:38:04 +00:00
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc CLIP.Screen+S.RECT.Y2,x
|
|
|
|
|
sta TmpW
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.Y2+1
|
|
|
|
|
sbc CLIP.Screen+S.RECT.Y2+1,x
|
|
|
|
|
sta TmpW+1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
bvc .7
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-05 13:38:04 +00:00
|
|
|
|
eor #$80
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-09-05 13:38:04 +00:00
|
|
|
|
.7 bmi .8
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcH
|
2020-09-05 13:38:04 +00:00
|
|
|
|
sec
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sbc TmpW
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcH
|
2020-09-03 15:19:25 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.SrcH+1
|
|
|
|
|
sbc TmpW+1
|
|
|
|
|
sta CLIP.Cache+S.CB.SrcH+1
|
2020-09-05 13:38:04 +00:00
|
|
|
|
bcc .9
|
2020-09-03 15:19:25 +00:00
|
|
|
|
|
2020-09-05 13:38:04 +00:00
|
|
|
|
.8 clc
|
2022-12-07 07:02:29 +00:00
|
|
|
|
rts
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2020-09-04 15:21:15 +00:00
|
|
|
|
.9 sec
|
2017-12-01 15:53:29 +00:00
|
|
|
|
rts
|
2017-11-30 16:33:33 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-01 15:53:29 +00:00
|
|
|
|
CLIP.Line.LEFT .EQ 1
|
|
|
|
|
CLIP.Line.RIGHT .EQ 2
|
|
|
|
|
CLIP.Line.BOTTOM .EQ 4
|
|
|
|
|
CLIP.Line.TOP .EQ 8
|
2017-11-29 16:28:13 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-26 06:38:50 +00:00
|
|
|
|
CLIP.Line jsr CLIP.Line.EncodeP1
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeP2
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.1 lda CLIP.Line.P1
|
|
|
|
|
ora CLIP.Line.P2
|
2017-11-29 16:28:13 +00:00
|
|
|
|
beq .88
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
lda CLIP.Line.P1
|
|
|
|
|
and CLIP.Line.P2
|
2017-11-29 16:28:13 +00:00
|
|
|
|
bne .99
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
lda CLIP.Line.P1
|
2017-11-29 16:28:13 +00:00
|
|
|
|
beq .5
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
bit #CLIP.Line.TOP
|
2017-11-29 16:28:13 +00:00
|
|
|
|
beq .2
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2020-09-05 13:38:04 +00:00
|
|
|
|
* Y1 is above S.CB.Y1....
|
2019-10-03 06:25:27 +00:00
|
|
|
|
* DY=Y2-Y1;
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeP1
|
2017-11-29 16:28:13 +00:00
|
|
|
|
bra .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.2 bit #CLIP.Line.BOTTOM
|
2020-09-05 13:38:04 +00:00
|
|
|
|
beq .3
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
* Y1 is below S.CB.Y2....
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeP1
|
2017-11-29 16:28:13 +00:00
|
|
|
|
bra .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.3 bit #CLIP.Line.RIGHT
|
2020-09-05 13:38:04 +00:00
|
|
|
|
beq .4
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
* X1 is after S.CB.X2....
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeP1
|
2017-11-29 16:28:13 +00:00
|
|
|
|
bra .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
* X1 is before S.CB.X1....
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
|
|
|
|
.4 jsr CLIP.Line.EncodeP1
|
2017-11-29 16:28:13 +00:00
|
|
|
|
bra .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
* P2
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.5 lda CLIP.Line.P2
|
|
|
|
|
bit #CLIP.Line.TOP
|
2017-11-29 16:28:13 +00:00
|
|
|
|
beq .6
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
* Y2 is above S.CB.Y1....
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeP2
|
2017-11-29 16:28:13 +00:00
|
|
|
|
bra .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.6 bit #CLIP.Line.BOTTOM
|
2020-09-05 13:38:04 +00:00
|
|
|
|
beq .7
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
* Y2 is below S.CB.Y2....
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeP2
|
2017-11-29 16:28:13 +00:00
|
|
|
|
bra .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
.7 bit #CLIP.Line.RIGHT
|
2020-09-05 13:38:04 +00:00
|
|
|
|
beq .8
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
* X2 is after S.CB.X2....
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeP2
|
2017-11-29 16:28:13 +00:00
|
|
|
|
bra .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
* X2 is before S.CB.X1....
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
|
|
|
|
.8 jsr CLIP.Line.EncodeP2
|
2017-11-29 16:28:13 +00:00
|
|
|
|
bra .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
.88 clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.99 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-12-01 15:53:29 +00:00
|
|
|
|
CLIP.Line.EncodeP1
|
2017-11-29 16:28:13 +00:00
|
|
|
|
ldy #0
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.X1
|
|
|
|
|
ldx CLIP.Cache+S.CB.X1+1
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeX.AX
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.Y1
|
|
|
|
|
ldx CLIP.Cache+S.CB.Y1+1
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeY.AX
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
|
|
|
|
sty CLIP.Line.P1
|
2017-11-29 16:28:13 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-12-01 15:53:29 +00:00
|
|
|
|
CLIP.Line.EncodeP2
|
2017-11-29 16:28:13 +00:00
|
|
|
|
ldy #0
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.X2
|
|
|
|
|
ldx CLIP.Cache+S.CB.X2+1
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeX.AX
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda CLIP.Cache+S.CB.Y2
|
|
|
|
|
ldx CLIP.Cache+S.CB.Y2+1
|
2017-12-01 15:53:29 +00:00
|
|
|
|
jsr CLIP.Line.EncodeY.AX
|
2022-11-02 06:54:30 +00:00
|
|
|
|
|
|
|
|
|
sty CLIP.Line.P2
|
2017-11-29 16:28:13 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-12-01 15:53:29 +00:00
|
|
|
|
CLIP.Line.EncodeX.AX
|
2017-11-29 16:28:13 +00:00
|
|
|
|
pha
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPAX CLIP.Rect+S.RECT.X1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
bpl .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
pla
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
tya
|
2017-12-01 15:53:29 +00:00
|
|
|
|
ora #CLIP.Line.LEFT
|
2022-11-02 06:54:30 +00:00
|
|
|
|
tay
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
rts
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
.1 pla
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPAX CLIP.Rect+S.RECT.X2
|
2020-10-26 06:38:50 +00:00
|
|
|
|
bmi .8
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
tya
|
2017-12-01 15:53:29 +00:00
|
|
|
|
ora #CLIP.Line.RIGHT
|
2022-11-02 06:54:30 +00:00
|
|
|
|
tay
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.8 rts
|
2017-11-29 16:28:13 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-05 13:38:04 +00:00
|
|
|
|
CLIP.Line.EncodeY.AX
|
2017-11-29 16:28:13 +00:00
|
|
|
|
pha
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPAX CLIP.Rect+S.RECT.Y1
|
2020-10-26 06:38:50 +00:00
|
|
|
|
bpl .1
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
pla
|
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
tya
|
2017-12-01 15:53:29 +00:00
|
|
|
|
ora #CLIP.Line.TOP
|
2022-11-02 06:54:30 +00:00
|
|
|
|
tya
|
2017-11-29 16:28:13 +00:00
|
|
|
|
rts
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
.1 pla
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPAX CLIP.Rect+S.RECT.Y2
|
2020-10-26 06:38:50 +00:00
|
|
|
|
bmi .8
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2017-11-29 16:28:13 +00:00
|
|
|
|
tya
|
2017-12-01 15:53:29 +00:00
|
|
|
|
ora #CLIP.Line.BOTTOM
|
2022-11-02 06:54:30 +00:00
|
|
|
|
tay
|
2020-10-06 06:27:35 +00:00
|
|
|
|
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.8 rts
|
2017-11-29 16:28:13 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
CLIP.SetX2Y2 ldx CLIP.Cache+S.CB.SrcW+1
|
|
|
|
|
lda CLIP.Cache+S.CB.SrcW
|
|
|
|
|
bne .3
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.3 dec
|
|
|
|
|
clc
|
|
|
|
|
adc CLIP.Cache+S.CB.X1
|
|
|
|
|
sta CLIP.Cache+S.CB.X2
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
adc CLIP.Cache+S.CB.X1+1
|
|
|
|
|
sta CLIP.Cache+S.CB.X2+1
|
|
|
|
|
|
|
|
|
|
ldx CLIP.Cache+S.CB.SrcH+1
|
|
|
|
|
lda CLIP.Cache+S.CB.SrcH
|
|
|
|
|
bne .4
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.4 dec
|
|
|
|
|
clc
|
|
|
|
|
adc CLIP.Cache+S.CB.Y1
|
|
|
|
|
sta CLIP.Cache+S.CB.Y2
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
adc CLIP.Cache+S.CB.Y1+1
|
|
|
|
|
sta CLIP.Cache+S.CB.Y2+1
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-11-03 06:59:03 +00:00
|
|
|
|
CLIP.Rect.Overlap
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>LDYA CLIP.Cache+S.CB.X1
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPYA CLIP.Rect+S.RECT.X2
|
2020-09-04 15:21:15 +00:00
|
|
|
|
bpl .9
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>LDYA CLIP.Cache+S.CB.X2
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPYA CLIP.Rect+S.RECT.X1
|
2020-09-04 15:21:15 +00:00
|
|
|
|
bmi .9
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>LDYA CLIP.Cache+S.CB.Y1
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPYA CLIP.Rect+S.RECT.Y2
|
2020-09-04 15:21:15 +00:00
|
|
|
|
bpl .9
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
>LDYA CLIP.Cache+S.CB.Y2
|
2022-11-03 06:59:03 +00:00
|
|
|
|
>SCMPYA CLIP.Rect+S.RECT.Y1
|
2020-09-04 15:21:15 +00:00
|
|
|
|
bmi .9
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2020-09-04 15:21:15 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2020-09-05 13:38:04 +00:00
|
|
|
|
|
2020-09-04 15:21:15 +00:00
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-11-29 16:28:13 +00:00
|
|
|
|
MAN
|
2020-06-30 15:32:23 +00:00
|
|
|
|
SAVE usr/src/lib/libgui.s.clip
|
|
|
|
|
LOAD usr/src/lib/libgui.s
|
2017-11-29 16:28:13 +00:00
|
|
|
|
ASM
|