![]() |
Routines |
| Prev: 44735 | Up: Map | Next: 44781 |
|
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 | 44755 | BIT 0,A | Test bit 0 of the old flags. | |||||||
| 44757 | RET NZ | Return if it was already set. | ||||||||
| 44758 | BIT 0,(IX+7) | Return if bit 0 of the flags is not set now. | ||||||||
| 44762 | RET Z | |||||||||
| 44763 | BIT 1,(IX+7) | Return if bit 1 of the flags is not set now. | ||||||||
| 44767 | RET Z | |||||||||
|
Play a burst of pulses.
|
||||||||||
| 44768 | LD C,16 | Set the number of pulses. | ||||||||
| PlayFootstepSound_Loop | 44770 | LD A,C | Fetch the number of the pulse. | |||||||
| 44771 | XOR %01110110 | Change it to make a different length for each pulse. | ||||||||
| 44773 | LD B,A | Use it as the length of the pulse. | ||||||||
| 44774 | CALL PlaySquareWave | Play the pulse. | ||||||||
| 44777 | DEC C | Count down the pulses. | ||||||||
| 44778 | JR NZ,PlayFootstepSound_Loop | Loop back until all of the pulses have been played. | ||||||||
| 44780 | RET | Return. | ||||||||
| Prev: 44735 | Up: Map | Next: 44781 |