![]() |
Routines |
| Prev: 54743 | Up: Map | Next: 54770 |
|
Used by the routine at HandleJump.
Makes the rattling noise of a jump, from sixteen single cycles of a tone whose pitch jumps about.
|
||||
|
Play sixteen cycles of a rattling tone.
|
||||
| PlayJumpSound | 54756 | LD C,16 | Set the number of cycles to 16. | |
| PlayJumpSound_Loop | 54758 | LD A,C | Fetch the number of cycles left. | |
| 54759 | XOR %10100101 | Scramble it. | ||
| 54761 | ADD A,C | Add the number of cycles left again, to make the pitch. | ||
| 54762 | LD B,A | Put the pitch in B. | ||
| 54763 | CALL PlaySquareWave | Call PlaySquareWave to make a cycle of the tone. | ||
| 54766 | DEC C | Count the cycle. | ||
| 54767 | JR NZ,PlayJumpSound_Loop | Jump to PlayJumpSound_Loop until all of the cycles have been made. | ||
| 54769 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 54743 | Up: Map | Next: 54770 |