![]() |
Routines |
| Prev: CAEA | Up: Map | Next: CB24 |
|
Used by the routine at InitialiseGame.
Counts FireTimer down and fills the chamber for BulletsLoaded from ChamberColours. The colours are used from the last to the first.
|
||||
|
Count down FireTimer and pick a colour from ChamberColours.
|
||||
| FlashChamber | CB03 | LD A,($A245) | Return if FireTimer is zero. | |
| CB06 | AND A | |||
| CB07 | RET Z | |||
| CB08 | DEC A | Count FireTimer down. | ||
| CB09 | LD ($A245),A | |||
| CB0C | LD HL,$CB24 | Point HL at ChamberColours. | ||
| CB0F | CALL AddAToHL | Call AddAToHL. | ||
| CB12 | LD A,(HL) | Fetch the colour. | ||
| CB13 | PUSH AF | Stash the colour on the stack. | ||
|
Fill the chamber for BulletsLoaded.
|
||||
| CB14 | LD A,($A262) | Fetch BulletsLoaded. | ||
| CB17 | LD BC,$C9E0 | Point BC at ChamberAddresses. | ||
| CB1A | CALL GetTableEntry | Call GetTableEntry. | ||
| CB1D | CALL AddTownOffsetToHL | Call AddTownOffsetToHL. | ||
| CB20 | POP AF | Restore the colour from the stack. | ||
| CB21 | JP FillChamber | Jump to FillChamber. | ||
| Prev: CAEA | Up: Map | Next: CB24 |