Prev: 6717 Up: Map Next: 673C
6724: Handle fire button input
Used by the routines at scan_cursor, scan_kempston, scan_sinclair and scan_keyboard.
Creates a new missile if none is currently active. Positions missile at plane X + 4, Y = $7E (just above plane). Sets CONTROLS_BIT_FIRE_SOUND to trigger the fire sound effect.
handle_fire 6724 LD A,($5EF3) Return if missile already active (Y != 0).
6727 CP $00
6729 RET NZ
672A LD A,($5F72) Create missile at (plane_X + 4, $7E).
672D ADD A,$04
672F LD B,$7E
6731 LD C,A
6732 LD ($5EF3),BC
6736 LD HL,$6BB0 Set CONTROLS_BIT_FIRE_SOUND in state_controls.
6739 SET 0,(HL)
673B RET
Prev: 6717 Up: Map Next: 673C