~rabbits/markl

b337c86bd4a5cffda761c7eef24332fdf67c4dbf — Devine Lu Linvega 2 months ago 67a3a99
Smaller tutorial stage
2 files changed, 22 insertions(+), 22 deletions(-)

M src/markl.tal
M src/world.tal
M src/markl.tal => src/markl.tal +7 -4
@@ 8,8 8,9 @@
|a0 @File &vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|c0 @DateTime &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1
	( TODOs:
	| reselection spell puts idle
	| lock controls during warp animations
	| skip out-of-screen drawing
	| warp state
	| doorway exit
	| auto move program position after input
	| highlight new program size unlock


@@ 117,12 118,14 @@
		( | on program )
		( x ) .Mouse/x DEI2 #0010 SUB2 #05 SFT2 NIP
		( y ) .Mouse/y DEI2 #0060 SUB2 #05 SFT2 NIP #20 SFT ADD <pick-focus>
		[ LIT2 00 -Mouse/state ] DEO
		BRK }
	( | on inventory )
	.Mouse/x DEI2 #00a0 SUB2 #00d8 GTH2 ?{
		( x ) .Mouse/x DEI2 #00b8 SUB2 #05 SFT2 NIP #20 SFT
		( y ) .Mouse/y DEI2 #0060 SUB2 #05 SFT2 NIP ADD
		( spell* ) DUP ADD #00 SWP ;spells-lut ADD2 LDA2 <pick-spell>
		[ LIT2 00 -Mouse/state ] DEO
		BRK }
	BRK



@@ 157,8 160,8 @@

@start-tutorial ( -- )
	#0000 .program/size STZ2
	;move-up <unlock-spell>
	;spell-idle <unlock-spell>
	;move-up <unlock-spell>
	#0005 ;w0-1-stage !<enter-room>

@start-lobby ( -- )


@@ 420,7 423,7 @@
	;&delay !<set-post-turn>

	&delay ( -- )
	#d0 ;&animation !<animate-delay>
	#e0 ;&animation !<animate-delay>

	&animation ( -- )
	;player-jump-chr <set-state>


@@ 477,7 480,7 @@
	.program/focus STZ !<draw-interface-open>

@<pick-spell> ( spell* -- )
	( reselect ) DUP2 .program/focus LDZ DUP ADD .program ADD LDZ2 NEQ2 ?{ POP2 JMP2r }
	( reselect ) DUP2 .program/focus LDZ DUP ADD .program ADD LDZ2 NEQ2 ?{ POP2 ;spell-idle }
	( locked ) DUP2 #0004 ADD2 STH2k LDA ?{ POP2r POP2 JMP2r }
	( remove highlight ) #01 STH2r STA
	DUP2 ;spell-flow-up NEQ2 ?{ POP2 #00 !<set-flow> }

M src/world.tal => src/world.tal +15 -18
@@ 8,10 8,6 @@
	| 06 : flip x
	| 07 : flip y )





@lobby-stage [ 0d0d =&events =&tiles =&end ]
	&tiles ( )
	( ) [ 00 00 00 00 00 01 01 01 00 00 00 00 00 ]


@@ 29,11 25,12 @@
	( ) [ 00 00 00 00 00 01 01 01 00 00 00 00 00 ]
	( ) &events 02
	( ) [ 0306 =event-block $2 $2 ]
	( ) [ 0b06 =event-warp =w1-1-stage 0106 ] &end

	( ) [ 0b06 =event-warp =w1-1-stage 0106 ]
	&end
(
@|tutorial )


@w0-1-stage [ 0506 =&events =&tiles =&end ]
	&tiles ( )
	( ) [ 01 00 00 00 00 ]


@@ 59,23 56,22 @@
	( ) [ 0104 =event-nimp 0100 $2 ]
	( ) [ 0305 =event-warp =w0-3-stage 0002 ] &end

@w0-3-stage [ 0804 =&events =&tiles =&end ]
@w0-3-stage [ 0604 =&events =&tiles =&end ]
	&tiles ( )
	( ) [ 00 0a 00 01 01 02 01 00 ]
	( ) [ 01 07 01 07 01 07 02 00 ]
	( ) [ 01 01 01 00 01 00 00 00 ]
	( ) [ 00 00 00 00 00 00 00 00 ]
	( ) [ 00 0a 00 01 01 00 ]
	( ) [ 01 07 01 07 02 00 ]
	( ) [ 01 01 01 00 00 00 ]
	( ) [ 00 00 00 00 00 00 ]
	( ) &events 06
	( ) [ 0202 =event-block $4 ]
	( ) [ 0300 =event-block $4 ]
	( ) [ 0402 =event-block $4 ]
	( ) [ 0500 =event-block $4 ]
	( ) [ 0600 =event-goat =move-left $2 ]
	( ) [ 0100 =event-warp =lobby-stage 0606 ] &end

	( ) [ 0400 =event-goat =move-left $2 ]
	( ) [ 0100 =event-warp =lobby-stage 0606 ]
	&end
(
@|world1 )


@w1-1-stage [ 0808 =&events =&tiles =&end ]
	&tiles ( )
	( ) [ 00 00 0a 00 00 00 00 00 ]


@@ 102,11 98,12 @@
	( ) [ 01 01 01 01 01 01 01 01 ]
	( ) &events 02
	( ) [ 0106 =event-warp =lobby-stage 0606 ]
	( ) [ 0006 =event-goat =jump-right $2 ] &end

	( ) [ 0006 =event-goat =jump-right $2 ]
	&end
(
@|scraps )


@playground [ 0707 =&events =&tiles =&end ]
	&tiles ( )
	( ) [ 02 01 01 01 01 01 02 ]