![]() |
Routines |
| Prev: 53788 | Up: Map | Next: 53815 |
|
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 | 53796 | PUSH DE | Use the locations at Table_Locations. | |||||||||
| 53797 | LD DE,33803 | |||||||||||
| 53800 | PUSH HL | |||||||||||
| 53801 | LD L,A | |||||||||||
| 53802 | LD H,0 | |||||||||||
| 53804 | ADD HL,HL | Double the room id, because each location entry is a word. | ||||||||||
| 53805 | ADD HL,DE | Add the base table address to the offset to point to the requested room address. | ||||||||||
| 53806 | LD E,(HL) | Read the location address for this room. | ||||||||||
| 53807 | INC HL | |||||||||||
| 53808 | LD D,(HL) | |||||||||||
| 53809 | PUSH DE | |||||||||||
| 53810 | POP IX | |||||||||||
| 53812 | POP HL | Restore the saved pointer and the saved source from the stack. | ||||||||||
| 53813 | POP DE | |||||||||||
| 53814 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 53788 | Up: Map | Next: 53815 |