Prev: BF4F Up: Map Next: C1CB
C141: Configure BULB projectiles
Used by the routine at BFA8.
Configure extra-left projectile
C141 PUSH AF Save AF
C142 LD A,(IX+$00) Set into A22C the x-position of projectile based on BULB x-position
C145 SUB $18
C147 LD ($A22C),A
C14A LD A,$14 Set A the increment for the y-position of the projectile
C14C CALL $B5D4 Create new projectile
C14F LD HL,$FFFF Set into HL the offset for the address pointer into room data buffer
C152 LD (IY+$04),$F8 Set the x-delta for the projectile
C156 LD A,$02 Set the y-delta for the projectile
C158 JP $C172 Jump to finish configuration
Configure left projectile
C15B PUSH AF Save AF
C15C LD A,(IX+$00) Set into A22C the x-position of projectile based on BULB x-position
C15F SUB $18
C161 LD ($A22C),A
C164 LD A,$19 Set A the increment for the y-position of the projectile
C166 CALL $B5D4 Create new projectile
C169 LD HL,$FFFF Set into HL the offset for the address pointer into room data buffer
C16C LD (IY+$04),$F8 Set the x-delta for the projectile
C170 LD A,$08 Set the y-delta for the projectile
This entry point is used by the routines at C141, C181, C19B and C1B3.
C172 LD (IY+$07),L Set the offset into room graphic data buffer
C175 LD (IY+$08),H
C178 LD (IY+$05),$00 Set y-delta for projectile
C17C CALL $B530 Computes offset into the room graphic data based on projectile y-delta
C17F POP AF Restore AF
C180 RET
Configure middle projectile
C181 PUSH AF Save AF
C182 LD A,(IX+$00) Set into A22C the x-position of projectile based on BULB x-position
C185 SUB $10
C187 LD ($A22C),A
C18A LD A,$19 Set A the increment for the y-position of the projectile
C18C CALL $B5D4 Create new projectile
C18F LD HL,$0000 Set into HL the offset for the address pointer into room data buffer
C192 LD (IY+$04),$00 Set the x-delta for the projectile
C196 LD A,$08 Set the y-delta for the projectile
C198 JP $C172 Jump to finish configuration
Configure right projectile
C19B PUSH AF Save AF
C19C LD A,(IX+$00) Set into A22C the x-position of projectile based on BULB x-position
C19F LD ($A22C),A
C1A2 LD A,$19 Set A the increment for the y-position of the projectile
C1A4 CALL $B5D4 Create new projectile
C1A7 LD HL,$0001 Set into HL the offset for the address pointer into room data buffer
C1AA LD (IY+$04),$08 Set the x-delta for the projectile
C1AE LD A,$06 Set the y-delta for the projectile
C1B0 JP $C172 Jump to finish configuration
Configure extra-right projectile
C1B3 PUSH AF Save AF
C1B4 LD A,(IX+$00) Set into A22C the x-position of projectile based on BULB x-position
C1B7 LD ($A22C),A
C1BA LD A,$14 Set A the increment for the y-position of the projectile
C1BC CALL $B5D4 Create new projectile
C1BF LD HL,$0001 Set into HL the offset for the address pointer into room data buffer
C1C2 LD (IY+$04),$08 Set the x-delta for the projectile
C1C6 LD A,$04 Set the y-delta for the projectile
C1C8 JP $C172 Jump to finish configuration
Prev: BF4F Up: Map Next: C1CB