Prev: 43912 Up: Map Next: 43958
43927: Print Objects
Used by the routines at Handler_RoomExits and Action_Inventory.
Input
A 1 for inventory items, or room number for room objects
PrintObjects 43927 LD HL,42604 HL=Table_ItemLocations.
43930 LD BC,(42982) BC=*Count_Items.
FindObject_Loop 43934 CPIR Search for matching objects.
43936 RET NZ Return if no objects were found.
43937 PUSH HL Stash the current place in Table_ItemLocations on the stack.
43938 CALL ValidateObject Call ValidateObject.
43941 JR Z,FindObject_Next Jump to FindObject_Next if the object is invalid.
43943 PUSH AF Temporarily stash the object type and object counter on the stack.
43944 PUSH BC
43945 CALL PrintStringAndNewline Call PrintStringAndNewline.
43948 POP BC Restore the object counter and object type from the stack.
43949 POP AF
FindObject_Next 43950 LD E,A Temporarily hold the object type in E.
43951 POP HL Restore the current place in Table_ItemLocations from the stack.
43952 LD A,B Test if all objects have been checked...
43953 OR C
43954 LD A,E Restore the object type to A.
43955 JR NZ,FindObject_Loop Jump to FindObject_Loop until all objects in the table have been checked.
43957 RET Return.
Prev: 43912 Up: Map Next: 43958