![]() |
Routines |
| Prev: 54825 | Up: Map | Next: 54862 |
|
Used by the routine at StepLegs.
Makes the sound of a footstep, on every fourth call, which alternates between two pitches.
|
||||
|
Play a tone on every fourth footstep.
|
||||
| PlayFootstepSound | 54837 | LD HL,42824 | Take the count of the footsteps, FootstepCounter. | |
| 54840 | INC (HL) | Add one to it. | ||
| 54841 | LD A,(HL) | Fetch it. | ||
| 54842 | BIT 2,A | Jump to PlayFootstepSound_Other if bit 2 of the count is not set. | ||
| 54844 | JR Z,PlayFootstepSound_Other | |||
| 54846 | AND %00000011 | Keep the lowest two bits. | ||
| 54848 | RET NZ | Return if the count is not a multiple of four. | ||
| 54849 | LD BC,16386 | Set the pitch to 64 and the length to 2. | ||
| 54852 | JR PlayWaveSequence | Jump to PlayWaveSequence to make the tone. | ||
|
Play the other pitch on the other fourth steps.
|
||||
| PlayFootstepSound_Other | 54854 | AND %00000011 | Keep the lowest two bits. | |
| 54856 | RET NZ | Return if the count is not a multiple of four. | ||
| 54857 | LD BC,24578 | Set the pitch to 96 and the length to 2. | ||
| 54860 | JR PlayWaveSequence | Jump to PlayWaveSequence to make the tone. | ||
| Prev: 54825 | Up: Map | Next: 54862 |