Prev: 49902 Up: Map Next: 49945
49910: Set Player Speed
Used by the routine at MovePlayer.
Sets the speeds along x and y of the player to walk forward. The adjustments of the speeds that arches make to nudge the player into doorways are added first, then the speed of 3 in the direction that the player is facing.
Input
IX The address of the object
Add the doorway nudges.
SetPlayerSpeed 49910 LD A,(IX+9) Fetch the speed along the x axis.
49913 ADD A,(IX+14) Add the adjustment along x.
49916 LD (IX+9),A Store the speed along the x axis.
49919 LD A,(IX+10) Fetch the speed along the y axis.
49922 ADD A,(IX+15) Add the adjustment along y.
49925 LD (IX+10),A Store the speed along the y axis.
49928 XOR A Write 0 to the adjustments along x and y.
49929 LD (IX+14),A
49932 LD (IX+15),A
Jump by the facing direction.
49935 LD BC,49967 Point BC at PlayerMovementTable.
This entry point is used by the routines at NudgePlayerToArch and HandleRoomExit.
SetPlayerSpeed_Direction 49938 CALL GetFacingDirection Call GetFacingDirection.
49941 LD L,A Copy it to L.
49942 JP RunGame_JumpToHandler Jump to RunGame_JumpToHandler.
View the equivalent code in;
Prev: 49902 Up: Map Next: 49945