Prev: 59923 Up: Map Next: 59973
59934: Test Object Slots
Used by the routine at Update_Frame.
Returns non-zero if any slot in Object_Slots or Long_Object_Slots is occupied.
Output
A Non-zero if a slot is occupied
Test_Object_Slots 59934 LD HL,60160 Point HL at Object_Slots.
59937 LD DE,11 Set the slot stride to 11 in DE.
59940 LD B,23 Set the slot counter to 23 in B.
59942 LD A,(61268) Jump to Test_Object_Slots_0 if *Phase is not 2.
59945 CP 2
59947 JR NZ,Test_Object_Slots_0
59949 ADD HL,DE Advance to the next slot.
59950 DEC B Decrease the slot counter by one.
Test_Object_Slots_0 59951 LD A,(HL) Return if this slot is occupied.
59952 AND A
59953 RET NZ
59954 ADD HL,DE Advance to the next slot, and loop back to Test_Object_Slots_0 until all slots are tested.
59955 DJNZ Test_Object_Slots_0
59957 LD HL,58496 Point HL at Long_Object_Slots.
59960 LD DE,16 Set the slot stride to 16 in DE.
59963 LD B,8 Set the slot counter to 8 in B.
Test_Object_Slots_1 59965 LD A,(HL) Return if this slot is occupied.
59966 AND A
59967 RET NZ
59968 ADD HL,DE Advance to the next slot, and loop back to Test_Object_Slots_1 until all slots are tested.
59969 DJNZ Test_Object_Slots_1
59971 XOR A Set the result to 0.
59972 RET Return.
Prev: 59923 Up: Map Next: 59973