~rabbits/donsol

f87ca1f00dbb62fa3ee06f12b1fc1b66318c3e77 — neauoire 1 year, 4 months ago ddf9919
Splash is clickable
1 files changed, 31 insertions(+), 2 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +31 -2
@@ 1,10 1,9 @@
 ( 
	Donsol
	TODO
		- Scale progress bar for values
		- Win state
		- Death state
		- Difficulty settings
		- Keep score
 )

%+  { ADD }  %-  { SUB }  %*  { MUL }  %/  { NEQ }


@@ 130,6 129,26 @@ BRK

@on-mouse-menu ( -> )

	;draw-cursor JSR2
	.Mouse/state DEI #00 = ,&no-click JCN
		;go-game JSR2 BRK
		&no-click

	.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 POP BRK
			&no-easy
		DUP #11 > ,&no-normal JCN
			#01 ;set-mode JSR2 POP BRK
			&no-normal
		DUP #18 > ,&no-hard JCN
			#02 ;set-mode JSR2 POP BRK
			&no-hard
		POP
		#00 ;set-mode JSR2
		&skip

BRK

@on-frame-menu ( -> )


@@ 270,6 289,16 @@ BRK

( core )

@set-mode ( mode -- )

	DUP .mode LDZ ! ,&changed JCN
		POP RTN
		&changed
	.mode STZ
	;draw-menu/options JSR2

RTN

@start-game ( -- )

	( reset player )