can clear screen and push logo to corner

This commit is contained in:
Iris Lightshard 2021-08-14 00:53:17 -06:00
parent 932e2e9c35
commit ad43323600
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398

View file

@ -33,6 +33,7 @@
@state $1
@ticker $1
@anim-speed $1
@logo-coords [
&x $2
@ -63,6 +64,7 @@
#00 .ticker STZ
#00 .state STZ
#20 .anim-speed STZ
CENTER-X .logo-coords/x STZ2
CENTER-Y .logo-coords/y STZ2
@ -76,12 +78,16 @@ BRK
( draw a piece of the logos ~ every half second )
.ticker LDZ #01 ADD
DUP #20 EQU ,&next-render JCN
DUP .anim-speed LDZ EQU ,&next-render JCN
.ticker STZ
BRK
&next-render .state LDZ
#00 .ticker STZ
&next-render
POP #00 .ticker STZ
.state LDZ
DUP #00 NEQ ,&state1 JCN
;draw-uxn-logo JSR2
#01 ADD .state STZ
@ -92,11 +98,61 @@ BRK
BRK
&state2 DUP #02 NEQ ,&state3 JCN
;draw-xrxs-logo-xs JSR2
#01 ADD .state STZ
BRK
&state3
;clear-screen JSR2
DUP #03 NEQ ,&state4 JCN
#04 .anim-speed STZ
;scoot-logos JSR2
;draw-uxn-logo JSR2
;draw-xrxs-logo-xr JSR2
;draw-xrxs-logo-xs JSR2
.logo-coords/x LDZ2 #0020 GTH2 ,&keep-state JCN
#01 ADD .state STZ BRK
&keep-state POP
BRK
&state4 DUP #04 NEQ ,&state5 JCN
;draw-uxn-logo JSR2
;draw-xrxs-logo-xr JSR2
;draw-xrxs-logo-xs JSR2
POP
BRK
&state5 POP
BRK
@clear-screen ( -> )
( fix this to clear the animation AND fix the overflow! )
.Screen/width DEI2 #0000 &whilex EQU2k ,&endx JCN
DUP2 ,&x STR2
.Screen/height DEI2 #0000 &whiley EQU2k ,&endy JCN
DUP2 ,&y STR2
,&x LDR2 .Screen/x DEO2
,&y LDR2 .Screen/y DEO2
;blank .Screen/addr DEO2
#80 .Screen/sprite DEO
#0008 ADD2 ,&whiley JMP &endy POP2 POP2
#0008 ADD2 ,&whilex JMP &endx POP2 POP2
RTN
&x $2
&y $2
RTN
@scoot-logos ( -> )
.logo-coords/x LDZ2 #0021 LTH2 ,&no-scoot-x JCN
.logo-coords/x LDZ2 #01 SFT2
.logo-coords/x STZ2
&no-scoot-x
.logo-coords/y LDZ2 #0021 LTH2 ,&no-scoot-y JCN
.logo-coords/y LDZ2 #01 SFT2
.logo-coords/y STZ2
&no-scoot-y
RTN
@draw-uxn-logo ( -> )
.logo-coords/x LDZ2 #0020 SUB2 .Screen/x DEO2
@ -152,5 +208,6 @@ RTN
@spritesheet "xrxs.chr 00
( sprites )
@blank $16
@uxnlogo $128
@xrxslogo $128