~rabbits/zombie

32294af96acd021ab94607e3fa9940a0d55a8dfb — Devine Lu Linvega 1 year, 9 months ago 8eb88b3
Highlight drum notes on time
1 files changed, 21 insertions(+), 10 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +21 -10
@@ 294,9 294,9 @@ JMP2r

JMP2r

@get-hit ( pos* -- inst )
@get-hit ( pos* chan -- inst )

	.sel/chan LDZ ;get-event JSR2
	;get-event JSR2
	DUP #07 LTH MUL

JMP2r


@@ 418,6 418,7 @@ JMP2r
	.time/frame STZ2
	;draw-time JSR2
	;draw-piano-bars JSR2
	;draw-drum-bars JSR2

JMP2r



@@ 638,15 639,25 @@ JMP2r
	#00a0 .Screen/y DEO2

	#4000
	&drum-loop
	&loop
		#00 OVR #20 SFT2 #0030 ADD2 .Screen/x DEO2
		#00 OVR .time/scroll LDZ2 #10 SFT2 ADD2 ;get-hit JSR2 
		DUP #00 EQU ,&d-skip JCN
			#00 OVR #01 SUB #30 SFT2 #00a0 ADD2 .Screen/y DEO2
			#0f .Screen/sprite DEO
			&d-skip
			POP
		INC GTHk ,&drum-loop JCN
		#00 OVR .time/scroll LDZ2 #10 SFT2 ADD2 STH2

		#0400
		&l
			( each channel )
			DUP STH2kr ROT ;get-hit JSR2 
			DUP #00 EQU ,&skip JCN
				#00 OVR #01 SUB #30 SFT2 #00a0 ADD2 .Screen/y DEO2
				OVR STH2kr ;get-note-color JSR2 .Screen/sprite DEO
				&skip
				POP
			INC GTHk ,&l JCN
		POP2

		POP2r

		INC GTHk ,&loop JCN
	POP2

JMP2r