![]() |
Routines |
| Prev: B730 | Up: Map | Next: B752 |
|
Used by the routine at DrawShipTop.
Checks the controls for the fire key. The extra key is dealt with by CheckSpecialShot first. When fire is pressed, and the six frames since the last shot have passed, a shot is launched.
|
||||
| FireWeapons | B731 | CALL CheckSpecialShot | Call CheckSpecialShot. | |
| B734 | LD A,($5C39) | The frames before the next shot. | ||
| B737 | AND A | Jump to FireWeapons_Fire if A is zero. | ||
| B738 | JR Z,FireWeapons_Fire | |||
| B73A | DEC A | Step A back. | ||
| B73B | LD ($5C39),A | One fewer frame before the next shot. | ||
| B73E | RET | Return. | ||
| FireWeapons_Fire | B73F | LD A,($5C37) | The controls. | |
| B742 | BIT 4,A | Return if bit 4 of A is clear. | ||
| B744 | RET Z | |||
| B745 | LD A,$06 | A=06. | ||
| B747 | LD ($5C39),A | Six frames before the next shot. | ||
| B74A | LD A,($B730) | The weapon toggle. | ||
| B74D | XOR %00000001 | Flip the bits of A that are set in 01. | ||
| B74F | LD ($B730),A | Update the weapon toggle. | ||
|
Continue on to LaunchShot.
|
||||
| Prev: B730 | Up: Map | Next: B752 |