![]() |
Routines |
| Prev: CAC6 | Up: Map | Next: CB03 |
|
Used by the routine at HandleSheriff.
Changes the middle sprite of SheriffSpriteList to a firing pose while FireTimer is not zero. Type 15 is left as it is. Bit 2 of the walking frame chooses sprite 16 or 1B.
|
||||||||
|
Return unless the sheriff on foot has just fired.
|
||||||||
| ShowFiringPose | CAEA | LD A,($A245) | Return if FireTimer is zero. | |||||
| CAED | AND A | |||||||
| CAEE | RET Z | |||||||
| CAEF | LD A,(IX+$00) | Fetch the type. | ||||||
| CAF2 | CP $15 | Return if the type is 15. | ||||||
| CAF4 | RET Z | |||||||
|
Choose the firing torso from bit 2 of the walking frame.
|
||||||||
| CAF5 | BIT 2,(IX+$0C) | Test bit 2 of the walking frame. | ||||||
| CAF9 | LD A,$16 | Use sprite 16. | ||||||
| CAFB | JR Z,ShowFiringPose_Store | Jump to ShowFiringPose_Store if bit 2 is not set. | ||||||
| CAFD | ADD A,$05 | Add 05. | ||||||
|
Store it as the middle sprite of SheriffSpriteList.
|
||||||||
| ShowFiringPose_Store | CAFF | LD ($A22D),A | Set the middle sprite of SheriffSpriteList and return. | |||||
| CB02 | RET | |||||||
| Prev: CAC6 | Up: Map | Next: CB03 |