Prev: 46596 Up: Map Next: 46636
46617: Play Bump Sound
Plays a burst of noise, using the bytes at START as the pitches of beeps. It is the sound of one object bumping into another.
Play four bursts of three beeps.
PlayBumpSound 46617 LD HL,0 Point HL at START.
46620 LD E,4 Set a counter of four bursts.
PlayBumpSound_NextBurst 46622 LD C,3 Set the number of beeps to 3.
46624 LD A,(HL) Fetch a byte of the ROM.
46625 INC HL Move on.
46626 OR %11000000 Set bits 6 and 7.
46628 LD B,A Keep the pitch in B.
46629 CALL PlayWaveSequence Call PlayWaveSequence.
46632 DEC E Count down the bursts.
46633 JR NZ,PlayBumpSound_NextBurst Jump to PlayBumpSound_NextBurst until all of them have been played.
46635 RET Return.
View the equivalent code in;
Prev: 46596 Up: Map Next: 46636