Prev: B9BB Up: Map Next: BA0B
B9EC: 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 B9EC LD IX,$C8E5 The ship.
B9F0 LD A,($CCBB) The horizontal scroll speed.
B9F3 NEG Negate A.
B9F5 LD (IX+$07),A Write A to offset 07 of IX.
B9F8 LD A,($CCBA) The vertical scroll speed.
B9FB NEG Negate A.
B9FD LD (IX+$09),A Write A to offset 09 of IX.
BA00 LD (IX+$08),$00 Store 00 at offset 08 of IX.
BA04 LD (IX+$0A),$00 Store 00 at offset 0A of IX.
BA08 RET Return.
BA09 NOP Do nothing.
BA0A NOP Do nothing.
Prev: B9BB Up: Map Next: BA0B