From d2c67127d9dc797fff2e6303dc66a8dfd1f3b9d2 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 11 Jun 2023 19:41:52 -0700 Subject: [PATCH] Fixed crashing bug --- gui/lander/lander.tal | 46 +++++++++++-------------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/gui/lander/lander.tal b/gui/lander/lander.tal index 105e51b..b9b2efc 100644 --- a/gui/lander/lander.tal +++ b/gui/lander/lander.tal @@ -73,12 +73,12 @@ BRK #10 SFT2 ;circle-tbl ADD2 LDA2 POP ( make short ) #80 SUB - DUP #80 AND #00 NEQ STH #ff00 STHr JMP SWP POP SWP + DUP #80 AND #00 NEQ STH #ff00 STHr [ JMP SWP POP ] SWP reduce3 .force/x LDZ2 ADD2 .force/x STZ2 .angle LDZ2 #0020 ADD2 #001f AND2 #10 SFT2 ;circle-tbl ADD2 LDA2 NIP ( make short ) #80 ADD - DUP #80 AND #00 NEQ STH #ff00 STHr JMP SWP POP SWP + DUP #80 AND #00 NEQ STH #ff00 STHr [ JMP SWP POP ] SWP reduce3 .force/y LDZ2 ADD2 .force/y STZ2 @@ -107,20 +107,13 @@ JMP2r JMP2r &neg abs2 #01 SFT2 #0000 SWP2 SUB2 JMP2r -@reduce2 ( force* -- ) - - DUP2 #8000 AND2 ORA ?&neg - #0001 SUB2 -JMP2r -&neg abs2 #0001 SUB2 #0000 SWP2 SUB2 JMP2r - @reduce3 ( force* -- ) DUP2 #8000 AND2 ORA ?&neg - #0020 DIV2 + #05 SFT2 JMP2r -&neg abs2 #0020 DIV2 #0000 SWP2 SUB2 JMP2r +&neg abs2 #05 SFT2 #0000 SWP2 SUB2 JMP2r ( @|drawing ) @@ -130,12 +123,9 @@ JMP2r #0000 DUP2 .Screen/x DEO2 .Screen/y DEO2 - #80 .Screen/pixel DEO - draw-lander + [ LIT2 80 -Screen/pixel ] DEO -JMP2r - -@draw-lander ( orientation -- ) +@draw-lander ( -- ) ( base ) #0c06 get-pt #1406 get-pt #01 draw-line @@ -148,10 +138,10 @@ JMP2r #0d0c get-pt #0e0f get-pt #01 draw-line #130c get-pt #120f get-pt #01 draw-line ( plume ) - [ LIT &plume $1 ] #09 ADD STH + [ LIT2r &plume $1 09 ] ADDr #0e08 get-pt #1208 get-pt #02 draw-line #0e08 get-pt #10 STHkr get-pt #02 draw-line - #1208 get-pt #10 STHr get-pt #02 draw-line + #1208 get-pt #10 STHr get-pt #02 draw-line ( face ) #26 .Screen/auto DEO ;face-icn .Screen/addr DEO2 @@ -162,24 +152,10 @@ JMP2r JMP2r -@draw-circle ( radius* -- ) - - ;get-point/radius STA2 - #2000 - &l - STHk - INCk get-point - STHr get-point - #01 draw-line - INC GTHk ?&l - POP2 - -JMP2r - @get-pt ( id rad -- x* y* ) #00 SWP STH2 - .angle LDZ2 NIP ADD + .angle LDZ2 #001f AND2 NIP ADD !get-point/force @@ -191,11 +167,11 @@ JMP2r #00 SWP ;circle-tbl ADD2 LDA2 #00 SWP STH2kr MUL2 #04 SFT2 ( center ) #0080 STH2kr #30 SFT2 SUB2 ADD2 #02 SFT2 - ( pos ) .pos/y LDZ2 ADD2 + ( pos ) .pos/y LDZ2 ADD2 #03ff AND2 ROT #00 SWP STH2kr MUL2 #04 SFT2 ( center ) #0080 STH2kr #30 SFT2 SUB2 ADD2 #02 SFT2 - ( pos ) .pos/x LDZ2 ADD2 + ( pos ) .pos/x LDZ2 ADD2 #03ff AND2 SWP2 POP2r