~rabbits/donsol

ae9efe55b11ade8eb0a032f594bd5c74e4c03dd7 — neauoire 1 year, 4 months ago 57d5cfa
Added score on splash
1 files changed, 12 insertions(+), 8 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +12 -8
@@ 1,9 1,4 @@
 ( 
	Donsol
	TODO
		- Keep best score
		- Print best score on splash
 )
 ( Donsol )

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


@@ 47,6 42,7 @@
|0000

@mode $1
@score $1
@deck
	&length $1
	&cards $36


@@ 160,7 156,6 @@ BRK
@draw-menu ( -- )

	( draw castle )

	#0320 #0000
	&loop
		( x ) DUP2 #0020 MOD2 8** .frame/x LDZ2 ++ #0010 -- .Screen/x DEO2


@@ 170,6 165,12 @@ BRK
		INC2 GTH2k ,&loop JCN
	POP2 POP2

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

	&options
	( easy )
	.frame/x LDZ2 .frame/y LDZ2


@@ 414,7 415,10 @@ RTN
	DUP #36 < ,&not-flipped JCN
		POP RTN
		&not-flipped
	( set xp ) .player/xp LDZ INC .player/xp STZ
	( set xp ) 
	.player/xp LDZ INC 
		DUP .player/xp STZ
		.score LDZ [ GTHk SWP? POP ] .score STZ
	DUP TOS ;card-types ++ LDA
	( route card type )
	DUP #00 = ;pick-potion JCN2