Prev: 56387 Up: Map Next: 56433
56416: Move Player
Used by the routine at UpdatePlayerLegs.
Moves the player. When the control to move forward is used, the speed of the player is raised towards the maximum speed in MaximumSpeed. Otherwise the player slows down and stops at a position that is a multiple of eight units from the edge of a cell.
Input
E Controls
IX Player
Walk if bit 2 is set.
MovePlayer 56416 BIT 2,E Jump to SpeedPlayerUp if the control to move forward is used.
56418 JR NZ,SpeedPlayerUp
Otherwise slow down in the direction of the heading.
56420 LD A,(IX+6) Fetch the direction.
56423 RLCA Move the direction into the lowest two bits.
56424 RLCA
56425 AND %00000011 Keep only the direction.
Jump to the routine for the direction, to find the part of the position that is along the way that the player is moving.
56427 LD BC,56433 Point BC at SlowDownRoutines.
56430 JP JumpToTableRoutine Jump to JumpToTableRoutine.
View the equivalent code in;
Prev: 56387 Up: Map Next: 56433