Prev: 73D8 Up: Map Next: 7415
73DD: Render helicopter missile (spawn new)
Spawns a new helicopter missile from an advanced helicopter. Called when processing OBJECT_HELICOPTER_ADV in the viewport loop. Plays a sound and initializes missile trajectory.
  • Returns immediately during GAMEPLAY_MODE_SCROLL_IN
  • Returns if missile already active (B != 0)
  • Plays missile launch sound via ROM BEEPER
  • Extracts helicopter position and orientation
  • Stores initial missile coordinates to helicopter_missile_coordinates_ptr
render_helicopter_missile 73DD LD A,($5F68) Return if in GAMEPLAY_MODE_SCROLL_IN.
73E0 CP $01
73E2 RET Z
73E3 LD BC,($5F73) Load missile coords from helicopter_missile_coordinates_ptr. Return if missile active (B != 0).
73E7 LD A,B
73E8 CP $00
73EA RET NZ
73EB LD DE,$0001 Play missile launch sound: BEEPER with DE=$0001, HL=$2800.
73EE LD HL,$2800
73F1 CALL $03B5
73F4 LD HL,($5F60) Load current_slot_ptr, extract [D, B, C] from helicopter's slot.
73F7 DEC HL
73F8 LD D,(HL)
73F9 DEC HL
73FA LD B,(HL)
73FB DEC HL
73FC LD C,(HL)
73FD LD A,C Align X to 8-pixel boundary (AND $F8), extract orientation bit.
73FE AND $F8
7400 LD C,A
7401 LD A,D
7402 AND $40
7404 LD ($5F75),A Store orientation to helicopter_missile_state. If right-facing, add offset via add_missile_x_offset.
7407 BIT 6,A
7409 CALL Z,add_missile_x_offset
740C INC B Add 4 to Y position (INC B × 4), store to helicopter_missile_coordinates_ptr.
740D INC B
740E INC B
740F INC B
7410 LD ($5F73),BC
7414 RET
Prev: 73D8 Up: Map Next: 7415