Prev: 46126 Up: Map Next: 46161
46145: Play Jump Sound
Used by the routine at HandleJump.
Plays the sound of the player jumping, which goes through a series of pitches.
Play 32 beeps of falling pitch.
PlayJumpSound 46145 LD C,32 Set the number of cycles.
PlayJumpSound_NextBeep 46147 LD A,C Fetch the cycle counter.
46148 RRCA Rotate it to get the pitch.
46149 RRCA
46150 RRCA
46151 RRCA
46152 RRCA
46153 LD B,A Set B to the pitch.
46154 CALL PlaySquareWave Play a single cycle of the tone.
Decrease the cycle counter and loop back to PlayJumpSound_NextBeep until it is zero.
46157 DEC C Count down.
46158 JR NZ,PlayJumpSound_NextBeep Jump to PlayJumpSound_NextBeep until all of the beeps have been played.
46160 RET Return.
View the equivalent code in;
Prev: 46126 Up: Map Next: 46161