Prev: D0DC Up: Map Next: D102
D0DD: Process Location Token
Looks the room up and, unless an exit line is already being printed, chooses the exit text from the room's direction bits.
Input
A Room ID
ProcessLocationToken D0DD PUSH AF Keep the room, then call FetchLocationDataPointer to look up this room.
D0DE CALL FetchLocationDataPointer
D0E1 LD A,($D0DC) Read the location-token flag at LocationTokenProcessingFlag.
D0E4 AND A
D0E5 LD HL,$68E4 Take the exit text and go to ProcessLocationToken_Next if location token processing is on.
D0E8 JR NZ,ProcessLocationToken_Next
D0EA LD A,(IX+$00) Read the record's flag byte.
D0ED AND %00001110 Take bits 1-3 of the flag byte as an even offset into the tokens at Table_Tokens.
D0EF LD E,A Use the tokens at Table_Tokens.
D0F0 LD D,$00
D0F2 LD HL,$D05A
D0F5 ADD HL,DE
D0F6 LD E,(HL)
D0F7 INC HL Call WriteTokenToBuffer to write token to buffer.
D0F8 LD D,(HL)
D0F9 EX DE,HL
D0FA CALL WriteTokenToBuffer
D0FD LD HL,$68DD Use the message (68DD).
ProcessLocationToken_Next D100 POP AF Restore AF from the stack.
D101 RET Return.
View the equivalent code in;
Prev: D0DC Up: Map Next: D102