![]() |
Routines |
| Prev: 48838 | Up: Map | Next: 48862 |
|
Used by the routine at HandlerFlame.
Plays sixteen cycles of a tone, with a half-period taken from the table at FlameSoundTable. The entry used depends on the low four bits of the frame counter, which gives the flame a crackling sound.
|
||||
| PlayFlameSound | 48844 | LD BC,48862 | Point BC at the flame sound table at FlameSoundTable. | |
| 48847 | LD A,(38547) | Fetch the low byte of the game timer from GameTimer. | ||
| 48850 | AND %00001111 | Keep only bits 0-3. | ||
| 48852 | LD L,A | Use it as the offset into the table. | ||
| 48853 | LD H,0 | |||
| 48855 | ADD HL,BC | Add the table to find the half-period. | ||
| 48856 | LD B,(HL) | Fetch the half-period of the tone from the table into B. | ||
| 48857 | LD C,16 | Set the number of cycles in C to 16. | ||
| 48859 | JP PlayWaveSequence | Jump to PlayWaveSequence to play the sound. | ||
| Prev: 48838 | Up: Map | Next: 48862 |