~rabbits/cccc

1fc1b513b9ccfaa4b7c1d19eb81fe0ac19aa73b5 — Devine Lu Linvega a month ago 8e2e648
Added mute button
2 files changed, 36 insertions(+), 2 deletions(-)

M etc/ss10x10.chr
M src/cccc.tal
M etc/ss10x10.chr => etc/ss10x10.chr +0 -0
M src/cccc.tal => src/cccc.tal +36 -2
@@ 10,7 10,7 @@

|0000

	@mode &dec $1 &dot $1
	@mode &dec $1 &dot $1 &mute $1
	@cursor &x $2 &y $2 &d &dx $1 &dy $1
	@input &num $2 &den $2
	@length $2


@@ 134,6 134,8 @@ BRK

	OVR #07 GTH ?&skip
	DUP #fd GTH ?on-touch-bitpad
	DUP #f1 EQU ?on-touch-top
	DUP #f2 EQU ?on-touch-top
	DUP #0b GTH ?&skip
	OVR #02 LTH ?on-touch-fncpad
	OVR #06 LTH ?on-touch-numpad


@@ 143,6 145,12 @@ BRK

BRK

@on-touch-top ( x y -- )

	POP tog-mute

BRK

@on-touch-bitpad ( x y -- )

	POP2


@@ 254,6 262,12 @@ JMP2r

!update-input

@tog-mute ( -- )

	.mode/mute LDZk #00 EQU SWP STZ

!draw-mute

@tog-mode ( -- )

	;buttons/mode press-button


@@ 529,7 543,10 @@ JMP2

@play-note ( pitch -- )

	#18 ADD .Audio0/pitch DEO
	.mode/mute LDZ ?&skip
		DUP #18 ADD .Audio0/pitch DEO
		&skip
	POP

JMP2r



@@ 553,6 570,9 @@ JMP2r
	;outline-frame
		draw-frame

	( mute )
	draw-mute

	( decal )
	#16 .Screen/auto DEO
	#0018 .Screen/x DEO2


@@ 680,6 700,20 @@ JMP2r

JMP2r

@draw-mute ( -- )

	#00 .Screen/auto DEO
	.Screen/width DEI2 #0020 SUB2 .Screen/x DEO2
	#0003 .Screen/y DEO2
	;mute-chr #00 .mode/mute LDZ #40 SFT2 ADD2 .Screen/addr DEO2
	#81 .Screen/sprite DEO

JMP2r

@mute-chr
	0038 4483 4438 0000 0000 387c 3800 0000
	0038 4483 4438 0000 0000 0000 0000 0000

@draw-button-clr ( icon* state -- )

	#09 ,draw-button-small/color STR