(screen.blending) Draw foreground sprites too

This commit is contained in:
neauoire 2023-11-08 09:30:49 -08:00
parent 9924af3593
commit fa6d62c70a
1 changed files with 41 additions and 18 deletions

View File

@ -11,32 +11,55 @@
#f0d6 .System/g DEO2 #f0d6 .System/g DEO2
#f0b2 .System/b DEO2 #f0b2 .System/b DEO2
( | size ) ( | size )
#0080 .Screen/width DEO2 #0100 .Screen/width DEO2
#010c .Screen/height DEO2 #010c .Screen/height DEO2
( | background ) ( | background )
#02 <draw-strippes>
#0080 .Screen/x DEO2
#0000 .Screen/y DEO2
#03 <draw-strippes>
( | 1bpp )
#1000
&l1bg ( -- )
#00 OVR #03 AND #50 SFT2 #0008 ADD2 .Screen/x DEO2
#00 OVR #02 SFT #50 SFT2 #0008 ADD2 .Screen/y DEO2
DUP #80 ORA #0f AND <draw-circle>
INC GTHk ?&l1bg
POP2
#1000
&l1fg ( -- )
#00 OVR #03 AND #50 SFT2 #0088 ADD2 .Screen/x DEO2
#00 OVR #02 SFT #50 SFT2 #0008 ADD2 .Screen/y DEO2
DUP #c0 ORA #0f AND <draw-circle>
INC GTHk ?&l1fg
POP2
( | 2bpp )
#1000
&l2bg ( -- )
#00 OVR #03 AND #50 SFT2 #0008 ADD2 .Screen/x DEO2
#00 OVR #02 SFT #50 SFT2 #0088 ADD2 .Screen/y DEO2
DUP #80 ORA <draw-circle>
INC GTHk ?&l2bg
POP2
#1000
&l2fg ( -- )
#00 OVR #03 AND #50 SFT2 #0088 ADD2 .Screen/x DEO2
#00 OVR #02 SFT #50 SFT2 #0088 ADD2 .Screen/y DEO2
DUP #c0 ORA <draw-circle>
INC GTHk ?&l2fg
POP2
BRK
@<draw-strippes> ( color -- )
,&color STR
#f2 .Screen/auto DEO #f2 .Screen/auto DEO
;check-icn .Screen/addr DEO2 ;check-icn .Screen/addr DEO2
#2200 #2200
&times ( -- ) &times ( -- )
#02 .Screen/sprite DEO [ LIT &color $1 ] .Screen/sprite DEO
INC GTHk ?&times INC GTHk ?&times
POP2 POP2
( | 1bpp ) JMP2r
#1000
&l1 ( -- )
#00 OVR #03 AND #50 SFT2 #0008 ADD2 .Screen/x DEO2
#00 OVR #02 SFT #50 SFT2 #0008 ADD2 .Screen/y DEO2
DUP #80 ORA #0f AND <draw-circle>
INC GTHk ?&l1
POP2
( | 2bpp )
#1000
&l2 ( -- )
#00 OVR #03 AND #50 SFT2 #0008 ADD2 .Screen/x DEO2
#00 OVR #02 SFT #50 SFT2 #0088 ADD2 .Screen/y DEO2
DUP #80 ORA <draw-circle>
INC GTHk ?&l2
POP2 BRK
@<draw-circle> ( color -- ) @<draw-circle> ( color -- )
#01 .Screen/auto DEO #01 .Screen/auto DEO