Prev: 9E34 Up: Map Next: 9E95
9E7A: Is Container Lit?
Used by the routines at LocationLit and 9E34.
Input
IX Object Data Address e.g. Objects
Output
A Either $FF if this object is not inside a container, or the object ID of the container object
IX Object Data Address of either the input value, or the address of the container object
ContainerLit 9E7A PUSH IX Stash IX on the stack.
ContainerLit_Fetch 9E7C LD A,(IX+$01) If the object is not inside of anything then jump to ContainerLit_Return.
9E7F CP $FF
9E81 JR Z,ContainerLit_Return
9E83 EX AF,AF' Switch to the shadow register for AF.
9E84 LD A,(IX+$01) A=The mother object ID.
9E87 CALL LocateObject Call LocateObject.
9E8A LD A,(IX+$07) Fetch the objects attributes.
9E8D AND %00101000 If the 'Give Light' and 'Full' attributes are set then jump to ContainerLit_Fetch to rerun the check on this object.
9E8F JR NZ,ContainerLit_Fetch
9E91 EX AF,AF' Switch back to the "normal" AF register.
ContainerLit_Return 9E92 POP IX Restore IX from the stack.
9E94 RET Return.
Prev: 9E34 Up: Map Next: 9E95