Prev: 50877 Up: Map Next: 50978
50944: Apply Gravity And Move
Input
IX The address of the object
Speed the fall, then stay clear of walls and other objects.
ApplyGravityAndMove 50944 DEC (IX+11) Take one off the z speed of the object.
50947 CALL BlockMovement Stop the object moving through other objects and the walls of the room.
This entry point is used by the routine at MovePlayer.
Add the speeds to the position.
MoveObject 50950 LD A,(IX+1) Fetch the x position of the object.
50953 ADD A,(IX+9) Add the speed along the x axis.
50956 LD (IX+1),A Set the new x position.
50959 LD A,(IX+2) Fetch the y position of the object.
50962 ADD A,(IX+10) Add the speed along the y axis.
50965 LD (IX+2),A Set the new y position.
50968 LD A,(IX+3) Fetch the z position of the object.
50971 ADD A,(IX+11) Add the speed along the z axis.
50974 LD (IX+3),A Set the new z position.
50977 RET Return.
View the equivalent code in;
Prev: 50877 Up: Map Next: 50978