![]() |
Routines |
| Prev: 48183 | Up: Map | Next: 48275 |
|
Used by the routine at HandleWaitingOutlaw.
Chooses which of the two sprite lists for the body of the outlaw to draw. He takes a step every fourth frame while he is moving.
|
||||||||||||
|
Take a step every fourth frame while he is moving.
|
||||||||||||
| ChooseOutlawBody | 48236 | LD A,(IX+1) | Fetch the horizontal speed. | |||||||||
| 48239 | OR (IX+3) | Combine it with the vertical speed. | ||||||||||
| 48242 | JR Z,ChooseOutlawBody_Step | Jump if he is not moving. | ||||||||||
| 48244 | LD A,(IX+10) | Fetch the number of moves left. | ||||||||||
| 48247 | OR (IX+11) | Combine it with the timer. | ||||||||||
| 48250 | JR Z,ChooseOutlawBody_Step | Jump if both are zero. | ||||||||||
| 48252 | LD A,(41494) | Fetch the frame counter. | ||||||||||
| 48255 | AND %00000011 | Keep a number from 0 to 3. | ||||||||||
| 48257 | JR NZ,ChooseOutlawBody_Step | Jump unless it is every fourth frame. | ||||||||||
| 48259 | INC (IX+14) | Take a step. | ||||||||||
|
Choose the sprite list for the step.
|
||||||||||||
| ChooseOutlawBody_Step | 48262 | LD A,(IX+14) | Fetch the step. | |||||||||
| 48265 | AND %00000001 | Keep the lowest bit. | ||||||||||
| 48267 | LD DE,46506 | Point DE at BodyImageNumbers. | ||||||||||
| 48270 | RET Z | Return if the step is even. | ||||||||||
| 48271 | LD DE,46509 | Point DE at BodyImageNumbers_SecondStep. | ||||||||||
| 48274 | RET | Return. | ||||||||||
| Prev: 48183 | Up: Map | Next: 48275 |