![]() |
Routines |
| Prev: 49224 | Up: Map | Next: 49243 |
|
Used by the routine at FireWeaponB.
Makes the sound of a shot. Plays 40 tones, each with a pitch worked out from a counter that counts down, so the sound falls in pitch.
|
||||
|
Play 40 pulses of different lengths.
|
||||
| PlayNoiseSound | 49230 | LD C,40 | Use 40 cycles. | |
|
This entry point is used by the routine at EnterInitials.
This entry point takes the number of pulses in C.
Play the next pulse.
|
||||
| PlayNoiseSound_Counter | 49232 | LD A,C | Fetch the number of the pulse. | |
| 49233 | XOR %00111111 | Change it. | ||
| 49235 | LD B,A | Use it as the length of the pulse. | ||
| 49236 | CALL PlaySquareWave | Make a single cycle using PlaySquareWave. | ||
|
Loop back until all of the cycles have been made.
|
||||
| 49239 | DEC C | Count down the pulses. | ||
| 49240 | JR NZ,PlayNoiseSound_Counter | Loop back until all of the pulses have been played. | ||
| 49242 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 49224 | Up: Map | Next: 49243 |