Prev: C2EE Up: Map Next: C319
C2F6: 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 03 in the direction that the player is facing.
Input
IX The address of the object
Add the doorway nudges.
SetPlayerSpeed C2F6 LD A,(IX+$09) Fetch the speed along the x axis.
C2F9 ADD A,(IX+$0E) Add the adjustment along x.
C2FC LD (IX+$09),A Store the speed along the x axis.
C2FF LD A,(IX+$0A) Fetch the speed along the y axis.
C302 ADD A,(IX+$0F) Add the adjustment along y.
C305 LD (IX+$0A),A Store the speed along the y axis.
C308 XOR A Write 00 to the adjustments along x and y.
C309 LD (IX+$0E),A
C30C LD (IX+$0F),A
Jump by the facing direction.
C30F LD BC,$C32F Point BC at PlayerMovementTable.
This entry point is used by the routines at NudgePlayerToArch and HandleRoomExit.
SetPlayerSpeed_Direction C312 CALL GetFacingDirection Call GetFacingDirection.
C315 LD L,A Copy it to L.
C316 JP RunGame_JumpToHandler Jump to RunGame_JumpToHandler.
View the equivalent code in;
Prev: C2EE Up: Map Next: C319