![]() |
Routines |
| Prev: B9DA | Up: Map | Next: B9FB |
|
Used by the routine at HandleOutlawGun.
Moves the outlaw's gun on to its next frame. If the player has provoked the outlaw, which is when DrawMessageState is one, the gun moves on every frame. Otherwise it moves on after a delay which is shorter at the higher levels of skill.
|
||||||||
| AdvanceGunFrame | B9DD | LD A,($A211) | Fetch DrawMessageState. | |||||
| B9E0 | CP $01 | Jump to AdvanceGunFrame_Next to move to the next frame at once if the outlaw has been provoked. | ||||||
| B9E2 | JR Z,AdvanceGunFrame_Next | |||||||
| B9E4 | LD A,(IX+$05) | Jump to AdvanceGunFrame_Reset if the delay is zero. | ||||||
| B9E7 | AND A | |||||||
| B9E8 | JR Z,AdvanceGunFrame_Reset | |||||||
| B9EA | DEC (IX+$05) | Count down the delay. | ||||||
| B9ED | RET | Return. | ||||||
|
The delay has finished, so set a new one from the skill level.
|
||||||||
| AdvanceGunFrame_Reset | B9EE | LD A,($A261) | Fetch Skill. | |||||
| B9F1 | CPL | Invert it. | ||||||
| B9F2 | AND %00000111 | Keep a number from 00 to 07 which is smaller at the higher skill levels. | ||||||
| B9F4 | LD (IX+$05),A | Set the delay. | ||||||
| AdvanceGunFrame_Next | B9F7 | INC (IX+$0C) | Move on to the next frame. | |||||
| B9FA | RET | Return. | ||||||
| Prev: B9DA | Up: Map | Next: B9FB |