Prev: B3FB Up: Map Next: B40D
B403: Sound: sparkle
Used by the routines at sparkle_sound_and_draw and cycle_attribute_mem.
A burst of short blips whose pitches are read from the ROM at $1234, so the burst sounds random but is the same every time. The number of blips is the bottom five bits of the complemented type: fifteen for the first death sparkle (type 112), falling by one each frame as the sparkle runs down. Also used by cycle_colours_with_sound as each wanted charm goes into the cauldron.
Input
IX the object; its type sets the length
sound_sparkle B403 LD A,(IX+$00) E = the number of blips
B406 CPL
B407 AND $1F
B409 LD E,A
B40A LD HL,$1234 pitches from the ROM
Prev: B3FB Up: Map Next: B40D