![]() |
Routines |
Prev: C1F0 | Up: Map | Next: C21E |
Used by the routines at Handler_RoomExits and Action_Inventory.
|
||||||||
PrintObjects | C1FF | LD HL,$BBF0 | HL=Table_ItemLocations. | |||||
C202 | LD BC,($BD28) | BC=*Count_Items. | ||||||
FindObject_Loop | C206 | CPIR | Search for matching objects. | |||||
C208 | RET NZ | Return if no objects were found. | ||||||
C209 | PUSH HL | Stash the current place in Table_ItemLocations on the stack. | ||||||
C20A | CALL ValidateObject | Call ValidateObject. | ||||||
C20D | JR Z,FindObject_Next | Jump to FindObject_Next if the object is invalid. | ||||||
C20F | PUSH AF | Temporarily stash the object type and object counter on the stack. | ||||||
C210 | PUSH BC | |||||||
C211 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||||||
C214 | POP BC | Restore the object counter and object type from the stack. | ||||||
C215 | POP AF | |||||||
FindObject_Next | C216 | LD E,A | Temporarily hold the object type in E. | |||||
C217 | POP HL | Restore the current place in Table_ItemLocations from the stack. | ||||||
C218 | LD A,B | Test if all objects have been checked... | ||||||
C219 | OR C | |||||||
C21A | LD A,E | Restore the object type to A. | ||||||
C21B | JR NZ,FindObject_Loop | Jump to FindObject_Loop until all objects in the table have been checked. | ||||||
C21D | RET | Return. |
Prev: C1F0 | Up: Map | Next: C21E |