From fdcb0103bb1b871fc29c938ae6969725977985e7 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sat, 10 Jun 2023 20:04:14 -0700 Subject: [PATCH] (lander) Basic x force --- gui/lander/lander.tal | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/gui/lander/lander.tal b/gui/lander/lander.tal index bb6b3c7..0234c4b 100644 --- a/gui/lander/lander.tal +++ b/gui/lander/lander.tal @@ -38,14 +38,24 @@ BRK #01 AND ?&no-read .Controller/button DEI DUP #10 NEQ ?&no-u - .force/y LDZ2 #0008 SUB2 .force/y STZ2 + + .angle LDZ2 + #10 SFT2 ;circle-tbl ADD2 LDA2 SWP + ( y ) + #0000 ROT #00 SWP SUB2 reduce2 + .force/y LDZ2 ADD2 + .force/y STZ2 + ( y ) + #0000 ROT #00 SWP SUB2 reduce2 + .force/x LDZ2 ADD2 + .force/x STZ2 &no-u DUP #40 NEQ ?&no-l - .angle LDZ2 #0001 SUB2 .angle STZ2 + .angle LDZ2 #0001 SUB2 #001f AND2 .angle STZ2 ;draw-lander/plume LDA INC ;draw-lander/plume STA &no-l DUP #80 NEQ ?&no-r - .angle LDZ2 INC2 .angle STZ2 + .angle LDZ2 INC2 #001f AND2 .angle STZ2 ;draw-lander/plume LDA INC ;draw-lander/plume STA &no-r POP @@ -69,6 +79,8 @@ BRK .force/y LDZ2 INC2 .force/y STZ2 .force/y LDZ2 reduce .pos/y LDZ2 ADD2 .pos/y STZ2 + .force/x LDZ2 reduce .pos/x LDZ2 ADD2 .pos/x STZ2 + JMP2r @reduce ( force* -- ) @@ -78,6 +90,13 @@ JMP2r JMP2r &neg abs2 #02 SFT2 #0000 SWP2 SUB2 JMP2r +@reduce2 ( force* -- ) + + DUP2 #8000 AND2 ORA ?&neg + #05 SFT2 +JMP2r +&neg abs2 #05 SFT2 #0000 SWP2 SUB2 JMP2r + ( @|drawing )