Prev: D526 Up: Map Next: D590
D57C: Find Next Matching Object
FindNextMatchingObject D57C POP AF Restore the object ID from the stack.
This entry point is used by the routine at PrintFormattedObjectList.
FindNextMatchingObject_Entry D57D CALL FetchNextObjectWithID Call FetchNextObjectWithID to fetch the next object with the specified ID.
D580 JR NZ,FindNextMatchingObject_CheckCriteria Jump to FindNextMatchingObject_CheckCriteria if the object was not found (A is not equal to 2C).
Object not found - return with carry flag set.
D582 SCF Set the carry flag to indicate no object was found.
D583 RET Return.
Check if the object matches the location and visibility criteria.
FindNextMatchingObject_CheckCriteria D584 PUSH AF Stash the object ID on the stack.
D585 CALL CheckObjectMatchCriteria Call CheckObjectMatchCriteria to check if the object matches the location and visibility criteria.
D588 JR NC,FindNextMatchingObject Jump to FindNextMatchingObject if the object doesn't match (A is greater than or equal to 2C).
Object matches - return with object ID.
FindNextMatchingObject_Found D58A POP AF Restore the object ID from the stack.
D58B LD A,(IX+$00) A=*IX+00 (load the object ID from the object data into A).
D58E AND A Set flags based on the object ID in A.
D58F RET Return with the object ID in A and carry flag clear.
Prev: D526 Up: Map Next: D590