Moving is working
This commit is contained in:
parent
c241ee4ae4
commit
878f606081
|
@ -43,7 +43,7 @@ BRK
|
|||
|
||||
.Mouse/x DEI2 #0008 SUB2 NIP #18 DIV
|
||||
.Mouse/y DEI2 #0008 SUB2 NIP #18 DIV
|
||||
try-move
|
||||
;try-move ;try-move/cc .Mouse/state DEI #01 GTH JMP SWP2 POP2 JSR2
|
||||
#00 .Mouse/state DEO
|
||||
|
||||
BRK
|
||||
|
@ -82,20 +82,28 @@ JMP2r
|
|||
|
||||
@try-move ( x y -- )
|
||||
|
||||
#01 phex/b #2018 DEO
|
||||
pick
|
||||
DUP2 #ffff EQU2 ?&blank
|
||||
DUP2 #0000 EQU2 ?&blank
|
||||
( up )
|
||||
#00ff OVR2 OVR2 can-move ?&move POP2
|
||||
( right )
|
||||
#0001 OVR2 OVR2 can-move ?&move POP2
|
||||
( down )
|
||||
#0100 OVR2 OVR2 can-move ?&move POP2
|
||||
( left )
|
||||
#ff00 OVR2 OVR2 can-move ?&move POP2
|
||||
( up ) #00ff OVR2 OVR2 can-move ?&move POP2
|
||||
( down ) #0100 OVR2 OVR2 can-move ?&move POP2
|
||||
( left ) #ff00 OVR2 OVR2 can-move ?&move POP2
|
||||
( right ) #0001 OVR2 OVR2 can-move ?&move POP2
|
||||
POP2
|
||||
|
||||
JMP2r
|
||||
&cc ( x y -- )
|
||||
#00 phex/b #2018 DEO
|
||||
pick
|
||||
DUP2 #ffff EQU2 ?&blank
|
||||
DUP2 #0000 EQU2 ?&blank
|
||||
( right ) #0001 OVR2 OVR2 can-move ?&move POP2
|
||||
( left ) #ff00 OVR2 OVR2 can-move ?&move POP2
|
||||
( down ) #0100 OVR2 OVR2 can-move ?&move POP2
|
||||
( up ) #00ff OVR2 OVR2 can-move ?&move POP2
|
||||
POP2
|
||||
JMP2r
|
||||
&move ( block* xy -- )
|
||||
SWP2 STH2k clear-block
|
||||
INC2r INC2r
|
||||
|
|
Loading…
Reference in New Issue