Prev: 40500 Up: Map Next: 40597
40570: Is Container Lit?
Used by the routines at LocationLit and 40500.
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 40570 PUSH IX Stash IX on the stack.
ContainerLit_Fetch 40572 LD A,(IX+1) If the object is not inside of anything then jump to ContainerLit_Return.
40575 CP 255
40577 JR Z,ContainerLit_Return
40579 EX AF,AF' Switch to the shadow register for AF.
40580 LD A,(IX+1) A=The mother object ID.
40583 CALL LocateObject Call LocateObject.
40586 LD A,(IX+7) Fetch the objects attributes.
40589 AND %00101000 If the 'Give Light' and 'Full' attributes are set then jump to ContainerLit_Fetch to rerun the check on this object.
40591 JR NZ,ContainerLit_Fetch
40593 EX AF,AF' Switch back to the "normal" AF register.
ContainerLit_Return 40594 POP IX Restore IX from the stack.
40596 RET Return.
Prev: 40500 Up: Map Next: 40597