Prev: 58268 Up: Map Next: 58357
58281: Read The Source At The Display Pointer
Used by the routine at ReadCharacterTextPointers.
Reads the display pointer and shifts it to the picture address. Always returns non-zero.
ReadSourceDisplayPointer 58281 LD DE,(41007) Read the display pointer.
58285 RES 7,D
58287 RL E
58289 SRA D Shift DE right one bit, keeping the sign of D.
58291 RR E
58293 OR 1
58295 RET Return.
Reached through the display record at 58346, dispatched by DispatchLookedUpHandlerThird.
58296 CALL CheckCharacterForRoomGraphics Return if the room display parameter does not apply.
58299 RET Z
58300 LD A,(41014) Read the current character.
58303 PUSH AF
58304 LD A,(41012) Call FindCharacterScriptEntry to find character script entry.
58307 INC A
58308 LD (41014),A
58311 CALL FindCharacterScriptEntry
58314 EX AF,AF' Record the current character.
58315 POP AF
58316 LD (41014),A
58319 EX AF,AF' Go to ReadSourceDisplayPointer_TestActionSucceeded if FindCharacterScriptEntry found no script entry for this character.
58320 JR Z,ReadSourceDisplayPointer_TestActionSucceeded
58322 LD A,(IX+3) Take the object id at offset 3 and call FetchObjectDataPointer to look it up.
58325 CALL FetchObjectDataPointer
58328 LD IY,(40983) Read the current character record.
58332 LD A,(IX+4) Read the attribute type.
None of the bits 112 are set in the tested state?
58335 AND (IY+4) Return zero through ParseInputNumber_ReturnZero if none of the bits 112 are set in the tested state.
58338 AND 112
58340 JP Z,ParseInputNumber_ReturnZero
ReadSourceDisplayPointer_TestActionSucceeded 58343 OR %00000001 Reset the zero flag.
58345 RET Return.
58346 DEFB 120,32,184,227,144,64,40,0 Display record read by ProcessDisplayRecord: flags 120 value 32 handler 58296, parameters 144 64 40 0 0.
58354 DEFB 0
Run by 51812 after the display record at 58346.
ReadSourceDisplayPointer_CurrentCharacterRecord 58355 JR CheckCharacterForRoomGraphics_CharacterRecord Store the current room on the character from CheckCharacterForRoomGraphics_CharacterRecord.
Prev: 58268 Up: Map Next: 58357