Prev: C8EF Up: Map Next: C989
C929: Process Object Display Logic
Prepares the room or object named for the picture, and skips it when the record is not marked for display.
Set object pointers.
ProcessObjectDisplayLogic C929 CALL SetObjectPointers Call SetObjectPointers to point at this object's records.
C92C LD A,($A034) Jump to ProcessObjectDisplayLogic_SavedCharacterMove if the room display parameter is at least FE.
C92F CP $FE
C931 JR NC,ProcessObjectDisplayLogic_SavedCharacterMove
C933 LD IX,($A017) Read the current character record.
C937 BIT 6,(IX+$05) Jump to ProcessObjectDisplayLogic_Next if the special-description flag is clear.
C93B JR Z,ProcessObjectDisplayLogic_Next
No matching handler?
C93D XOR A Jump ahead to ProcessObjectDisplayLogic_Next if CalculateHandlerOffset finds no handler.
C93E CALL CalculateHandlerOffset
C941 JR NC,ProcessObjectDisplayLogic_Next
C943 LD A,($A033) Read the saved character and call SearchTwoByteTable to search the two-byte table.
C946 CALL SearchTwoByteTable
C949 CP $FF Jump ahead to ProcessObjectDisplayLogic_MovedMarker if the entry is not the end marker.
C94B JR NZ,ProcessObjectDisplayLogic_MovedMarker
ProcessObjectDisplayLogic_Next C94D LD A,($A00F) Jump to ProcessObjectDisplayLogic_SavedCharacterMove if the display mode is below 07.
C950 CP $07
C952 JR C,ProcessObjectDisplayLogic_SavedCharacterMove
C954 LD IX,($A013) Call CalculateHandlerOffset to calculate handler offset.
C958 LD A,($A033)
C95B CALL CalculateHandlerOffset
C95E JR NC,ProcessObjectDisplayLogic_SavedCharacterMove Jump ahead to ProcessObjectDisplayLogic_SavedCharacterMove if CalculateHandlerOffset finds no handler.
ProcessObjectDisplayLogic_MovedMarker C960 LD A,(IX+$01) Read the moved marker.
C963 LD E,A
C964 LD D,$00
C966 LD HL,$AA71 Use the lookup table: object display data at Table_ObjectDisplayData.
C969 DEC DE Index the word table at Table_ObjectDisplayData and draw that record from ProcessObjectDisplayEntry.
C96A ADD HL,DE
C96B ADD HL,DE
C96C LD E,(HL)
C96D INC HL
C96E LD D,(HL)
C96F EX DE,HL
C970 JR ProcessObjectDisplayEntry
Read the saved character, then use the display records at 9F38 as the character record, then check for the end marker.
ProcessObjectDisplayLogic_SavedCharacterMove C972 LD A,($A033) Call SearchThreeByteTable to search three-byte length table.
C975 LD IX,$9F38
C979 CALL SearchThreeByteTable
C97C CP $FF Return zero through ParseInputNumber_ReturnZero if the entry is the end marker.
C97E JP Z,ParseInputNumber_ReturnZero
C981 LD L,(IX+$01) Read the display-record pointer and draw it from ProcessObjectDisplayEntry.
C984 LD H,(IX+$02)
C987 JR ProcessObjectDisplayEntry
Prev: C8EF Up: Map Next: C989