Prev: 97DF Up: Map Next: 9837
97FF: Steering: home in on the ship
Used by the routine at steer_tough_attacker.
Accelerates at a quarter of steer_towards's rate ($30) towards the ship's record (ship_record), and sets bit 7 of +$16 so that change_course runs this every pass from now on: types $14 and $16 home in for good after their first wait.
Input
IX The attacker
home_on_ship 97FF PUSH IY At the ship
9801 LD IY,ship_record
9805 CALL steer_towards
9808 POP IY
980A SET 7,(IX+$16) Every pass from now on
980E LD H,(IX+$0B) A quarter of the acceleration
9811 LD L,(IX+$0C)
9814 SRA H
9816 RR L
9818 SRA H
981A RR L
981C LD (IX+$0B),H
981F LD (IX+$0C),L
9822 LD H,(IX+$0E)
9825 LD L,(IX+$0F)
9828 SRA H
982A RR L
982C SRA H
982E RR L
9830 LD (IX+$0E),H
9833 LD (IX+$0F),L
9836 RET
Prev: 97DF Up: Map Next: 9837