![]() |
Routines |
| Prev: B4C6 | Up: Map | Next: B4E6 |
|
Used by the routine at footstep_pitch.
The number of waves is (X/2 + (256-Y)/2)/16, which over the floor of a room comes to between 3 and 12: longer as X grows and shorter as Y grows. Falls into toggle_audio_hw_xC.
|
||||
| footstep_length | B4D1 | LD A,(IX+$01) | C = the number of waves | |
| B4D4 | SRL A | |||
| B4D6 | LD C,A | |||
| B4D7 | LD A,(IX+$02) | |||
| B4DA | NEG | |||
| B4DC | SRL A | |||
| B4DE | ADD A,C | |||
| B4DF | RRCA | |||
| B4E0 | RRCA | |||
| B4E1 | RRCA | |||
| B4E2 | RRCA | |||
| B4E3 | AND $0F | |||
| B4E5 | LD C,A | |||
| Prev: B4C6 | Up: Map | Next: B4E6 |