~rabbits/donsol

2ed57d42c77b7199718711b2f84e7bc0c2aa77ff — neauoire 1 year, 3 months ago f6a7e9b
Cleanup
3 files changed, 69 insertions(+), 69 deletions(-)

M src/assets.tal
M src/main.tal
M src/strings.tal
M src/assets.tal => src/assets.tal +1 -1
@@ 1,4 1,4 @@
@pointer-icn 
@pointer-icn
	80c0 e0f0 f8e0 1000
@cursor-hor-icn
	4060 381e 1e38 6040

M src/main.tal => src/main.tal +41 -41
@@ 1,4 1,4 @@
 ( Donsol )
( Donsol )

%+  { ADD }  %-  { SUB }  %*  { MUL }  %/  { NEQ }
%<  { LTH }  %>  { GTH }  %=  { EQU }  %!  { NEQ }


@@ 49,7 49,7 @@
@player
	&hp $1 &hp-tween $1
	&sp $1 &sp-tween $1
	&dp $1 &xp $1 
	&dp $1 &xp $1
	&ran $1 &sick $1
@table
	&a $1 &b $1 &c $1 &d $1 &selection $1 &timer $1


@@ 62,9 62,9 @@

|0100 ( -> )

	( theme )  
	#0f7f .System/r DEO2 
	#057f .System/g DEO2 
	( theme )
	#0f7f .System/r DEO2
	#057f .System/g DEO2
	#057f .System/b DEO2

	( resize )


@@ 72,10 72,10 @@
	#00e0 .Screen/height DEO2

	( place )
	.Screen/width DEI2 2// 
	.Screen/width DEI2 2//
	DUP2 WIDTH 2// -- .frame/x STZ2
		WIDTH 2// ++ .frame/x2 STZ2
	.Screen/height DEI2 2// 
	.Screen/height DEI2 2//
	DUP2 HEIGHT 2// -- .frame/y STZ2
		HEIGHT 2// ++ .frame/y2 STZ2



@@ 102,7 102,7 @@ RTN

