![]() |
Routines |
| Prev: 29207 | Up: Map | Next: 29260 |
|
Used by the routine at UpdateSpecialShot.
Plays a flutter of beeps for which the length and the notes depend on the frame counter.
|
||||
| PlayFlutterSound | 29236 | LD A,(39524) | The frame counter. | |
| 29239 | AND %00000111 | Keep the bits of A that are set in 7. | ||
| 29241 | INC A | The flutter is at least one beep long. | ||
| 29242 | ADD A,A | Double the length of the flutter. | ||
| 29243 | ADD A,A | Double the length again. | ||
| 29244 | ADD A,A | Double the length once more. | ||
| 29245 | LD D,A | That many half-periods will be played. | ||
| PlayFlutterSound_Loop | 29246 | LD A,D | The next note starts from the count left. | |
| 29247 | XOR %00000111 | Flip the bits of A that are set in 7. | ||
| 29249 | INC A | The half-period is one more than the count. | ||
| 29250 | LD B,A | That is the half-period of this beep. | ||
| 29251 | CALL PlaySquareWave | Call PlaySquareWave. | ||
| 29254 | DEC D | One count of the flutter has been used. | ||
| 29255 | RET Z | Return if the zero flag is set. | ||
| 29256 | DEC D | A second count has been used. | ||
| 29257 | RET Z | Return if the zero flag is set. | ||
| 29258 | JR PlayFlutterSound_Loop | Jump to PlayFlutterSound_Loop. | ||
| Prev: 29207 | Up: Map | Next: 29260 |