Prev: B51D Up: Map Next: B604
B5EE: The sparkle's sound
Used by the routines at LOOSE_VALVE and SPARKLE_STEP.
Short blips at pitches read from the ROM, from $1234 on: two waves each, and as many blips as the complement of the graphic's low five bits, so a sparkle's sound shortens as its frames go by -- 15 at graphic 48, 9 at 54, 31 at 64. Used by START_SPARKLE and SPARKLE_STEP, and by LOOSE_VALVE as a chamber is activated. As Knight Lore's sound_sparkle.
Input
IX the object
SPARKLE_SOUND B5EE LD A,(IX+$00) E = the complement of the graphic's low five bits
B5F1 CPL
B5F2 AND $1F
B5F4 LD E,A
B5F5 LD HL,$1234 the pitches: ROM bytes from $1234
SPARKLE_SOUND_0 B5F8 LD A,(HL) two waves at each, E times
B5F9 INC HL
B5FA LD B,A
B5FB LD C,$02
B5FD CALL BEEP
B600 DEC E
B601 JR NZ,SPARKLE_SOUND_0
B603 RET
Prev: B51D Up: Map Next: B604