starting animation and state handling
This commit is contained in:
parent
c35d47c8b8
commit
c3cedeab87
2 changed files with 53 additions and 7 deletions
Binary file not shown.
|
@ -40,13 +40,15 @@
|
|||
|0000
|
||||
|
||||
@state $1
|
||||
@ticker $1
|
||||
@drawMode $1
|
||||
@cart $64
|
||||
@realm $64
|
||||
|
||||
( program )
|
||||
|
||||
|0100 ( -> )
|
||||
|
||||
@init
|
||||
( theme )
|
||||
#02c1 .System/r DEO2
|
||||
#02cd .System/g DEO2
|
||||
|
@ -61,8 +63,35 @@
|
|||
#0200 .File/offset DEO2
|
||||
;xrxslogo .File/load DEO2
|
||||
|
||||
;draw-uxn-logo JSR2
|
||||
;draw-xrxs-logo JSR2
|
||||
#00 .ticker STZ
|
||||
#00 .state STZ
|
||||
|
||||
;on-frame .Screen/vector DEO2
|
||||
|
||||
BRK
|
||||
|
||||
@on-frame ( -> )
|
||||
( wait a couple frames, draw uxn logo )
|
||||
.ticker LDZ #01 ADD
|
||||
DUP #20 EQU ,&next-render JCN
|
||||
.ticker STZ
|
||||
BRK
|
||||
|
||||
&next-render .state LDZ
|
||||
#00 .ticker STZ
|
||||
DUP #00 NEQ ,&state1 JCN
|
||||
;draw-uxn-logo JSR2
|
||||
#01 ADD .state STZ
|
||||
BRK
|
||||
&state1 DUP #01 NEQ ,&state2 JCN
|
||||
;draw-xrxs-logo-xr JSR2
|
||||
#01 ADD .state STZ
|
||||
BRK
|
||||
&state2 DUP #02 NEQ ,&state3 JCN
|
||||
;draw-xrxs-logo-xs JSR2
|
||||
#01 ADD .state STZ
|
||||
BRK
|
||||
&state3
|
||||
BRK
|
||||
|
||||
@draw-uxn-logo ( -> )
|
||||
|
@ -74,7 +103,7 @@ BRK
|
|||
DUP2 ;uxnlogo ADD2 .Screen/addr DEO2
|
||||
#81 .Screen/sprite DEO INC-X
|
||||
|
||||
NEXT-TILE #0040 MOD2 #0000 NEQ2 ,&no-inc-y JCN
|
||||
NEXT-TILE #0030 AND2 #0000 NEQ2 ,&no-inc-y JCN
|
||||
CENTER-X #0020 SUB2 .Screen/x DEO2
|
||||
INC-Y
|
||||
&no-inc-y
|
||||
|
@ -82,16 +111,33 @@ BRK
|
|||
|
||||
RTN
|
||||
|
||||
@draw-xrxs-logo ( -> )
|
||||
@draw-xrxs-logo-xr ( -> )
|
||||
|
||||
CENTER-X .Screen/x DEO2
|
||||
CENTER-Y #0010 SUB2 .Screen/y DEO2
|
||||
|
||||
#0100 #0000 &while EQU2k ,&end JCN
|
||||
#0080 #0000 &while EQU2k ,&end JCN
|
||||
DUP2 ;xrxslogo ADD2 .Screen/addr DEO2
|
||||
#81 .Screen/sprite DEO INC-X
|
||||
|
||||
NEXT-TILE #0040 MOD2 #0000 NEQ2 ,&no-inc-y JCN
|
||||
NEXT-TILE #0030 AND2 #0000 NEQ2 ,&no-inc-y JCN
|
||||
CENTER-X .Screen/x DEO2
|
||||
INC-Y
|
||||
&no-inc-y
|
||||
#0010 ADD2 ,&while JMP &end POP2 POP2
|
||||
|
||||
RTN
|
||||
|
||||
@draw-xrxs-logo-xs ( -> )
|
||||
|
||||
CENTER-X .Screen/x DEO2
|
||||
CENTER-Y .Screen/y DEO2
|
||||
|
||||
#0100 #0080 &while EQU2k ,&end JCN
|
||||
DUP2 ;xrxslogo ADD2 .Screen/addr DEO2
|
||||
#81 .Screen/sprite DEO INC-X
|
||||
|
||||
NEXT-TILE #0030 AND2 #0000 NEQ2 ,&no-inc-y JCN
|
||||
CENTER-X .Screen/x DEO2
|
||||
INC-Y
|
||||
&no-inc-y
|
||||
|
|
Loading…
Reference in a new issue