Prev: BFEF Up: Map Next: C05A
C03A: Scanner fire weapon
Used by the routine at C27E.
C03A CALL $A375 Set A to pseudo-random number
C03D CP $23 Return if number greater than $23
C03F RET NC
C040 LD A,$04 Set projectile type $04 (bullet)
C042 LD ($A054),A
C045 LD HL,$B436
C048 LD B,$08 Set A to the number of projectiles to shot
C04A PUSH BC Save BC and HL
C04B PUSH HL
C04C CALL $B570 Check for free projectile slot and play weapon sound
C04F CALL $B57E Creates a new projectile
C052 POP HL Restore HL
C053 CALL $B4D3 Configure position and x/y-delta for projectile
C056 POP BC Restore BC
C057 DJNZ $C04A Jump back until all projectiles created
C059 RET
Prev: BFEF Up: Map Next: C05A