Prev: B1A4 Up: Map Next: B1E9
B1D3: Scan Object Slots
OR together the types of the 18-byte object slots from Object_Slot_1 (four, or six from ScanObjectSlots_Test). Return with the zero flag set if all are free.
OR together the object-slot types starting at Object_Slot_1.
ScanObjectSlots B1D3 LD HL,$6108 HL=Object_Slot_1.
B1D6 LD B,$04 Set a slot counter in B for 04 loops.
Merge the types of the slots, stepping over each slot in turn.
ScanObjectSlots_Loop B1D8 LD DE,$0018 DE=0018.
B1DB XOR A Clear A.
ScanObjectSlots_MergeType B1DC OR (HL) Merge in the current slot type.
B1DD ADD HL,DE Move onto the next slot.
B1DE DJNZ ScanObjectSlots_MergeType Decrease the slot counter by one and loop back to ScanObjectSlots_MergeType until every slot is tested.
B1E0 OR A Test the merged types.
B1E1 RET Return.
Scan six slots instead of four.
ScanObjectSlots_Test B1E2 LD HL,$6108 HL=Object_Slot_1.
B1E5 LD B,$06 B=06.
B1E7 JR ScanObjectSlots_Loop Jump to ScanObjectSlots_Loop.
Prev: B1A4 Up: Map Next: B1E9