Prev: 6754 Up: Map Next: 678A
6763: Print Objects
Used by the routines at Handler_DisplayRoom and ActionInventory.
List the objects in the room passed by the caller.
PrintObjects 6763 LD HL,$61AB Point at the object locations.
6766 LD BC,($62C4) Fetch the number of objects.
PrintObjects_Loop1 676A CPIR Find the next object that is in this room.
676C RET NZ Return when no further object is in this room.
676D PUSH AF Keep the search state while this object's name is printed.
676E PUSH HL
676F PUSH BC
6770 LD A,($62C4) Fetch the number of objects.
6773 SUB C The bytes still to search give this object's number.
6774 DEC A
6775 LD E,A
6776 LD IX,($62C6) Fetch the object-description table.
677A CALL GetTableEntry Call GetTableEntry to look up the table entry.
677D CALL PrintStringAndANewline Print the object's name and start a new line.
6780 POP BC Restore the search and keep listing objects.
6781 POP HL
6782 POP AF
6783 LD E,A Keep the room number and continue while objects remain.
6784 LD A,B
6785 OR C
6786 LD A,E
6787 JR NZ,PrintObjects_Loop1 List the next object that is in this room.
6789 RET Return.
Prev: 6754 Up: Map Next: 678A