~rabbits/zombie

7d88e7edd90c11c4e7a7919b36fee07c8c3bb56f — Devine Lu Linvega 1 year, 9 months ago e8aaa88
Better knobs
2 files changed, 26 insertions(+), 28 deletions(-)

M src/assets.tal
M src/main.tal
M src/assets.tal => src/assets.tal +0 -6
@@ 23,12 23,6 @@
	4040 2020 100c 0300
	0202 0404 0830 c000
	0000 183c 3c18 0000
@knob-offsetx
	01 00 00 00 00 01 02 03
	05 06 07 08 08 08 08 07
@knob-offsety
	07 06 05 03 02 01 00 00
	00 00 01 02 03 05 06 07
@play-icns
    007e 7e7e 7e7e 7e00
    0046 6676 7666 4600

M src/main.tal => src/main.tal +26 -22
@@ 253,35 253,27 @@ BRK
	( adsr ) #00 .sel/chan LDZ #30 SFT ;song/piano-env ADD2 STH2
	POP
	#04 SUB #01 SFT
	DUP #00 NEQ ,&no-a JCN
		STH2kr LDA2
			( a ) DUP2 #0fff AND2 SWP2
			( b ) #f000 AND2 #1000 ADD2 #f000 AND2 ADD2
				 STH2kr STA2
	( y ) .Mouse/y DEI2 #00f0 SUB2 ;knob-values ADD2 LDA
	OVR #00 NEQ ,&no-a JCN
		#00 OVR #c0 SFT2
		STH2kr LDA2 #0fff AND2 ADD2 STH2kr STA2
		&no-a
	DUP #01 NEQ ,&no-d JCN
		STH2kr LDA2
			( a ) DUP2 #f0ff AND2 SWP2
			( b ) #0f00 AND2 #0100 ADD2 #0f00 AND2 ADD2
				 STH2kr STA2
	OVR #01 NEQ ,&no-d JCN
		#00 OVR #80 SFT2
		STH2kr LDA2 #f0ff AND2 ADD2 STH2kr STA2
		&no-d
	DUP #02 NEQ ,&no-s JCN
		STH2kr LDA2
			( a ) DUP2 #ff0f AND2 SWP2
			( b ) #00f0 AND2 #0010 ADD2 #00f0 AND2 ADD2
				 STH2kr STA2
	OVR #02 NEQ ,&no-s JCN
		#00 OVR #40 SFT2
		STH2kr LDA2 #ff0f AND2 ADD2 STH2kr STA2
		&no-s
	DUP #03 NEQ ,&no-r JCN
		STH2kr LDA2
			( a ) DUP2 #fff0 AND2 SWP2
			( b ) #000f AND2 #0001 ADD2 #000f AND2 ADD2
				 STH2kr STA2
	OVR #03 NEQ ,&no-r JCN
		#00 OVR
		STH2kr LDA2 #fff0 AND2 ADD2 STH2kr STA2
		&no-r
	POP
	POP2
	POP2r

	;draw-controls JSR2
	#00 .Mouse/state DEO

BRK



@@ 982,6 974,18 @@ JMP2r
	&b 16 14 12 00 0f 0d 00 0a 08 06 00 03 01
	&w 17 15 13 11 10 0e 0c 0b 09 07 05 04 02 00

@knob-offsetx
	01 00 00 00 00 01 02 03
	05 06 07 08 08 08 08 07
@knob-offsety
	07 06 05 03 02 01 00 00
	00 00 01 02 03 05 06 07
@knob-values
	0f 0f 0f 0f 0f 0f 0f 0f
	0f 0e 0d 0c 0b 0a 09 08
	07 06 05 04 03 02 01 00
	00 00 00 00 00 00 00 00

@instr
	"KCK $1
	"BDR $1