Prev: B6F0 Up: Map Next: B772
B6FD: Process Location Display
Used by the routines at ProcessDisplayEntry and ProcessDisplayEntryAlternate.
Clears the display mark, saves the location pointer, and reads the character's room.
Input
HL Location pointer
ProcessLocationDisplay B6FD XOR A Clear the display.
B6FE LD ($B77E),A
B701 LD ($B6D8),HL Call FetchCurrentCharacterLocation to fetch current character location.
B704 CALL FetchCurrentCharacterLocation
B707 LD L,(IX+$07) Read the word at offset 07 of this character record.
B70A LD H,(IX+$08)
B70D LD A,H See whether the pointer is empty.
B70E OR L
B70F RET Z Return when this character has no script pointer.
B710 PUSH HL Point IX at the script.
B711 POP IX
B713 LD HL,$0000 Write 0000 to *B6D6.
B716 LD ($B6D6),HL
B719 LD IY,$AAAC Use the buffer: co-ordinate data at Buffer_CoordinateData.
ProcessLocationDisplay_Loop B71D LD HL,$AAAC Call ClearBuffer to clear buffer.
B720 LD B,$06
B722 CALL ClearBuffer
ProcessLocationDisplay_RunTextToken B725 CALL ProcessTextTokenStream Return if there is no further text token.
B728 RET Z
B729 CALL ReadDictionaryHighNibble Jump ahead to ProcessLocationDisplay_Next if it is 50.
B72C CP $50
B72E JR Z,ProcessLocationDisplay_Next
B730 CP $60 Jump back to ProcessLocationDisplay_RunTextToken while it is not 60.
B732 JR NZ,ProcessLocationDisplay_RunTextToken
B734 LD (IY+$02),E Store the word pointer at offset 02 and call ProcessTextTokenStream to read the text.
B737 LD (IY+$03),D
B73A CALL ProcessTextTokenStream
B73D RET Z Return if there is no further text token.
B73E CALL ReadDictionaryHighNibble Jump ahead to ProcessLocationDisplay_Next if it is 50.
B741 CP $50
B743 JR Z,ProcessLocationDisplay_Next
B745 CP $60 Jump back to ProcessLocationDisplay_Loop while it is not 60.
B747 JR NZ,ProcessLocationDisplay_Loop
B749 LD (IY+$04),E Store the word pointer at offset 04 and call ProcessTextTokenStream to read the text.
B74C LD (IY+$05),D
B74F CALL ProcessTextTokenStream
B752 RET Z Return if there is no further text token.
B753 CALL ReadDictionaryHighNibble Jump back to ProcessLocationDisplay_Loop while it is not 50.
B756 CP $50
B758 JR NZ,ProcessLocationDisplay_Loop
ProcessLocationDisplay_Next B75A LD (IY+$00),E Store DE at IY+00-01.
B75D LD (IY+$01),D
B760 LD HL,($B6D8) Read the display pointers.
B763 CALL CompareFollowingFields Jump back to ProcessLocationDisplay_Loop while the room fields do not match.
B766 JR NZ,ProcessLocationDisplay_Loop
B768 LD IX,($B6D6) Call FollowRecordPointer to follow the record pointer.
B76C CALL FollowRecordPointer
B76F OR %00000001 Reset the zero flag.
B771 RET Return.
Prev: B6F0 Up: Map Next: B772