commit old nim / berlin_clock stuff

This commit is contained in:
Travis Shears 2025-06-27 15:34:42 +02:00
parent 9eeb186b49
commit 085f014e95
2 changed files with 22 additions and 5 deletions

1
berlin_clock.tal Normal file
View file

@ -0,0 +1 @@
if (error && isAssetNotFoundError) {

26
nim.tal
View file

@ -23,6 +23,10 @@
BRK
@draw-game
draw-heaps
JMP2r
@draw-heaps
LIT2r 0000
&l
#0014 #0014 STH2kr #0028 MUL2 ADD2 draw-heap-row
@ -38,19 +42,31 @@
#0014 ADD2 ( y* x* + 20 )
SWP2 ( x* + 20 y* )
OVR2 OVR2 ( x* + 20 y* x* + 20 y* )
draw-el
draw-el-outline
INCr
STHkr #07 NEQ ?&l
POPr
POP2 POP2
JMP2r
@draw-el ( x, y )
.Screen/y DEO2
.Screen/x DEO2
#01 .Screen/pixel DEO
@draw-el-outline ( x* y* -- )
SWP2 #0090 draw-h-line
JMP2r
@draw-h-line ( y* x* w* -- )
ROT2 ( x* w* y* )
.Screen/y DEO2 ( x* w* )
ADD2k NIP2 ( x* mx* )
SWP2 ( mx* x* )
&l
.Screen/x DEO2k POP2 ( mx* x* )
#01 .Screen/pixel DEO
INC2 ( mx* x* + 1 )
NEQ2k ( mx* x* + 1 01 ) ?&l
POP2 POP2
JMP2r
@on-mouse ( -> )
( draw the pixel )
.Mouse/x DEI2 .Screen/x DEO2