@on-button-menu ( -> )

	.Controller/button DEI 
	.Controller/button DEI
	[ #01 ] !~ ,&no-a JCN
		;go-game JSR2 POP BRK
		&no-a


@@ 127,15 127,15 @@ BRK
	.Mouse/y DEI2 .frame/y LDZ2 -- 8// NIP #11 ! ,&skip JCN
		.Mouse/x DEI2 .frame/x LDZ2 -- 8// NIP
		DUP #09 > ,&no-easy JCN
			#00 ;set-mode JSR2 
			#00 ;set-mode JSR2
			,&resume JMP
			&no-easy
		DUP #11 > ,&no-normal JCN
			#01 ;set-mode JSR2 
			#01 ;set-mode JSR2
			,&resume JMP
			&no-normal
		DUP #18 > ,&no-hard JCN
			#02 ;set-mode JSR2 
			#02 ;set-mode JSR2
			,&resume JMP
			&no-hard
		&resume


@@ 168,28 168,28 @@ BRK
	( draw score )
	.frame/x LDZ2 #0068 ++
	.frame/y LDZ2 #0008 --
	.score LDZ #02 
	.score LDZ #02
		;draw-value JSR2

	&options
	( easy )
	.frame/x LDZ2 .frame/y LDZ2
		OVR2 WIDTH 2// #0048 -- ++ 
		OVR2 WIDTH 2// #0048 -- ++
		OVR2 #0078 ++
			#0010 ++ ;easy-txt #02 [ .mode LDZ #00 = + ] ;draw-label JSR2
		.Screen/x DEI2 #002c -- .Screen/x DEO2
		;cursor-hor-icn .Screen/addr DEO2
		#01 [ .mode LDZ #00 = * ] .Screen/sprite DEO
		

		( normal )
		OVR2 WIDTH 2// #0018 -- ++ 
		OVR2 WIDTH 2// #0018 -- ++
		OVR2 #0078 ++
			#0010 ++ ;normal-txt #02 [ .mode LDZ #01 = + ] ;draw-label JSR2
		.Screen/x DEI2 #003c -- .Screen/x DEO2
		;cursor-hor-icn .Screen/addr DEO2
		#01 [ .mode LDZ #01 = * ] .Screen/sprite DEO
		( hard )
		OVR2 WIDTH 2// #0028 ++ ++ 
		OVR2 WIDTH 2// #0028 ++ ++
		OVR2 #0078 ++
			#0010 ++ ;hard-txt #02 [ .mode LDZ #02 = + ] ;draw-label JSR2
		.Screen/x DEI2 #002c -- .Screen/x DEO2


@@ 232,7 232,7 @@ RTN
	GTHk #00 = ,&no-hp-dec JCN
		INCk .player/hp-tween STZ
		;draw-status JSR2
		&no-hp-dec 
		&no-hp-dec
	LTHk #00 = ,&no-hp-inc JCN
		DUP #01 - .player/hp-tween STZ
		;draw-status JSR2


@@ 243,7 243,7 @@ RTN
	GTHk #00 = ,&no-sp-dec JCN
		INCk .player/sp-tween STZ
		;draw-status JSR2
		&no-sp-dec 
		&no-sp-dec
	LTHk #00 = ,&no-sp-inc JCN
		DUP #01 - .player/sp-tween STZ
		;draw-status JSR2


@@ 259,7 259,7 @@ BRK
		BRK
		&enabled

	.Controller/button DEI 
	.Controller/button DEI
	[ #01 ] !~ ,&no-a JCN
		.table/selection LDZ #01 ;select JSR2 POP BRK
		&no-a


@@ 271,11 271,11 @@ BRK
		&no-sel
	#04 SFT
	[ #04 ] !~ ,&no-left JCN
		.table/selection LDZ #01 - #00 ;select JSR2 POP BRK 
		.table/selection LDZ #01 - #00 ;select JSR2 POP BRK
		&no-left
	[ #08 ] !~ ,&no-right JCN
		.table/selection LDZ INC #00 ;select JSR2 POP BRK 
		&no-right	
		.table/selection LDZ INC #00 ;select JSR2 POP BRK
		&no-right
	POP

BRK


@@ 296,7 296,7 @@ BRK
	.Mouse/y DEI2 .frame/y LDZ2 #0030 ++ -- #0048 <<
	.Mouse/x DEI2 .frame/x LDZ2 -- #00e0 <<
		#0101 !! ,&no-hover JCN
			.Mouse/x DEI2 .frame/x LDZ2 -- #0038 // TOB 
			.Mouse/x DEI2 .frame/x LDZ2 -- #0038 // TOB
			.Mouse/state DEI #01 =
				;select JSR2
			( release ) #00 .Mouse/state DEO


@@ 359,7 359,7 @@ RTN
	( shift left )
	#3600
	&loop
		DUP .deck/cards + 
		DUP .deck/cards +
		( get card ) INCk LDZ
		( put card ) SWP STZ
		INC GTHk ,&loop JCN


@@ 413,8 413,8 @@ RTN
	DUP #36 < ,&not-flipped JCN
		POP RTN
		&not-flipped
	( set xp ) 
	.player/xp LDZ INC 
	( set xp )
	.player/xp LDZ INC
		DUP .player/xp STZ
		.score LDZ [ GTHk SWP? POP ] .score STZ
	DUP TOS ;card-types ++ LDA


@@ 447,7 447,7 @@ RTN

	POP
	( get ) TOS ;card-values ++ LDA
	( set ) .player/sp STZ 
	( set ) .player/sp STZ
	( set max durability ) #16 .player/dp STZ
	( set sick ) #00 .player/sick STZ
	;dialogs/shield ;draw-dialog JSR2


@@ 500,7 500,7 @@ RTN
		POP
		RTN
		&no-neg
	( killing ) 
	( killing )
	DUP .player/hp LDZ < ,&no-kill JCN
		POP #00 .player/hp STZ
		RTN


@@ 515,7 515,7 @@ RTN
		POP2 RTN
		&alive

	SWP 
	SWP
	( skip changed if has state )
	OVR ,&state JCN
	( check changed )


@@ 593,11 593,11 @@ RTN
		&started

	.mode LDZ
	( When all monsters in the room have been dealt with, 
	( When all monsters in the room have been dealt with,
		or when the player has not escaped the previous room. )
	[ #00 !~ ] ,&no-easy JCN
		;count-monsters JSR2 #00 = 
		.player/ran LDZ #00 = 
		;count-monsters JSR2 #00 =
		.player/ran LDZ #00 =
			#0000 !! NIP RTN
		&no-easy
	( When the player has not escaped the previous room. )


@@ 678,7 678,7 @@ RTN
	&loop
		STHk
		STHkr TOS #0038 ** .frame/x LDZ2 ++
		#0030 .frame/y LDZ2 ++ 
		#0030 .frame/y LDZ2 ++
		STHr .table + LDZ ,draw-card JSR
		INC GTHk ,&loop JCN
	POP2


@@ 696,7 696,7 @@ RTN
	( auto x ) #01 .Screen/auto DEO
	#3600
	&loop
		( get offset ) DUP TOS STH2kr ++ LDA 
		( get offset ) DUP TOS STH2kr ++ LDA
		( get tile ) #40 - TOS 10** ;spritesheet ++ .Screen/addr DEO2
		( draw ) #81 .Screen/sprite DEO
		DUP #06 MOD #05 ! ,&no-edge JCN


@@ 757,8 757,8 @@ RTN
@draw-status ( -- )

	( HP )
	.frame/x LDZ2 
	.frame/y LDZ2 
	.frame/x LDZ2
	.frame/y LDZ2
		OVR2 OVR2 #0010 ++ ;hp-txt #02 ;draw-label JSR2
		OVR2 #0020 ++ OVR2 #0010 ++ .player/hp-tween LDZ #01 ;draw-value JSR2
		.player/hp-tween LDZ [ TOS ;hp-ratios ++ LDA ] #05 ;draw-ui-progress JSR2


@@ 769,8 769,8 @@ RTN
	#03 .Screen/sprite DEO

	( SP )
	.frame/x LDZ2 #0038 ++ 
	.frame/y LDZ2 
	.frame/x LDZ2 #0038 ++
	.frame/y LDZ2
		OVR2 OVR2 #0010 ++ ;sp-txt #02 ;draw-label JSR2
		OVR2 #0020 ++ OVR2 #0010 ++ .player/sp-tween LDZ #03 ;draw-value JSR2
		.player/sp-tween LDZ [ TOS ;sp-ratios ++ LDA ] #0f ;draw-ui-progress JSR2


@@ 780,9 780,9 @@ RTN
	.player/dp LDZ TOS ;card-glyphs ++ LDA ;get-char JSR2 .Screen/addr DEO2
	#03 .Screen/sprite DEO

	( XP )	
	.frame/x LDZ2 #0070 ++ 
	.frame/y LDZ2 
	( XP )
	.frame/x LDZ2 #0070 ++
	.frame/y LDZ2
		OVR2 OVR2 #0010 ++ ;xp-txt #02 ;draw-label JSR2
		OVR2 #0020 ++ OVR2 #0010 ++ .player/xp LDZ #02 ;draw-value JSR2
		.player/xp LDZ [ TOS ;xp-ratios ++ LDA ] #0a ;draw-ui-progress JSR2

M src/strings.tal => src/strings.tal +27 -27
@@ 1,27 1,27 @@

@dialogs
	( clear )     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
	( clear )     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
	( potion )
	&potion       2333 3900 2836 2532 2f00 2500 3433 382d 3332 4000 0000 0000 
	&sickness     2333 3900 2a29 2930 0037 2d27 2f40 0000 0000 0000 0000 0000 
	&waste        2333 3900 3b25 3738 2928 0025 0034 3338 2d33 323f 0000 0000 
	&potion       2333 3900 2836 2532 2f00 2500 3433 382d 3332 4000 0000 0000
	&sickness     2333 3900 2a29 2930 0037 2d27 2f40 0000 0000 0000 0000 0000
	&waste        2333 3900 3b25 3738 2928 0025 0034 3338 2d33 323f 0000 0000
	( shield )
	&shield       2333 3900 2a33 3932 2800 2500 372c 2d29 3028 4000 0000 0000 
	&shield       2333 3900 2a33 3932 2800 2500 372c 2d29 3028 4000 0000 0000
	( attack )
	&unshielded   193b 3f00 2333 3900 3229 2928 0025 0037 2c2d 2930 2840 0000 
	&blocking     2333 3900 2630 3327 2f29 2800 382c 2900 2538 3825 272f 4000 
	&breaking     2333 3936 0037 2c2d 2930 2800 2636 332f 293f 0000 0000 0000 
	&damages      2333 3900 3739 363a 2d3a 2928 0038 2c29 0026 2538 3830 2940 
	&death        2333 3900 282d 2928 4000 4200 1e36 3d00 252b 252d 3240 0000 
	&unshielded   193b 3f00 2333 3900 3229 2928 0025 0037 2c2d 2930 2840 0000
	&blocking     2333 3900 2630 3327 2f29 2800 382c 2900 2538 3825 272f 4000
	&breaking     2333 3936 0037 2c2d 2930 2800 2636 332f 293f 0000 0000 0000
	&damages      2333 3900 3739 363a 2d3a 2928 0038 2c29 0026 2538 3830 2940
	&death        2333 3900 282d 2928 4000 4200 1e36 3d00 252b 252d 3240 0000
	( run )
	&run          2333 3900 3625 3200 253b 253d 4000 0000 0000 0000 0000 0000 
	&cannot_run   2333 3900 2725 3232 3338 0036 3932 0025 3b25 3d40 0000 0000 
	&run          2333 3900 3625 3200 253b 253d 4000 0000 0000 0000 0000 0000
	&cannot_run   2333 3900 2725 3232 3338 0036 3932 0025 3b25 3d40 0000 0000
	( modes )
	&easy         0f25 373d 0017 3328 2900 4100 1d29 3029 2738 0027 2536 2840 
	&normal       1833 3631 2530 0041 001d 2930 2927 3800 2725 3628 4000 0000 
	&hard         1225 3628 0017 3328 2900 4100 1d29 3029 2738 0027 2536 2840 
	&easy         0f25 373d 0017 3328 2900 4100 1d29 3029 2738 0027 2536 2840
	&normal       1833 3631 2530 0041 001d 2930 2927 3800 2725 3628 4000 0000
	&hard         1225 3628 0017 3328 2900 4100 1d29 3029 2738 0027 2536 2840
	( etc )
	&victory      202d 2738 3336 3d00 4100 1629 253a 2900 2839 322b 2933 3240 
	&victory      202d 2738 3336 3d00 4100 1629 253a 2900 2839 322b 2933 3240
	&modes
		:&easy :&normal :&hard



@@ 48,9 48,9 @@
	15 15 00 ( joker )

@card-glyphs
	00 31 32 33 34 35 36 37 
	38 39 58 4a 00 51 00 4b 
	00 41 00 00 00 00 00 00 
	00 31 32 33 34 35 36 37
	38 39 58 4a 00 51 00 4b
	00 41 00 00 00 00 00 00

@hp-ratios
	00 01 02 03 04 06 07 08


@@ 85,16 85,16 @@
	&b00 5f $1

@card-names
	:cards/h01 :cards/h02 :cards/h03 :cards/h04 :cards/h05 
	:cards/h06 :cards/h07 :cards/h08 :cards/h09 :cards/h0a 
	:cards/h01 :cards/h02 :cards/h03 :cards/h04 :cards/h05
	:cards/h06 :cards/h07 :cards/h08 :cards/h09 :cards/h0a
	:cards/h0b :cards/h0c :cards/h0d
	:cards/d01 :cards/d02 :cards/d03 :cards/d04 :cards/d05 
	:cards/d06 :cards/d07 :cards/d08 :cards/d09 :cards/d0a 
	:cards/d01 :cards/d02 :cards/d03 :cards/d04 :cards/d05
	:cards/d06 :cards/d07 :cards/d08 :cards/d09 :cards/d0a
	:cards/d0b :cards/d0c :cards/d0d
	:cards/s01 :cards/s02 :cards/s03 :cards/s04 :cards/s05 
	:cards/s06 :cards/s07 :cards/s08 :cards/s09 :cards/s0a 
	:cards/s01 :cards/s02 :cards/s03 :cards/s04 :cards/s05
	:cards/s06 :cards/s07 :cards/s08 :cards/s09 :cards/s0a
	:cards/s0b :cards/s0c :cards/s0d
	:cards/c01 :cards/c02 :cards/c03 :cards/c04 :cards/c05 
	:cards/c06 :cards/c07 :cards/c08 :cards/c09 :cards/c0a 
	:cards/c01 :cards/c02 :cards/c03 :cards/c04 :cards/c05
	:cards/c06 :cards/c07 :cards/c08 :cards/c09 :cards/c0a
	:cards/c0b :cards/c0c :cards/c0d
	:cards/j01 :cards/j02 :cards/b00
\ No newline at end of file