(lander) Starting platforms

This commit is contained in:
Devine Lu Linvega 2023-06-11 20:31:57 -07:00
parent 39f232b125
commit 4f6a14731a
1 changed files with 15 additions and 5 deletions

View File

@ -35,7 +35,18 @@
#0100 .pos/x STZ2 #0100 .pos/x STZ2
#00a0 .pos/y STZ2 #00a0 .pos/y STZ2
set-terrain set-terrain
draw-stage
( draw platform )
#04 create-platform #01 SUB #00 SWP #30 SFT2 STH2
#0004 #30 SFT2
STH2kr
#0005 #30 SFT2
STH2r
#43 draw-line
redraw redraw
BRK BRK
@ -66,7 +77,6 @@ BRK
apply-force apply-force
( .force/y LDZ2 phex #0a18 DEO ) ( .force/y LDZ2 phex #0a18 DEO )
redraw redraw
draw-stage
BRK BRK
@ -131,8 +141,8 @@ JMP2r
.stage/w LDZ INC INC #00 .stage/w LDZ INC INC #00
&loop &loop
( height/2 ) .stage/h LDZ #01 SFT ( height/2 ) .stage/h LDZ #01 SFT
( rand ) prng #0a SFT2 NIP ADD #01 SFT ( rand ) prng #0260 DIV2 NIP ADD #01 SFT
( v offset ) #10 ADD ( v offset ) #00 ADD
( store ) OVR #00 SWP ;terrain ADD2 STA ( store ) OVR #00 SWP ;terrain ADD2 STA
INC GTHk ,&loop JCN INC GTHk ,&loop JCN
POP2 POP2
@ -147,7 +157,7 @@ JMP2r
@soften ( -- ) @soften ( -- )
.stage/w LDZ #00 .stage/w LDZ INC #00
&loop2 &loop2
( a ) #00 OVR ;terrain ADD2 LDA STH ( a ) #00 OVR ;terrain ADD2 LDA STH
( b ) #00 OVR INC ;terrain ADD2 LDA STH ( b ) #00 OVR INC ;terrain ADD2 LDA STH
@ -219,7 +229,7 @@ JMP2r
( b ) ( b )
OVR2 #0008 ADD2 OVR2 #0008 ADD2
STH2r INC2 LDA #01 SUB #00 SWP #30 SFT2 STH2r INC2 LDA #01 SUB #00 SWP #30 SFT2
#43 draw-line #41 draw-line
INC GTHk ?&loop INC GTHk ?&loop
POP2 POP2