starting animation and state handling
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmEWDeQACgkQO3+8IhRO Y5gvtg/8DRv6lLTHv4hIG+5nio+QRg2vz3dEhRbnGlJC9C4m9wySlU3AEsg3ui0I 7yivRYneDIrqNGzNjEXnpf+CEGVb01tV16xERY+L2scMLTaQsSsGWQPtp+b/bzql 228jsroqYnXbEVtKt8cJxHd7nar/fMl3JGEN7SCR7i1vcsIj7qvIXUh6wfXoislA docCSDf44jEhFaxfaoT0BTYBXTgu3icd8HoETNsX9FCqojTcJWjU6jgGQhS/rKHF o19+jiWHmUDKt7vtYlpdUJneL45dkeRRb6ZkjezOu1T4uhUv/Gp+HwwFMJ1nZiql gmpSAIhPwvzEhwPS4uPdj/i5yr1vGKrxUWZYNvW9h6FkxFYmwubqA2hYDClk+bOP hLCboEeXYkk9ZzTszcC1j0SK1Y0+VtvWaiAvwh8mxYW2KKi3DPop+VIkwD+xC89P NBln0VUIxWqXkox1LLkzj5UCsmUC9bru9HQFLKex7/w3tJpjOABRTobGMz44Fzzz tLBjyEpUCecohhLWxVaRBg7t7l4yolaFfRWbrLT+z9GL06biFnx3pQQuNjnBc4Ia 3/6UPbvNg665mLnkOtehsA8Jgphf/+K2GnHDjP+YK4FmXch6gtXZNImz7U0W0Utr /mp7SWUGvkBag4VxYuvzy7sFpVueo/o33cPd+glUTqIt+wBC9ok= =7Vbf -----END PGP SIGNATURE-----
2 files changed,
53 insertions(+),
7 deletions(-)
M
uxn-client/xrxs.tal
→
uxn-client/xrxs.tal
@@ -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 @@ #0100 #0000 &while EQU2k ,&end JCN
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 @@ #0010 ADD2 ,&while JMP &end POP2 POP2
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