~rabbits/donsol

8f4e1d83609ece210950c28d9e52951e1f0a3e3d — neauoire 1 year, 4 months ago aa3ca4c
Progress on room end
1 files changed, 37 insertions(+), 3 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +37 -3
@@ 123,11 123,20 @@ BRK

@on-button ( -> )
	
	.Controller/button DEI #04 SFT
	.Controller/button DEI 
	[ #01 ] !~ ,&no-a JCN
		.table/selection LDZ #01 ;select JSR2 POP BRK
		&no-a
	[ #02 ] !~ ,&no-b JCN
		;run JSR2 POP BRK
		&no-b
	#04 SFT
	[ #04 ] !~ ,&no-left JCN
		.table/selection LDZ #01 - #00 ;select JSR2 POP BRK &no-left
		.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


@@ 349,10 358,35 @@ RTN
		DUP .table + LDZ ;pick-card JSR2
		DUP ;flip-card JSR2
		&no-use

	4MOD .table/selection STZ
	#01 ;draw-selection JSR2
	POP

	( TODO; End deck )
	
	( TODO: End room )
	;count-table JSR2 #04 ,&no-room-complete JCN
		&no-room-complete

RTN

@count-table ( -- count )

	( create counter ) LITr 00
	#0400
	&count
		DUP .table + LDZ #36 ! ,&continue JCN
			INCr
			&continue
		INC GTHk ,&count JCN
	POP2
	STHr

RTN

@run ( -- )

RTN

@play-error ( -- )