![]() |
Routines |
| Prev: D21C | Up: Map | Next: D237 |
|
Used by the routines at ReadRoomDisplayParameter, CharacterAction_InspectorLestrade, PointToLocationDataPlusOne, TestLowBitsOfCharacter, TestLowBitsOfGraphics, SetObjectPointers, ProcessLocationToken, DescribeCurrentRoom, FetchCurrentCharacterLocation, ProcessObjectEntryAlternate, GetLocationExitData, StoreMatchedCharacterRoom and CheckCharacterForRoomGraphics.
Turns a room id into the address of that room's data.
|
||||||||||||
| FetchLocationDataPointer | D224 | PUSH DE | Use the locations at Table_Locations. | |||||||||
| D225 | LD DE,$840B | |||||||||||
| D228 | PUSH HL | |||||||||||
| D229 | LD L,A | |||||||||||
| D22A | LD H,$00 | |||||||||||
| D22C | ADD HL,HL | Double the room id, because each location entry is a word. | ||||||||||
| D22D | ADD HL,DE | Add the base table address to the offset to point to the requested room address. | ||||||||||
| D22E | LD E,(HL) | Read the location address for this room. | ||||||||||
| D22F | INC HL | |||||||||||
| D230 | LD D,(HL) | |||||||||||
| D231 | PUSH DE | |||||||||||
| D232 | POP IX | |||||||||||
| D234 | POP HL | Restore the saved pointer and the saved source from the stack. | ||||||||||
| D235 | POP DE | |||||||||||
| D236 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: D21C | Up: Map | Next: D237 |