![]() |
Routines |
| Prev: AEBF | Up: Map | Next: AEED |
|
Plays a burst of noise when a walking figure puts a foot down, which is when bits 0 and 1 of the flags of the object have both just become set.
|
||||||||||
|
Return unless both walk bits have just become set.
|
||||||||||
| PlayFootstepSound | AED3 | BIT 0,A | Test bit 0 of the old flags. | |||||||
| AED5 | RET NZ | Return if it was already set. | ||||||||
| AED6 | BIT 0,(IX+$07) | Return if bit 0 of the flags is not set now. | ||||||||
| AEDA | RET Z | |||||||||
| AEDB | BIT 1,(IX+$07) | Return if bit 1 of the flags is not set now. | ||||||||
| AEDF | RET Z | |||||||||
|
Play a burst of pulses.
|
||||||||||
| AEE0 | LD C,$10 | Set the number of pulses. | ||||||||
| PlayFootstepSound_Loop | AEE2 | LD A,C | Fetch the number of the pulse. | |||||||
| AEE3 | XOR %01110110 | Change it to make a different length for each pulse. | ||||||||
| AEE5 | LD B,A | Use it as the length of the pulse. | ||||||||
| AEE6 | CALL PlaySquareWave | Play the pulse. | ||||||||
| AEE9 | DEC C | Count down the pulses. | ||||||||
| AEEA | JR NZ,PlayFootstepSound_Loop | Loop back until all of the pulses have been played. | ||||||||
| AEEC | RET | Return. | ||||||||
| Prev: AEBF | Up: Map | Next: AEED |