| ← D398 | Map | D47C → |
D44B: Comet behavior handler
|
Runs the comet, which falls straight down. It has two sources. The wave scripts rain it past the spawn throttle. The hockey mask drops one on the fire button. It moves straight down along the heading that the spawn initializer fixes, with no wander or wall-avoidance.
|
|||
|
Animation is the 3-frame table, wrapped at frame 3. A ball kill removes it for 50 points. When its step test finds a wall or brick, it ends in the death reaction, which frees the slot. Like the wheel it runs no sweep, so the bat and the other objects do not stop it. A wall or a brick under it does, through that same step test.
|
|||
| update_comet | D44B | CALL inhabitant_react_state | Reaction-state machine first; while a spawn or death animation plays it returns carry and skips the rest. |
| D44E | RET C | ||
| D44F | LD HL,anim_comet | Advance and wrap the 3-frame animation. | |
| D452 | CALL advance_anim | ||
| D455 | LD A,(IY+$0B) | ||
| D458 | CP $03 | ||
| D45A | JR C,comet_fly | ||
| D45C | LD (IY+$0B),$00 | ||
| comet_fly | D460 | LD B,$05 | A ball kill removes it for 50 points, banked into the pending score. |
| D462 | CALL ball_kill | ||
| D465 | RET C | ||
| D466 | CALL test_step_collision | Test the step. A blocked step means it hit a wall or brick, so reset the animation and die. | |
| D469 | LD A,(step_blocked) | ||
| D46C | OR A | ||
| D46D | JR Z,comet_step | ||
| D46F | LD (IY+$0B),$00 | ||
| D473 | LD (IY+$0C),$02 | ||
| D477 | RET | ||
| comet_step | D478 | CALL move_object | Otherwise step one frame along the heading. |
| D47B | RET | ||
| ← D398 | Map | D47C → |
