Prev: BFAB Up: Map Next: BFD8
BFB6: Apply Gravity And Move
Input
IX The address of the object
Speed the fall, then stay clear of walls and other objects.
ApplyGravityAndMove BFB6 DEC (IX+$0B) Take one off the z speed of the object.
BFB9 CALL BlockMovement Call BlockMovement.
This entry point is used by the routine at MovePlayer.
Add the speeds to the position.
MoveObject BFBC LD A,(IX+$01) Fetch the x position of the object.
BFBF ADD A,(IX+$09) Add the speed along the x axis.
BFC2 LD (IX+$01),A Set the new x position.
BFC5 LD A,(IX+$02) Fetch the y position of the object.
BFC8 ADD A,(IX+$0A) Add the speed along the y axis.
BFCB LD (IX+$02),A Set the new y position.
BFCE LD A,(IX+$03) Fetch the z position of the object.
BFD1 ADD A,(IX+$0B) Add the speed along the z axis.
BFD4 LD (IX+$03),A Set the new z position.
BFD7 RET Return.
View the equivalent code in;
Prev: BFAB Up: Map Next: BFD8