Prev: 52135 Up: Map Next: 52235
52162: Process Character Display
Used by the routine at CheckCharacterDisguise.
See whether the display flag is the end marker before returning.
ProcessCharacterDisplay_TestDisplayFlagEnd 52162 CP 255 Return if the character is the end marker.
52164 RET Z
52165 AND A Return if the character is zero.
52166 RET Z
52167 LD B,A Call GetObjectFirstLocation to read the object's first location.
52168 CALL GetObjectFirstLocation
52171 LD C,A Store the result in the low byte of the count.
52172 LD A,(40969) Read Sherlock's disguise.
52175 CP C See whether the two values match.
52176 RET NZ Return if they differ.
52177 LD A,1 Write 1 to the system Variables.
52179 LD (23612),A
52182 PUSH DE
ProcessCharacterDisplay_LookObject 52183 LD A,B Call FetchObjectDataPointer to look up that object.
52184 CALL FetchObjectDataPointer
52187 LD A,(IX+1) Jump to ProcessCharacterDisplay_CountExchangeAddress if the moved marker is 255.
52190 CP 255
52192 JR Z,ProcessCharacterDisplay_CountExchangeAddress
52194 LD B,A Jump back to ProcessCharacterDisplay_LookObject to take the count, call FetchObjectDataPointer to fetch object data pointer and read the moved marker.
52195 JR ProcessCharacterDisplay_LookObject
Point at the object attribute, remember the character, and switch to the one at Table_Timetable.
ProcessCharacterDisplay_CountExchangeAddress 52197 LD A,B Take the count, then call PointToObjectAttributeByte to point to object attribute byte.
52198 CALL PointToObjectAttributeByte
52201 EX (SP),HL Read the current character.
52202 LD A,(41014)
52205 PUSH AF
52206 LD A,(39008) Call SetCharacterPointerAndID to set character pointer and id.
52209 LD (41014),A
52212 CALL SetCharacterPointerAndID
52215 LD A,B Call CheckObjectLocationMatch to check object location match.
52216 CALL CheckObjectLocationMatch
52219 JR NZ,ProcessCharacterDisplay_ResultCharacterBeing Jump ahead to ProcessCharacterDisplay_ResultCharacterBeing to set character pointer and id if CheckObjectLocationMatch does not return 0.
52221 POP AF
52222 POP HL
52223 RET Return.
Put the saved character back and print the message.
ProcessCharacterDisplay_ResultCharacterBeing 52224 POP AF Call SetCharacterPointerAndID to set character pointer and id.
52225 LD (41014),A
52228 CALL SetCharacterPointerAndID
52231 CALL PrintTextAndHandleControlCharacters Call PrintTextAndHandleControlCharacters to print the message.
52234 RET Return.
Prev: 52135 Up: Map Next: 52235