![]() |
Routines |
| Prev: 725C | Up: Map | Next: 7275 |
|
Used by the routine at CheckTerrainCollision.
Plays 0F beeps that alternate between a very low note and a high note. It is used when an object hits the terrain.
|
||||
| PlayBumpSound | 7263 | LD C,$0F | The bump is 0F beeps. | |
| PlayBumpSound_Loop | 7265 | LD A,C | Take the number of beeps still left. | |
| 7266 | XOR %00000010 | Flip the bits of A that are set in 02. | ||
| 7268 | AND %00000100 | Keep the bits of A that are set in 04. | ||
| 726A | ADD A,A | Double the selected pitch. | ||
| 726B | ADD A,A | Double it again. | ||
| 726C | ADD A,A | Double it once more. | ||
| 726D | LD B,A | That is the half-period of this beep. | ||
| 726E | CALL PlaySquareWave | Call PlaySquareWave. | ||
| 7271 | DEC C | One beep of the bump has been played. | ||
| 7272 | JR NZ,PlayBumpSound_Loop | Jump to PlayBumpSound_Loop if the zero flag is clear. | ||
| 7274 | RET | Return. | ||
| Prev: 725C | Up: Map | Next: 7275 |