get maze assembling again

This commit is contained in:
~d6 2022-01-03 00:40:31 -05:00
parent d5951e0a53
commit c843a37d59
1 changed files with 2 additions and 11 deletions

View File

@ -21,9 +21,6 @@
%DEC2 { #0001 SUB2 }
%NEGATE2 { #ffff MUL2 }
( todo: use variables? )
( %ROWS { #0023 } ( rows of cells )
( %COLS { #0033 } ( columns of cells )
%ROWS { #0027 } ( rows of cells )
%COLS { #003f } ( columns of cells )
%MAZEROWS { ROWS #0003 SUB2 #0002 DIV2 }
@ -56,12 +53,6 @@
( variables )
|0000
( TODO )
( i feel like i should be able to intialize constant values here )
( instead of initializing them in the program. )
( but it doesnt seem to work. )
( not sure why. )
( pseudo-random number generator )
@rng [ &x $2 &y $2 ]
@ -133,7 +124,7 @@ BRK
.timer LDZ INC #06 MOD DUP
.timer STZ
#00 NEQ ,&done JCN
( .tint LDZ #09 EOR .tint STZ ( enables flashing )
( .tint LDZ #09 EOR .tint STZ ( enables flashing ) )
.regenerate LDZ #00 EQU ,&paint JCN
( if regenerate was true, then create a new maze )
@ -212,7 +203,7 @@ RTN
&yloop
DUP2 #0000 CELL #02 XSTORE ( set row 0 )
DUP2 COLS DEC2 CELL #02 XSTORE ( set row cols-1 )
INC2 DUP2 ROWS LTH2 ,&yloop JCN )
INC2 DUP2 ROWS LTH2 ,&yloop JCN
POP2
#0000