From 878f606081d75d464186acfa9a1606726951d518 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 22 May 2023 17:12:43 -0700 Subject: [PATCH] Moving is working --- gui/dads/dads.tal | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/gui/dads/dads.tal b/gui/dads/dads.tal index 2ea2352..fe0fd2e 100644 --- a/gui/dads/dads.tal +++ b/gui/dads/dads.tal @@ -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