| ← D05B | Map | D1B9 → |
D186: H-rotor behavior handler
|
Runs the H-rotor each frame. It animates a 12-frame loop from its sprite table and moves along its spawned heading.
|
|||
|
Its heading is set at spawn and changes only when a wall turns it aside. The far edge takes it. Destruction is its only response to a hit. Its speed, 4, comes from the speed table at spawn.
|
|||
| update_h_rotor | D186 | CALL inhabitant_react_state | Run the shared reaction machine; skip the update while a spawn or death animation plays. |
| D189 | RET C | ||
| D18A | LD HL,anim_h_rotor | Advance its 12-frame animation. | |
| D18D | CALL advance_anim | ||
| D190 | LD A,(IY+$0B) | Loop the animation: wrap the frame back to 0 at the table's end. | |
| D193 | CP $0C | ||
| D195 | JR C,update_h_rotor_0 | ||
| D197 | LD (IY+$0B),$00 | ||
| update_h_rotor_0 | D19B | CALL object_avoid_walls | Travel along the spawned heading, steered only by walls, until the far edge takes it. |
| D19E | CALL move_object | ||
| D1A1 | CALL inhabitant_offscreen | ||
| D1A4 | RET C | ||
| D1A5 | LD B,$05 | A ball kill destroys it for 50 points. | |
| D1A7 | CALL ball_kill | ||
| D1AA | RET C | ||
| D1AB | CALL overlap_sweep | The sweep kills it, and the death animation runs. | |
| D1AE | OR A | ||
| D1AF | RET Z | ||
| D1B0 | LD (IY+$0B),$00 | ||
| D1B4 | LD (IY+$0C),$02 | ||
| D1B8 | RET | ||
| ← D05B | Map | D1B9 → |
