Prev: 47481 Up: Map Next: 47527
47515: Test Object Solid
Tests whether collision tests should take any notice of an object. The object must be in use and must not be the one that is being moved. 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 47515 LD A,(IY+0) Fetch the sprite number of the object.
47518 AND A Return if the slot is not used.
47519 RET Z
After invert, bit 1 is set when the object is not ignored.
47520 LD A,(IY+7) Fetch the flags of the object.
47523 CPL Invert them.
47524 AND %00000010 Test the flag for being moved, which is set in the object being moved.
47526 RET Return.
View the equivalent code in;
Prev: 47481 Up: Map Next: 47527