Prev: 52944 Up: Map Next: 53064
53045: Check Wall Vertical
Used by the routine at TestMoveUp.
Checks whether an object that is moving in the direction of heading zero touches a wall in the cell containing a point. If it does, VerticalSpeed is reduced by twice the depth and the object is marked as having hit a wall.
Input
DE The horizontal position of the point
HL The vertical position of the point
IX The address of the object
Output
F The carry flag is set if the object hit a wall
Check the walls, then push the object back if it is touching one.
CheckWallVertical 53045 CALL CheckWallsHorizontalFirst Call CheckWallsHorizontalFirst.
53048 RET NC Return if the object is not touching a wall.
This entry point is used by the routine at CheckWallVerticalReverse.
Reduce VerticalSpeed by twice the depth.
CheckWallVertical_PushBack 53049 ADD A,A Double the depth and keep it in C.
53050 LD C,A
53051 LD A,(41493) Fetch VerticalSpeed.
53054 ADD A,C Add the depth and set VerticalSpeed.
53055 LD (41493),A
This entry point is used by the routine at CheckWallHorizontal.
Mark the object as having hit a wall.
CheckWall_Hit 53058 SET 0,(IX+7) Set bit 0 of the flags of the object.
53062 SCF Set the carry flag and return.
53063 RET
View the equivalent code in;
Prev: 52944 Up: Map Next: 53064