all repos — xrxs @ 932e2e9c3559020a200b6b24f62ff5b1d0301521

experimental networked application/game server with 9p

formatting and use zero page to store logo coordinates
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmEWFCIACgkQO3+8IhRO
Y5gAbg/9Ey00dZRSVR5daHQ7LZ7o8TTdsh2KXM05d05D/qu7eUeHMK2AayDMcJlq
D3co7qa5ktbMaP7S8OiF3Lop4fsR+rDEAn/4hYZfM0NBw2ZRMpIaI4dGWbYheJRd
L9SX2sxOKe9Uq9yxwrMSa9yVzFv+xhsJKhsqllWrPLIcXfvZN/VZQi9ZlbcVXKi0
Y4rNUdxr29UCP4Mjz1XOGg9hEFmMVULMKnBcy9OLIwSmhoyFhailoUwGM1zfEa41
+myx4zi+sNRjKKbIdgn7+F3xU+IcCfy3aLldsWU/fqgsqz38VVYm5wyYLEMuZaZ2
qv+HsCgZoTPqvpq+iEXeBHC0carxR2pSSHzjqFu+0m4dzw/tCI6fn14NfIt5Ymvb
1Zeip46KPEk/b6J9jvQgImy7C8mbJctOVw/B6zT2tOdJ//rLg2VB1gI2JVvlEVcJ
ozXXsVJqvptSkw1eUrybkcl+fE74uFZ4kPnfHwo3wi1ITx6avTqtrumiTD7LQKb8
UrrYTuykTFDPUu6P/Gh604fCnX3tB/I2NNSRd072JS+KnSdLAbeXN8xjRSnSXpwe
BWNBWE/iXGdiOr3W7sY/jsfFUtsqahEX5375p5aq0+7vt8nXrjN7QdzHG4nGORB4
R7CF9ijEM7TdfT5OST8trZstIB9Ojsepyk8gVKTqHZP165sXSwU=
=H3In
-----END PGP SIGNATURE-----
commit

932e2e9c3559020a200b6b24f62ff5b1d0301521

parent

35e6ad583ef06c3fc4f2a2da91d599d5ad71e727

2 files changed, 26 insertions(+), 22 deletions(-)

jump to
M uxn-client/xrxs.taluxn-client/xrxs.tal

@@ -1,10 +1,5 @@

( utility macros ) -%+ { ADD } %- { SUB } %* { MUL } %/ { DIV } -%< { LTH } %> { GTH } %= { EQU } %! { NEQ } -%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 } -%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 } - %INC-X { .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 } ( -- ) %INC-Y { .Screen/y DEI2 #0008 ADD2 .Screen/y DEO2 } ( -- )

@@ -15,9 +10,6 @@ %MOD { DIVk MUL SUB }

%MOD2 { DIV2k MUL2 SUB2 } %NEXT-TILE { DUP2 #0010 ADD2 } - -%DEBUG { ;print-hex JSR2 #0a .Console/write DEO } -%DEBUG2 { SWP ;print-hex JSR2 ;print-hex JSR2 #0a .Console/write DEO } %RTN { JMP2r }

@@ -41,14 +33,21 @@ |0000

@state $1 @ticker $1 + +@logo-coords [ + &x $2 + &y $2 +] + @cart $64 @realm $64 ( program ) -|0100 ( -> ) -@init - ( theme ) +|0100 +@init ( -> ) + + ( steppewnolf-dark theme ) #02c1 .System/r DEO2 #02cd .System/g DEO2 #02cb .System/b DEO2

@@ -64,17 +63,22 @@ ;xrxslogo .File/load DEO2

#00 .ticker STZ #00 .state STZ + + CENTER-X .logo-coords/x STZ2 + CENTER-Y .logo-coords/y STZ2 ;on-frame .Screen/vector DEO2 BRK @on-frame ( -> ) - ( wait a couple frames, draw uxn logo ) + + ( draw a piece of the logos ~ every half second ) + .ticker LDZ #01 ADD DUP #20 EQU ,&next-render JCN .ticker STZ - BRK + BRK &next-render .state LDZ #00 .ticker STZ

@@ -95,15 +99,15 @@ BRK

@draw-uxn-logo ( -> ) - CENTER-X #0020 SUB2 .Screen/x DEO2 - CENTER-Y #0010 SUB2 .Screen/y DEO2 + .logo-coords/x LDZ2 #0020 SUB2 .Screen/x DEO2 + .logo-coords/y LDZ2 #0010 SUB2 .Screen/y DEO2 #0100 #0000 &while EQU2k ,&end JCN DUP2 ;uxnlogo ADD2 .Screen/addr DEO2 #81 .Screen/sprite DEO INC-X NEXT-TILE #0030 AND2 #0000 NEQ2 ,&no-inc-y JCN - CENTER-X #0020 SUB2 .Screen/x DEO2 + .logo-coords/x LDZ2 #0020 SUB2 .Screen/x DEO2 INC-Y &no-inc-y #0010 ADD2 ,&while JMP &end POP2 POP2

@@ -112,15 +116,15 @@ RTN

@draw-xrxs-logo-xr ( -> ) - CENTER-X .Screen/x DEO2 - CENTER-Y #0010 SUB2 .Screen/y DEO2 + .logo-coords/x LDZ2 .Screen/x DEO2 + .logo-coords/y LDZ2 #0010 SUB2 .Screen/y DEO2 #0080 #0000 &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 + .logo-coords/x LDZ2 .Screen/x DEO2 INC-Y &no-inc-y #0010 ADD2 ,&while JMP &end POP2 POP2

@@ -129,15 +133,15 @@ RTN

@draw-xrxs-logo-xs ( -> ) - CENTER-X .Screen/x DEO2 - CENTER-Y .Screen/y DEO2 + .logo-coords/x LDZ2 .Screen/x DEO2 + .logo-coords/y LDZ2 .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 + .logo-coords/x LDZ2 .Screen/x DEO2 INC-Y &no-inc-y #0010 ADD2 ,&while JMP &end POP2 POP2