Created move routine

This commit is contained in:
Devine Lu Linvega 2023-05-22 16:50:51 -07:00
parent f7123322fd
commit 9b7ab8f4a1
1 changed files with 7 additions and 7 deletions

View File

@ -52,11 +52,9 @@ BRK
@|core )
@pick ( x y -- <block>* )
( clamp )
DUP #04 GTH ?&bounds
OVR #03 GTH ?&bounds
,&t STR2
#0900
&l
@ -65,7 +63,6 @@ BRK
&end
POP2
#ffff
JMP2r
&bounds ( bounds* -- 0* )
POP2 #0000
@ -89,16 +86,19 @@ JMP2r
DUP2 #ffff EQU2 ?&blank
DUP2 #0000 EQU2 ?&blank
( up )
DUP2 #00ff can-move phex/b #0a18 DEO
#00ff OVR2 OVR2 can-move ?&move POP2
( right )
DUP2 #0001 can-move phex/b #0a18 DEO
#0001 OVR2 OVR2 can-move ?&move POP2
( down )
DUP2 #0100 can-move phex/b #0a18 DEO
#0100 OVR2 OVR2 can-move ?&move POP2
( left )
DUP2 #ff00 can-move phex/b #0a18 DEO
#ff00 OVR2 OVR2 can-move ?&move POP2
POP2
JMP2r
&move ( block* offset* -- )
phex #2018 DEO phex #0a18 DEO
JMP2r
&blank ( block* -- )
POP2
JMP2r