Prev: 8EF4 Up: Map Next: 8F13
8EF8: Action: Down
Try to leave downwards.
ActionDown 8EF8 LD C,$05 Set C to "DOWN" (05).
This entry point is used by the routines at Action_North, Action_South, Action_East, Action_West and Action_Up.
The movement commands share this common exit handler.
ActionDown_Step1 8EFA CALL Parser_ValidateNoDirectObject Call Parser_ValidateNoDirectObject; return if the command names an object.
8EFD RET C
8EFE LD B,$00 Read the exit byte for the chosen direction.
8F00 CALL GetRoomPointer
8F03 ADD HL,BC
8F04 LD A,(HL)
8F05 OR A Jump to ActionDown_Step2 if that direction is closed.
8F06 JR Z,ActionDown_Step2
8F08 CALL MovePlayerToRoom Call MovePlayerToRoom.
8F0B RET Return.
Print "You can't go in that direction.".
ActionDown_Step2 8F0C LD HL,$7831 HL=Messaging_YouCanTGoInThatDirection.
8F0F CALL PrintStringAndANewline Call PrintStringAndANewline.
8F12 RET Return.
Prev: 8EF4 Up: Map Next: 8F13