Prev: D21C Up: Map Next: D237
D224: Fetch Location Data Pointer
Used by the routines at 9DFF, A4AB, C4D1, C8EF, D0DD, D102, D33C, D36A, D5EF and DC6C.
Input
A Room ID
Output
IX Pointer to location data
FetchLocationDataPointer D224 PUSH DE Stash DE on the stack.
D225 LD DE,$840B Load Table_Locations into DE.
D228 PUSH HL Stash HL on the stack.
D229 LD L,A Load the room ID into HL.
D22A LD H,$00
D22C ADD HL,HL Double the offset value held in HL.
D22D ADD HL,DE Add the base table address to the offset to point to the requested room address.
D22E LD E,(HL) Fetch the location data address and store the pointer in IX.
D22F INC HL
D230 LD D,(HL)
D231 PUSH DE
D232 POP IX
D234 POP HL Restore HL and DE from the stack.
D235 POP DE
D236 RET Return.
Prev: D21C Up: Map Next: D237