Prev: 36485 Up: Map Next: 36588
36562: Action: Locate And Follow
Used by the routine at Action_CarryOnWithTheObject.
Finds where the object is. An open container is followed to the object inside, and that location is returned.
Action_LocateAndFollow 36562 PUSH IX Call LocateObject to locate the object.
Find the object's record.
36564 CALL LocateObject
Action_LocateAndFollow_Direction_Loop 36567 LD A,(IX+1) Read where this object is from the object record.
36570 CP 255 Jump to Action_LocateAndFollow_PopTheRecord if this object is not inside another object.
36572 JR Z,Action_LocateAndFollow_PopTheRecord
Find the object's record.
36574 CALL LocateObject Call LocateObject to locate object.
36577 BIT 5,(IX+7) Jump back to Action_LocateAndFollow_Direction_Loop if the object is open.
36581 JR NZ,Action_LocateAndFollow_Direction_Loop
36583 OR 1 Clear the zero flag.
Action_LocateAndFollow_PopTheRecord 36585 POP IX Restore IX from the stack.
36587 RET Return.
Prev: 36485 Up: Map Next: 36588