get maze assembling again
This commit is contained in:
parent
d5951e0a53
commit
c843a37d59
13
maze.tal
13
maze.tal
|
@ -21,9 +21,6 @@
|
||||||
%DEC2 { #0001 SUB2 }
|
%DEC2 { #0001 SUB2 }
|
||||||
%NEGATE2 { #ffff MUL2 }
|
%NEGATE2 { #ffff MUL2 }
|
||||||
|
|
||||||
( todo: use variables? )
|
|
||||||
( %ROWS { #0023 } ( rows of cells )
|
|
||||||
( %COLS { #0033 } ( columns of cells )
|
|
||||||
%ROWS { #0027 } ( rows of cells )
|
%ROWS { #0027 } ( rows of cells )
|
||||||
%COLS { #003f } ( columns of cells )
|
%COLS { #003f } ( columns of cells )
|
||||||
%MAZEROWS { ROWS #0003 SUB2 #0002 DIV2 }
|
%MAZEROWS { ROWS #0003 SUB2 #0002 DIV2 }
|
||||||
|
@ -56,12 +53,6 @@
|
||||||
( variables )
|
( variables )
|
||||||
|0000
|
|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 )
|
( pseudo-random number generator )
|
||||||
@rng [ &x $2 &y $2 ]
|
@rng [ &x $2 &y $2 ]
|
||||||
|
|
||||||
|
@ -133,7 +124,7 @@ BRK
|
||||||
.timer LDZ INC #06 MOD DUP
|
.timer LDZ INC #06 MOD DUP
|
||||||
.timer STZ
|
.timer STZ
|
||||||
#00 NEQ ,&done JCN
|
#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
|
.regenerate LDZ #00 EQU ,&paint JCN
|
||||||
|
|
||||||
( if regenerate was true, then create a new maze )
|
( if regenerate was true, then create a new maze )
|
||||||
|
@ -212,7 +203,7 @@ RTN
|
||||||
&yloop
|
&yloop
|
||||||
DUP2 #0000 CELL #02 XSTORE ( set row 0 )
|
DUP2 #0000 CELL #02 XSTORE ( set row 0 )
|
||||||
DUP2 COLS DEC2 CELL #02 XSTORE ( set row cols-1 )
|
DUP2 COLS DEC2 CELL #02 XSTORE ( set row cols-1 )
|
||||||
INC2 DUP2 ROWS LTH2 ,&yloop JCN )
|
INC2 DUP2 ROWS LTH2 ,&yloop JCN
|
||||||
POP2
|
POP2
|
||||||
|
|
||||||
#0000
|
#0000
|
||||||
|
|
Loading…
Reference in New Issue