From bce12147fbbfc2e2d46495767fb14eec2d5b5124 Mon Sep 17 00:00:00 2001 From: neauoire Date: Wed, 14 Dec 2022 19:41:09 -0800 Subject: [PATCH] Added day 3 --- ttc/day3.tal | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ttc/day3.tal diff --git a/ttc/day3.tal b/ttc/day3.tal new file mode 100644 index 0000000..f0be900 --- /dev/null +++ b/ttc/day3.tal @@ -0,0 +1,39 @@ +|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 +|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 + +|0000 + + @f $2 + +|0100 + + #ff0f .System/r DEO2 + #f0a0 .System/g DEO2 + #f020 .System/b DEO2 + ( size ) + #0100 .Screen/width DEO2 + #0080 .Screen/height DEO2 + ( animate ) + ;on-frame .Screen/vector DEO2 + +BRK + +@on-frame ( -> ) + + .Screen/height DEI2 #0000 + &v + STHk + DUP2 .Screen/y DEO2 + .Screen/width DEI2 #0000 + &h + DUP2 .Screen/x DEO2 + DUP STHkr ADD #1f AND .f LDZ ADD #03 SFT + .Screen/pixel DEO + INC2 GTH2k ,&h JCN + POP2 POP2 POPr + INC2 GTH2k ,&v JCN + POP2 POP2 + .f LDZk INC SWP STZ + +BRK +