~rabbits/donsol

d76fdccc62c81d77710ce3c4f80a39690abbd0df — neauoire 1 year, 2 months ago d2e177b
Run button is now clickable
1 files changed, 25 insertions(+), 0 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +25 -0
@@ 288,6 288,12 @@ BRK

BRK

%HALT   { #010f DEO }
%EMIT   { #18 DEO }
%PRINT  { ;print-str JSR2 #0a EMIT }
%DEBUG  { ;print-hex/byte JSR2 #0a EMIT }
%DEBUG2 { ;print-hex JSR2 #0a EMIT }

@on-mouse-game ( -> )

	( timer locked )


@@ 300,6 306,13 @@ BRK
		;run JSR2
		&no-mouse2

	( run button clicked )
	.Mouse/y DEI2 .frame/y LDZ2 -- 8// #0002 !! ,&no-run-button JCN 
		.Mouse/x DEI2 .frame/x LDZ2 -- 8// #0015 -- #0005 >> ,&no-run-button JCN
		.Mouse/state DEI #00 = ,&no-run-button JCN
			;run JSR2
		&no-run-button

	( hover card )
	.Mouse/y DEI2 .frame/y LDZ2 #0030 ++ -- #0048 <<
	.Mouse/x DEI2 .frame/x LDZ2 -- #00e0 <<


@@ 314,6 327,18 @@ BRK

BRK

@print-hex ( value* -- )

	SWP ,&byte JSR 
	&byte ( byte -- )
		STHk #04 SFT ,&parse JSR #18 DEO
		STHr #0f AND ,&parse JSR #18 DEO
	JMP2r
	&parse ( byte -- char ) DUP #09 GTH ,&above JCN #30 ADD JMP2r 
	&above #57 ADD JMP2r

JMP2r

( core )

@start-game ( -- )