~rabbits/markl

bf8bc38a472c46676b5148fd7f197a2e692335a0 — Devine Lu Linvega 2 months ago 6949411
Catch off-stage
2 files changed, 18 insertions(+), 2 deletions(-)

M src/assets.tal
M src/markl.tal
M src/assets.tal => src/assets.tal +1 -1
@@ 655,5 655,5 @@
	ff00 0000 0000 0000 ffff 0000 0000 0000
	8000 0000 0000 0000 c080 0000 0000 0000 ]

@room $200
@room &w $1 &h $1 $1fe


M src/markl.tal => src/markl.tal +17 -1
@@ 205,6 205,12 @@
	&cmd [ 01 &len $2 0000 &src $2 0000 =room ]

@get-tile ( x y -- id )
	( | off-stage )
	( x >= 0 ) OVR #80 LTH ?{ POP2 #00 JMP2r }
	( y >= 0 1 ) DUP #80 LTH ?{ POP2 #00 JMP2r }
	( x < w ) OVR ;room/w LDA LTH ?{ POP2 #00 JMP2r }
	( y < h ) DUP ;room/h LDA LTH ?{ POP2 #00 JMP2r }
	( | in-stage )
	( get width ) ;room STH2k LDA
	( get id ) MUL ADD #00 SWP
	( get tiles* ) STH2r #0004 ADD2 LDA2 ADD2 LDA JMP2r


@@ 299,7 305,17 @@
	POP JMP2r

@<tile-fall> ( -- )
	<recover-safety> !<release-turn>
	!<animate-fall>

@<animate-fall> ( -- )
	;&anim .Screen/vector DEO2
	{ "fall! 0a $1 }
	<plam>
	JMP2r

	&anim ( -> )
	BRK
	( callback: <recover-safety> !<release-turn> )

@<set-safety> ( -- )
	#00 .modify/x STZ