![]() |
Routines |
Prev: B47C | Up: Map | Next: B519 |
Used by the routine at B3B8.
|
||||
B49C | LD A,($A1AD) | Set A the energy level of the weapon | ||
B49F | CP $04 | Jump forward if energy level less than 4 | ||
B4A1 | JP C,$B4C3 | |||
B4A4 | LD B,$04 | Set B the number of spray bullets | ||
B4A6 | LD HL,$B47C | Set HL to the address point for data configuration of spray projectiles | ||
B4A9 | LD A,($A1AD) | Jump forward if energy level is 4 | ||
B4AC | CP $04 | |||
B4AE | JP Z,$B4B3 | |||
B4B1 | LD B,$08 | If energy level is 5 then the number of bullets to fire is 8 | ||
B4B3 | PUSH BC | Save BC and HL | ||
B4B4 | PUSH HL | |||
B4B5 | CALL $B54C | Configure weapon sound and check for weapon free slot | ||
B4B8 | CALL $B5EB | Create a new projectile for spray | ||
B4BB | POP HL | Restore HL | ||
B4BC | CALL $B519 | Configure spray weapon projectile based on HL data pointer | ||
B4BF | POP BC | Restore BC | ||
B4C0 | DJNZ $B4B3 | Jump until all the spray projectiles configured | ||
B4C2 | RET | |||
create spray projectiles based on energy level
|
||||
B4C3 | CALL $B5EB | Create a new projectile for spray | ||
B4C6 | LD (IY+$05),$00 | Set y-delta to 0 | ||
B4CA | CALL $B54C | Configure weapon sound and check for weapon free slot | ||
B4CD | CALL $B5EB | Create a new projectile for spray | ||
B4D0 | LD A,$01 | Set A y-delta for projectile | ||
B4D2 | CALL $B530 | Computes offset into the room graphic data based on projectile y-delta | ||
B4D5 | CALL $B54C | Configure weapon sound and check for weapon free slot | ||
B4D8 | CALL $B5EB | Create a new projectile for spray | ||
B4DB | LD A,$FF | Set A y-delta for projectile | ||
B4DD | CALL $B530 | Computes offset into the room graphic data based on projectile y-delta | ||
B4E0 | LD A,($A1AD) | Return if weapon energy level is 1 | ||
B4E3 | CP $01 | |||
B4E5 | RET Z | |||
B4E6 | CALL $B54C | Configure weapon sound and check for weapon free slot | ||
B4E9 | CALL $B5EB | Create a new projectile for spray | ||
B4EC | LD A,$02 | Set A y-delta for projectile | ||
B4EE | CALL $B530 | Computes offset into the room graphic data based on projectile y-delta | ||
B4F1 | CALL $B54C | Configure weapon sound and check for weapon free slot | ||
B4F4 | CALL $B5EB | Create a new projectile for spray | ||
B4F7 | LD A,$FE | Set A y-delta for projectile | ||
B4F9 | CALL $B530 | Computes offset into the room graphic data based on projectile y-delta | ||
B4FC | LD A,($A1AD) | Return if weapon energy level is 2 | ||
B4FF | CP $02 | |||
B501 | RET Z | |||
B502 | CALL $B54C | Configure weapon sound and check for weapon free slot | ||
B505 | CALL $B5EB | Create a new projectile for spray | ||
B508 | LD A,$03 | Set A y-delta for projectile | ||
B50A | CALL $B530 | Computes offset into the room graphic data based on projectile y-delta | ||
B50D | CALL $B54C | Configure weapon sound and check for weapon free slot | ||
B510 | CALL $B5EB | Create a new projectile for spray | ||
B513 | LD A,$FD | Set A y-delta for projectile | ||
B515 | CALL $B530 | Computes offset into the room graphic data based on projectile y-delta | ||
B518 | RET |
Prev: B47C | Up: Map | Next: B519 |