![]() |
Routines |
| Prev: BC37 | Up: Map | Next: BC93 |
|
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 | BC6C | LD A,(IX+$01) | Fetch the horizontal speed. | |||||||||
| BC6F | OR (IX+$03) | Combine it with the vertical speed. | ||||||||||
| BC72 | JR Z,ChooseOutlawBody_Step | Jump if he is not moving. | ||||||||||
| BC74 | LD A,(IX+$0A) | Fetch the number of moves left. | ||||||||||
| BC77 | OR (IX+$0B) | Combine it with the timer. | ||||||||||
| BC7A | JR Z,ChooseOutlawBody_Step | Jump if both are zero. | ||||||||||
| BC7C | LD A,($A216) | Fetch the frame counter. | ||||||||||
| BC7F | AND %00000011 | Keep a number from 00 to 03. | ||||||||||
| BC81 | JR NZ,ChooseOutlawBody_Step | Jump unless it is every fourth frame. | ||||||||||
| BC83 | INC (IX+$0E) | Take a step. | ||||||||||
|
Choose the sprite list for the step.
|
||||||||||||
| ChooseOutlawBody_Step | BC86 | LD A,(IX+$0E) | Fetch the step. | |||||||||
| BC89 | AND %00000001 | Keep the lowest bit. | ||||||||||
| BC8B | LD DE,$B5AA | Point DE at BodyImageNumbers. | ||||||||||
| BC8E | RET Z | Return if the step is even. | ||||||||||
| BC8F | LD DE,$B5AD | Point DE at BodyImageNumbers_SecondStep. | ||||||||||
| BC92 | RET | Return. | ||||||||||
| Prev: BC37 | Up: Map | Next: BC93 |