Prev: 46832 Up: Map Next: 46962
46845: 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 46845 XOR A Clear the display.
46846 LD (46974),A
46849 LD (46808),HL Call FetchCurrentCharacterLocation to fetch current character location.
46852 CALL FetchCurrentCharacterLocation
46855 LD L,(IX+7) Read the word at offset 7 of this character record.
46858 LD H,(IX+8)
46861 LD A,H See whether the pointer is empty.
46862 OR L
46863 RET Z Return when this character has no script pointer.
46864 PUSH HL Point IX at the script.
46865 POP IX
46867 LD HL,0 Write 0000 to *46806.
46870 LD (46806),HL
46873 LD IY,43692 Use the buffer: co-ordinate data at Buffer_CoordinateData.
ProcessLocationDisplay_Loop 46877 LD HL,43692 Call ClearBuffer to clear buffer.
46880 LD B,6
46882 CALL ClearBuffer
ProcessLocationDisplay_RunTextToken 46885 CALL ProcessTextTokenStream Return if there is no further text token.
46888 RET Z
46889 CALL ReadDictionaryHighNibble Jump ahead to ProcessLocationDisplay_Next if it is 80.
46892 CP 80
46894 JR Z,ProcessLocationDisplay_Next
46896 CP 96 Jump back to ProcessLocationDisplay_RunTextToken while it is not 96.
46898 JR NZ,ProcessLocationDisplay_RunTextToken
46900 LD (IY+2),E Store the word pointer at offset 2 and call ProcessTextTokenStream to read the text.
46903 LD (IY+3),D
46906 CALL ProcessTextTokenStream
46909 RET Z Return if there is no further text token.
46910 CALL ReadDictionaryHighNibble Jump ahead to ProcessLocationDisplay_Next if it is 80.
46913 CP 80
46915 JR Z,ProcessLocationDisplay_Next
46917 CP 96 Jump back to ProcessLocationDisplay_Loop while it is not 96.
46919 JR NZ,ProcessLocationDisplay_Loop
46921 LD (IY+4),E Store the word pointer at offset 4 and call ProcessTextTokenStream to read the text.
46924 LD (IY+5),D
46927 CALL ProcessTextTokenStream
46930 RET Z Return if there is no further text token.
46931 CALL ReadDictionaryHighNibble Jump back to ProcessLocationDisplay_Loop while it is not 80.
46934 CP 80
46936 JR NZ,ProcessLocationDisplay_Loop
ProcessLocationDisplay_Next 46938 LD (IY+0),E Store DE at IY+0-1.
46941 LD (IY+1),D
46944 LD HL,(46808) Read the display pointers.
46947 CALL CompareFollowingFields Jump back to ProcessLocationDisplay_Loop while the room fields do not match.
46950 JR NZ,ProcessLocationDisplay_Loop
46952 LD IX,(46806) Call FollowRecordPointer to follow the record pointer.
46956 CALL FollowRecordPointer
46959 OR %00000001 Reset the zero flag.
46961 RET Return.
Prev: 46832 Up: Map Next: 46962