![]()  | 
Routines | 
| Prev: A6CF | Up: Map | Next: A6FD | 
| 
 
Used by the routine at ABB1.
 
The data in Table_RoomMap is stored in a particular order for each room:  
 
  | 
||||||||||||||||||||||
| MovePlayer | A6E8 | LD B,$00 | Initialise B with 00 so the movement value is now in BC. | |||||||||||||||||||
| A6EA | CALL GetRoomPointer | Call GetRoomPointer. | ||||||||||||||||||||
| 
 
HL now holds a pointer to the room data for the current room at Table_RoomMap.
 
 | 
||||||||||||||||||||||
| A6ED | ADD HL,BC | Add the movement value to HL. | ||||||||||||||||||||
| A6EE | LD A,(HL) | Fetch the entry from *HL and store it in A. | ||||||||||||||||||||
| A6EF | OR A | Jump to Response_YouCantGoInThatDirection if there is no exit at the requested memory location. | ||||||||||||||||||||
| A6F0 | JR Z,Response_YouCantGoInThatDirection | |||||||||||||||||||||
| A6F2 | CALL ChangeRoom | Call ChangeRoom. | ||||||||||||||||||||
| A6F5 | RET | Return. | ||||||||||||||||||||
| 
 
Print "You can't go in that direction.".
 
 | 
||||||||||||||||||||||
| Response_YouCantGoInThatDirection | A6F6 | LD HL,$0022 | HL=Messaging_YouCantGoInThatDirection. | |||||||||||||||||||
| A6F9 | CALL PrintCompressedStringAndNewline | Call PrintCompressedStringAndNewline. | ||||||||||||||||||||
| A6FC | RET | Return. | ||||||||||||||||||||
| Prev: A6CF | Up: Map | Next: A6FD |