Prev: D57C Up: Map Next: D5C9
D590: Print Object Description
Used by the routine at PrintFormattedObjectList.
Input
A Object ID
C Description type (00 or 01)
PrintObjectDescription D590 PUSH IX Stash the object pointer, object count/ description type and object ID on the stack.
D592 PUSH BC
D593 PUSH AF
D594 CALL FetchObjectDataPointer Call FetchObjectDataPointer to load the object data pointer into IX.
D597 BIT 6,(IX+$05) Jump to PrintObjectDescription_Standard if the object doesn't have a special description (bit 6 of *IX+05 is not set).
D59B JR Z,PrintObjectDescription_Standard
Print the special description text for this object.
PrintObjectDescription_Special D59D POP AF Restore the object ID from the stack.
D59E PUSH AF Stash AF and AF (preserve flags) on the stack.
D59F PUSH AF
D5A0 LD HL,$68B1 HL=68B1 (load the address of the special description text token into HL).
D5A3 JR PrintObjectDescription_PrintText Jump to PrintObjectDescription_PrintText to print the text.
Determine which standard description text to use based on the description type.
PrintObjectDescription_Standard D5A5 LD HL,$0485 HL=0485 (load address for description type 0 text into HL).
D5A8 DEC C Decrease C (the description type) by one (check if description type is 1).
D5A9 JR Z,PrintObjectDescription_PrintAttributes Jump to PrintObjectDescription_PrintAttributes if description type is 0 (C equals A after decrement).
D5AB LD HL,$007A HL=007A (load address for description type 1 text into HL).
PrintObjectDescription_PrintAttributes D5AE PUSH HL Stash the description text address on the stack.
D5AF CALL PrintObjectAttributeDescription Call PrintObjectAttributeDescription to print the object attribute description.
D5B2 LD A,$01 Enable *ObjectDisplayFlag (write 01 to it).
D5B4 LD ($A2AA),A
D5B7 CALL ProcessObjectEntryAlternate_3 Call ProcessObjectEntryAlternate_3 to print additional object information.
D5BA XOR A Disable *ObjectDisplayFlag (write 00 to it).
D5BB LD ($A2AA),A
D5BE LD HL,$68D9 HL=68D9 (load the address of the closing text token into HL).
PrintObjectDescription_PrintText D5C1 CALL PrintTextAndHandleControlCharacters Call PrintTextAndHandleControlCharacters to print the text token.
D5C4 POP AF Restore the object ID, object count/ description type and the object pointer from the stack.
D5C5 POP BC
D5C6 POP IX
D5C8 RET Return.
Prev: D57C Up: Map Next: D5C9