Prev: 56441 Up: Map Next: 56540
56488: Speed Player Up
Used by the routine at MovePlayer.
Raises the speed of the player half of the way towards the maximum speed, keeping it even, and then moves the player.
SpeedPlayerUp 56488 LD A,(48062) Work out the new speed, which is the average of the current speed and the maximum speed (MaximumSpeed), made even.
56491 SUB (IX+5)
56494 SRL A
56496 ADD A,(IX+5)
56499 AND 254
This entry point is used by the routine at SlowPlayerDown.
Set the speed, move the player and animate the legs.
MovePlayer_Speed 56501 LD (IX+5),A Set the speed of the player.
56504 CALL SetVelocityFromSpeed Set the velocity of the player from its speed and direction.
56507 CALL TestMove Test whether the move is blocked by the scenery.
56510 CALL MoveObject Move the player.
56513 CALL MarkCellVisited Mark the cell that the player is in as visited.
56516 CALL PlayMovementSound Play the sound for walking.
56519 LD A,(IX+0) Move on to the next sprite for the legs, from 0 to 5.
56522 LD C,A
56523 INC A
56524 AND 7
56526 CP 6
56528 JR C,MovePlayer_SetLegs
56530 XOR A Clear the sprite number if it went past 5.
MovePlayer_SetLegs 56531 LD B,A Set the type of the legs.
56532 LD A,C
56533 AND 248
56535 OR B
56536 LD (IX+0),A
56539 RET Return.
View the equivalent code in;
Prev: 56441 Up: Map Next: 56540