Prev: 60994 Up: Map Next: 61030
61012: Move Object Vertically
Used by the routines at Handle_Flying_Creature and Handle_Carrying_Eagle.
Adds a velocity to the y position of an object. It works like Move_Object_Horizontally, but with the y position and its fraction (byte 13 of the record).
Input
HL The y velocity, with the sign extended to sixteen bits
IX Object record
Output
A The new y position
F The zero flag is set if the new y position is less than 128
Move_Object_Vertically 61012 ADD HL,HL Multiply the velocity by sixteen.
61013 ADD HL,HL
61014 ADD HL,HL
61015 ADD HL,HL
61016 LD C,(IX+13) Fetch the fraction of the y position.
61019 LD B,(IX+3) Fetch the y position.
61022 ADD HL,BC Add the velocity to the position.
61023 LD (IX+13),L Store the new fraction.
61026 LD A,H Fetch the new y position.
61027 BIT 7,A Test bit 7 of the new y position.
61029 RET Return.
Prev: 60994 Up: Map Next: 61030