Prev: 26452 Up: Map Next: 26506
26467: Print Objects
Used by the routines at Handler_DisplayRoom and ActionInventory.
List the objects in the room passed by the caller.
PrintObjects 26467 LD HL,25003 Point at the object locations.
26470 LD BC,(25284) Fetch the number of objects.
PrintObjects_Loop1 26474 CPIR Find the next object that is in this room.
26476 RET NZ Return when no further object is in this room.
26477 PUSH AF Keep the search state while this object's name is printed.
26478 PUSH HL
26479 PUSH BC
26480 LD A,(25284) Fetch the number of objects.
26483 SUB C The bytes still to search give this object's number.
26484 DEC A
26485 LD E,A
26486 LD IX,(25286) Fetch the object-description table.
26490 CALL GetTableEntry Call GetTableEntry to look up the table entry.
26493 CALL PrintStringAndANewline Print the object's name and start a new line.
26496 POP BC Restore the search and keep listing objects.
26497 POP HL
26498 POP AF
26499 LD E,A Keep the room number and continue while objects remain.
26500 LD A,B
26501 OR C
26502 LD A,E
26503 JR NZ,PrintObjects_Loop1 List the next object that is in this room.
26505 RET Return.
Prev: 26452 Up: Map Next: 26506