Prev: 60963 Up: Map Next: 60989
60965: Move Player
Used by the routines at Action_North, Action_South, Action_East, Action_West and Action_Up.
Input
C Requested direction where:
0 NORTH
1 SOUTH
2 EAST
3 WEST
4 UP
5 DOWN
MovePlayer 60965 CALL Parser_ValidateNoDirectObject Call Parser_ValidateNoDirectObject.
All "MOVE" commands can only be called on their own; you can't type "NORTH TO BEACH" or "UP LADDER".
60968 RET C Return if there's any token set in UserInput_SecondToken.
60969 LD B,0 Set B to 0, so that BC now holds the direction number.
60971 CALL GetRoomPointer Call GetRoomPointer.
60974 ADD HL,BC HL+=BC.
60975 LD A,(HL) A=*HL.
60976 OR A Jump to MovePlayer_Invalid if A is zero.
60977 JR Z,MovePlayer_Invalid
60979 CALL Handler_InjuryCheck Call Handler_InjuryCheck.
60982 RET Return.
Nothing else is valid.
Print "You can't go in that direction.".
MovePlayer_Invalid 60983 LD HL,48434 HL=Messaging_YouCantGoInThatDirection.
60986 JP PrintResponse Jump to PrintResponse.
Prev: 60963 Up: Map Next: 60989