Prev: 9E40 Up: Map Next: 9E95
9E7A: Condition: Is The Container Lit?
Used by the routines at LocationLit and Condition_AVisibleObject.
Tests whether the container the object is inside is lit.
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 If the object is not inside of anything then jump to ContainerLit_Return.
ContainerLit_Fetch 9E7C LD A,(IX+$01)
9E7F CP $FF
9E81 JR Z,ContainerLit_Return
9E83 EX AF,AF' Switch to the shadow register for AF.
9E84 LD A,(IX+$01) Read where this object is.
9E87 CALL LocateObject Call LocateObject to locate object.
9E8A LD A,(IX+$07) Fetch the objects attributes.
9E8D AND %00101000 Jump back to ContainerLit_Fetch if the container is open or broken.
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.
View the equivalent code in;
Prev: 9E40 Up: Map Next: 9E95