Prev: 8D19 Up: Map Next: 8E4E
8E34: Is an object shut inside something?
Follows the holders of object A upwards while they are open. Returns with Z set if it reaches a loose object (so the object is out in the open) and Z reset if it meets a closed container.
8E34 PUSH IX Save IX
8E36 CALL $9B25 IX = object A's own record
8E39 LD A,(IX+$01) A = whoever is holding it
8E3C CP $FF Held by nobody at all: it is out in the open
8E3E JR Z,$8E4B
8E40 CALL $9B25 Held by something: IX = that holder's own record
8E43 BIT 5,(IX+$07) Is the holder open?
8E47 JR NZ,$8E39 Yes: look inside IT in turn (and see who holds that)
8E49 OR $01 No (shut away): make A non-zero
8E4B POP IX Restore IX
8E4D RET
Prev: 8D19 Up: Map Next: 8E4E