Prev: EA13 Up: Map Next: EA45
EA1E: 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 EA1E LD HL,$EB00 Point HL at Object_Slots.
EA21 LD DE,$000B Set the slot stride to 0B in DE.
EA24 LD B,$17 Set the slot counter to 17 in B.
EA26 LD A,($EF54) Jump to Test_Object_Slots_0 if *Phase is not 02.
EA29 CP $02
EA2B JR NZ,Test_Object_Slots_0
EA2D ADD HL,DE Advance to the next slot.
EA2E DEC B Decrease the slot counter by one.
Test_Object_Slots_0 EA2F LD A,(HL) Return if this slot is occupied.
EA30 AND A
EA31 RET NZ
EA32 ADD HL,DE Advance to the next slot, and loop back to Test_Object_Slots_0 until all slots are tested.
EA33 DJNZ Test_Object_Slots_0
EA35 LD HL,$E480 Point HL at Long_Object_Slots.
EA38 LD DE,$0010 Set the slot stride to 10 in DE.
EA3B LD B,$08 Set the slot counter to 08 in B.
Test_Object_Slots_1 EA3D LD A,(HL) Return if this slot is occupied.
EA3E AND A
EA3F RET NZ
EA40 ADD HL,DE Advance to the next slot, and loop back to Test_Object_Slots_1 until all slots are tested.
EA41 DJNZ Test_Object_Slots_1
EA43 XOR A Set the result to 00.
EA44 RET Return.
Prev: EA13 Up: Map Next: EA45