![]() |
Routines |
| Prev: 29276 | Up: Map | Next: 29301 |
|
Used by the routine at CheckTerrainCollision.
Plays 15 beeps that alternate between a very low note and a high note. It is used when an object hits the terrain.
|
||||
| PlayBumpSound | 29283 | LD C,15 | The bump is 15 beeps. | |
| PlayBumpSound_Loop | 29285 | LD A,C | Take the number of beeps still left. | |
| 29286 | XOR %00000010 | Flip the bits of A that are set in 2. | ||
| 29288 | AND %00000100 | Keep the bits of A that are set in 4. | ||
| 29290 | ADD A,A | Double the selected pitch. | ||
| 29291 | ADD A,A | Double it again. | ||
| 29292 | ADD A,A | Double it once more. | ||
| 29293 | LD B,A | That is the half-period of this beep. | ||
| 29294 | CALL PlaySquareWave | Call PlaySquareWave. | ||
| 29297 | DEC C | One beep of the bump has been played. | ||
| 29298 | JR NZ,PlayBumpSound_Loop | Jump to PlayBumpSound_Loop if the zero flag is clear. | ||
| 29300 | RET | Return. | ||
| Prev: 29276 | Up: Map | Next: 29301 |