Prev: B4FD Up: Map Next: B544
B538: Test Object Solid
Tests whether the object that IY points at is present and is not flagged to be ignored in the 3D calculations. The zero flag is set if the slot is unused or bit 1 of the flags is set.
Input
IY The address of the object
Output
F Zero flag set if the slot is not used or the object is ignored
Return if the slot is empty.
TestObjectSolid B538 LD A,(IY+$00) Fetch the graphic number of the object.
Test it, as zero means that there is no object.
B53B AND A Return if the slot is not used.
B53C RET Z
After invert, bit 1 is set when the object is not ignored.
B53D LD A,(IY+$07) Fetch the flags of the object.
B540 CPL Invert them.
B541 AND %00000010 Keep the ignore flag, which is now clear if the object is ignored.
B543 RET Return.
View the equivalent code in;
Prev: B4FD Up: Map Next: B544