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