| ← 9CB3 | Map | 9FFF → |
9F9D: Remove a ball that has passed the bat's losing edge
|
Runs once per frame. Detects a ball that has traveled past the bat's own losing edge and removes it.
With two balls live, a lost ball B just ends two-ball mode with no life lost. A lost ball A goes to the ball-loss handler.
It does nothing while the level-cleared flag holds object updates frozen or the death pause runs.
|
|||
| remove_lost_ball | 9F9D | LD A,(level_cleared) | Skip while the level-cleared flag holds object updates frozen. |
| 9FA0 | OR A | ||
| 9FA1 | RET NZ | ||
| 9FA2 | LD A,(death_pause_timer) | Skip while the death pause runs. | |
| 9FA5 | OR A | ||
| 9FA6 | RET NZ | ||
| 9FA7 | LD A,(bat_side) | Bat on the left? Use the left-edge test. | |
| 9FAA | OR A | ||
| 9FAB | JR NZ,lost_ball_left | ||
| 9FAD | LD A,(ball_b_in_play) | Bat on the right: two balls live with the secondary object a real ball? | |
| 9FB0 | OR A | ||
| 9FB1 | JR Z,lost_ball_a_right | ||
| 9FB3 | LD A,(missile_shot) | ||
| 9FB6 | OR A | ||
| 9FB7 | JR NZ,lost_ball_a_right | ||
| 9FB9 | LD IX,obj2_object | Is ball B at or past the right edge? Drop ball B only. | |
| 9FBD | LD A,(IX+$00) | ||
| 9FC0 | CP $EA | ||
| 9FC2 | JR NC,lost_ball_drop_b | ||
| lost_ball_a_right | 9FC4 | LD IX,ball_a_object | Is ball A at or past the right edge? Lose the ball. |
| 9FC8 | LD A,(IX+$00) | ||
| 9FCB | CP $EA | ||
| 9FCD | JR NC,lose_ball | ||
| 9FCF | RET | ||
| lost_ball_left | 9FD0 | LD A,(ball_b_in_play) | Bat on the left: two balls live with the secondary object a real ball? |
| 9FD3 | OR A | ||
| 9FD4 | JR Z,lost_ball_a_left | ||
| 9FD6 | LD A,(missile_shot) | ||
| 9FD9 | OR A | ||
| 9FDA | JR NZ,lost_ball_a_left | ||
| 9FDC | LD IX,obj2_object | Is ball B past the left edge? Drop ball B only. | |
| 9FE0 | LD A,(IX+$00) | ||
| 9FE3 | CP $06 | ||
| 9FE5 | JR C,lost_ball_drop_b | ||
| lost_ball_a_left | 9FE7 | LD IX,ball_a_object | Is ball A past the left edge? Lose the ball. |
| 9FEB | LD A,(IX+$00) | ||
| 9FEE | CP $06 | ||
| 9FF0 | JR C,lose_ball | ||
| 9FF2 | RET | ||
| lost_ball_drop_b | 9FF3 | XOR A | Ball B out: end two-ball mode and clear the capture slide flag. |
| 9FF4 | LD (ball_b_in_play),A | ||
| 9FF7 | LD (capture_slide),A | ||
| 9FFA | RES 0,(IX+$08) | Deactivate the secondary object; ball A plays on without losing a life. | |
| 9FFE | RET | ||
| ← 9CB3 | Map | 9FFF → |
