Prev: 47547 Up: Map Next: 47627
47596: Set Ship Speeds
Used by the routines at AttachItemToShip, BuildShip and RunFrame.
Gives the ship (at ShipObject) horizontal and vertical speeds that are the opposite of the two scroll speeds, with no fractions. Moving the ship at these speeds makes it stay in the same place on the screen.
SetShipSpeeds 47596 LD IX,51429 The ship.
47600 LD A,(52411) The horizontal scroll speed.
47603 NEG Negate A.
47605 LD (IX+7),A Write A to offset 7 of IX.
47608 LD A,(52410) The vertical scroll speed.
47611 NEG Negate A.
47613 LD (IX+9),A Write A to offset 9 of IX.
47616 LD (IX+8),0 Store 0 at offset 8 of IX.
47620 LD (IX+10),0 Store 0 at offset 10 of IX.
47624 RET Return.
47625 NOP Do nothing.
47626 NOP Do nothing.
Prev: 47547 Up: Map Next: 47627