![]() |
Routines |
| Prev: 8EF4 | Up: Map | Next: 8F13 |
|
Move in the given direction, or report that there is no exit.
|
||||
| ActionDown | 8EF8 | LD C,$05 | Select the down exit. | |
|
This entry point is used by the routines at Action_North, Action_South, Action_East, Action_West and Action_Up.
|
||||
| ActionDown_Step1 | 8EFA | CALL Parser_ValidateNoDirectObject | Return if the command names an object: the player is told to rephrase it. | |
| 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 | That direction is closed when the exit byte is zero. | ||
| 8F06 | JR Z,ActionDown_Step2 | |||
| 8F08 | CALL MovePlayerToRoom | Call MovePlayerToRoom to move the player. | ||
| 8F0B | RET | Return. | ||
| ActionDown_Step2 | 8F0C | LD HL,$7831 | Print You can't go in that direction.. | |
| 8F0F | CALL PrintStringAndANewline | |||
| 8F12 | RET | Return. | ||
| Prev: 8EF4 | Up: Map | Next: 8F13 |