Prev: D495 Up: Map Next: D4CC
D4A7: Print Object List
Used by the routine at ProcessLocationTokenDisplay.
PrintObjectList D4A7 PUSH IY Stash IY, AF and BC on the stack.
D4A9 PUSH AF
D4AA PUSH BC
D4AB LD A,$FF Set the location ID to FF (current character location).
D4AD CALL CountObjectsInLocation Call CountObjectsInLocation.
Skip printing if no objects were found.
D4B0 JR Z,PrintObjectList_End Jump to PrintObjectList_End if no objects were found (count is FF).
D4B2 PUSH AF Stash the object count on the stack for later use.
Print the introductory text for the object list.
D4B3 LD HL,$68E4 Load the address of the introductory text token into HL.
D4B6 CALL PrintTextAndHandleControlCharacters Call PrintTextAndHandleControlCharacters to print the text token.
D4B9 POP BC Restore the object count from the stack.
D4BA LD C,B Store the object count in C.
D4BB LD A,$FF Set the location ID to FF (current character location) again.
D4BD LD IY,($A017) Load *CurrentCharacterData into IY.
D4C1 LD B,(IY+$0F) Fetch the current character's location ID from the character data into B.
D4C4 CALL PrintObjectListWithFormatting Call PrintObjectListWithFormatting.
PrintObjectList_End D4C7 POP BC Restore BC, AF and IY from the stack.
D4C8 POP AF
D4C9 POP IY
D4CB RET Return.
Prev: D495 Up: Map Next: D4CC