(lander) Basic x force

This commit is contained in:
Devine Lu Linvega 2023-06-10 20:04:14 -07:00
parent fd185c4fb0
commit fdcb0103bb
1 changed files with 22 additions and 3 deletions

View File

@ -38,14 +38,24 @@ BRK
#01 AND ?&no-read #01 AND ?&no-read
.Controller/button DEI .Controller/button DEI
DUP #10 NEQ ?&no-u 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 &no-u
DUP #40 NEQ ?&no-l 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 ;draw-lander/plume LDA INC ;draw-lander/plume STA
&no-l &no-l
DUP #80 NEQ ?&no-r 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 ;draw-lander/plume LDA INC ;draw-lander/plume STA
&no-r &no-r
POP POP
@ -69,6 +79,8 @@ BRK
.force/y LDZ2 INC2 .force/y STZ2 .force/y LDZ2 INC2 .force/y STZ2
.force/y LDZ2 reduce .pos/y LDZ2 ADD2 .pos/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 JMP2r
@reduce ( force* -- ) @reduce ( force* -- )
@ -78,6 +90,13 @@ JMP2r
JMP2r JMP2r
&neg abs2 #02 SFT2 #0000 SWP2 SUB2 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 ) @|drawing )