Prev: B436 Up: Map Next: B4D3
B456: Handle spray weapon fire
Used by the routine at B372.
B456 LD A,($A014) Set A the energy level of the weapon
B459 CP $04 Jump forward if energy level less than 4
B45B JP C,$B47D
B45E LD B,$04 Set B the number of spray bullets
B460 LD HL,$B436 Set HL to the address point for data configuration of spray projectiles
B463 LD A,($A014) Jump forward if energy level is 4
B466 CP $04
B468 JP Z,$B46D
B46B LD B,$08 If energy level is 5 then the number of bullets to fire is 8
B46D PUSH BC Save BC and HL
B46E PUSH HL
B46F CALL $B506 Configure weapon sound and check for weapon free slot
B472 CALL $B5A5 Create a new projectile for spray
B475 POP HL Restore HL
B476 CALL $B4D3 Configure spray weapon projectile based on HL data pointer
B479 POP BC Restore BC
B47A DJNZ $B46D Jump until all the spray projectiles configured
B47C RET
create spray projectiles based on energy level
B47D CALL $B5A5 Create a new projectile for spray
B480 LD (IY+$05),$00 Set y-delta to 0
B484 CALL $B506 Configure weapon sound and check for weapon free slot
B487 CALL $B5A5 Create a new projectile for spray
B48A LD A,$01 Set A y-delta for projectile
B48C CALL $B4EA Computes offset into the room graphic data based on projectile y-delta
B48F CALL $B506 Configure weapon sound and check for weapon free slot
B492 CALL $B5A5 Create a new projectile for spray
B495 LD A,$FF Set A y-delta for projectile
B497 CALL $B4EA Computes offset into the room graphic data based on projectile y-delta
B49A LD A,($A014) Return if weapon energy level is 1
B49D CP $01
B49F RET Z
B4A0 CALL $B506 Configure weapon sound and check for weapon free slot
B4A3 CALL $B5A5 Create a new projectile for spray
B4A6 LD A,$02 Set A y-delta for projectile
B4A8 CALL $B4EA Computes offset into the room graphic data based on projectile y-delta
B4AB CALL $B506 Configure weapon sound and check for weapon free slot
B4AE CALL $B5A5 Create a new projectile for spray
B4B1 LD A,$FE Set A y-delta for projectile
B4B3 CALL $B4EA Computes offset into the room graphic data based on projectile y-delta
B4B6 LD A,($A014) Return if weapon energy level is 2
B4B9 CP $02
B4BB RET Z
B4BC CALL $B506 Configure weapon sound and check for weapon free slot
B4BF CALL $B5A5 Create a new projectile for spray
B4C2 LD A,$03 Set A y-delta for projectile
B4C4 CALL $B4EA Computes offset into the room graphic data based on projectile y-delta
B4C7 CALL $B506 Configure weapon sound and check for weapon free slot
B4CA CALL $B5A5 Create a new projectile for spray
B4CD LD A,$FD Set A y-delta for projectile
B4CF CALL $B4EA Computes offset into the room graphic data based on projectile y-delta
B4D2 RET
Prev: B436 Up: Map Next: B4D3