← 9FFF Handle the loss of a ball Map A14F → Per-slot heading codes, one per object-pool slot
A0A1: Animate the safety net prize's timed barrier (per-frame)
Animates the safety net prize's barrier a step per frame: it brightens, holds, dims, then blanks.
run_prize_safety_net A0A1 LD A,(safety_net_fx_phase) Idle until the safety net prize arms it.
A0A4 OR A
A0A5 RET Z
A0A6 CP $01 Arm the ramp.
A0A8 JR NZ,prize_net_ramp_up
A0AA INC A Advance to the brighten phase and reset the step index.
A0AB LD (safety_net_fx_phase),A
A0AE XOR A
A0AF LD (safety_net_fx_step),A
A0B2 CALL draw_mirror_wall Lay the mirror side wall down at base brightness.
A0B5 LD A,$01 Arm the safety net sound.
A0B7 LD (sfx_net),A
A0BA RET
prize_net_ramp_up A0BB CP $02 Brighten the net one step per frame.
A0BD JR NZ,prize_net_hold
A0BF LD HL,safety_net_ramp_up Index the upward attribute ramp by the step index.
A0C2 LD A,(safety_net_fx_step)
A0C5 LD E,A
A0C6 LD D,$00
A0C8 ADD HL,DE
A0C9 LD A,(HL)
A0CA CALL draw_mirror_wall Repaint the net's attributes.
A0CD LD HL,safety_net_fx_step
A0D0 INC (HL)
A0D1 LD A,(HL)
A0D2 CP $18 When the net is at full brightness, advance to the hold and clear the net back to base.
A0D4 RET NZ
A0D5 LD HL,safety_net_fx_phase
A0D8 INC (HL)
A0D9 XOR A
A0DA LD (safety_net_fx_step),A
A0DD XOR A
A0DE CALL draw_mirror_wall
A0E1 RET
prize_net_hold A0E2 CP $03 The timed hold
A0E4 JR NZ,prize_net_ramp_down
A0E6 LD HL,safety_net_fx_hold
A0E9 INC (HL) Tick the hold timer each frame. On the frame it wraps to 0, once every 256 frames, bump the step.
A0EA RET NZ
A0EB LD HL,safety_net_fx_step
A0EE INC (HL)
A0EF LD A,(HL)
A0F0 CP $05 On the fifth step, advance to the dim phase, reset the step and re-arm the sound.
A0F2 RET NZ
A0F3 LD HL,safety_net_fx_phase
A0F6 INC (HL)
A0F7 XOR A
A0F8 LD (safety_net_fx_step),A
A0FB LD A,$01
A0FD LD (sfx_net),A
A100 RET
prize_net_ramp_down A101 LD HL,safety_net_ramp_fall Dim the net with the downward ramp, one step per frame.
A104 LD A,(safety_net_fx_step)
A107 LD E,A
A108 LD D,$00
A10A ADD HL,DE
A10B LD A,(HL)
A10C CALL draw_mirror_wall
A10F LD HL,safety_net_fx_step
A112 INC (HL)
A113 LD A,(HL)
A114 CP $18 When the net is dark, end the effect:
A116 RET NZ
A117 XOR A
A118 LD (safety_net_fx_phase),A Clear the phase.
A11B CALL blank_safety_net Erase the net from the side band.
A11E RET
safety_net_ramp_up A11F DEFB $40 Upward attribute ramp for the flash
A120 DEFB $40
A121 DEFB $40
A122 DEFB $41
A123 DEFB $41
A124 DEFB $41
A125 DEFB $42
A126 DEFB $42
A127 DEFB $42
A128 DEFB $43
A129 DEFB $43
A12A DEFB $43
A12B DEFB $44
A12C DEFB $44
A12D DEFB $44
A12E DEFB $45
A12F DEFB $45
A130 DEFB $45
A131 DEFB $46
A132 DEFB $46
A133 DEFB $46
A134 DEFB $47
A135 DEFB $47
A136 DEFB $47
safety_net_ramp_fall A137 DEFB $47 Downward attribute ramp, the mirror of the upward one
A138 DEFB $47
A139 DEFB $47
A13A DEFB $46
A13B DEFB $46
A13C DEFB $46
A13D DEFB $45
A13E DEFB $45
A13F DEFB $45
A140 DEFB $44
A141 DEFB $44
A142 DEFB $44
A143 DEFB $43
A144 DEFB $43
A145 DEFB $43
A146 DEFB $42
A147 DEFB $42
A148 DEFB $42
A149 DEFB $41
A14A DEFB $41
A14B DEFB $41
A14C DEFB $40
A14D DEFB $40
A14E DEFB $40
← 9FFF Handle the loss of a ball Map A14F → Per-slot heading codes, one per object-pool slot
Fork me on GitHub