Prev: 59500 Up: Map Next: 59798
59708: Clear Object Slots
Used by the routines at Update_Frame, Reset_Phase, Set_Phase_One and Set_Phase_Two.
Clears the first byte of each slot in Object_Slots, Long_Object_Slots and Short_Object_Slots, then resets related counters.
Clear_Object_Slots 59708 LD HL,60160 Point HL at Object_Slots.
59711 LD B,23 Set the slot counter to 23 in B.
59713 LD DE,11 Set the slot stride to 11 in DE.
Clear_Object_Slots_0 59716 LD (HL),0 Clear the occupied flag, and loop for each slot.
59718 ADD HL,DE
59719 DJNZ Clear_Object_Slots_0
59721 LD HL,58496 Point HL at Long_Object_Slots.
59724 LD B,8 Set the slot counter to 8 in B.
59726 LD DE,16 Set the slot stride to 16 in DE.
Clear_Object_Slots_1 59729 LD (HL),0 Clear the occupied flag, and loop for each slot.
59731 ADD HL,DE
59732 DJNZ Clear_Object_Slots_1
59734 LD HL,57600 Point HL at Short_Object_Slots.
59737 LD B,3 Set the slot counter to 3 in B.
59739 LD DE,4 Set the slot stride to 4 in DE.
Clear_Object_Slots_2 59742 LD (HL),0 Clear the occupied flag, and loop for each slot.
59744 ADD HL,DE
59745 DJNZ Clear_Object_Slots_2
59747 LD HL,2064 Write 2064 to *Phase_Word.
59750 LD (61271),HL
59753 LD HL,0 Write 0 to *Heading_Y and *Heading.
59756 LD (61173),HL
59759 LD (61042),HL
59762 XOR A Write 0 to;
59763 LD (61050),A
59766 LD (61144),A
59769 LD (61312),A
59772 LD (61314),A
59775 LD (61313),A
59778 LD (60973),A
59781 LD (61150),A
59784 LD (61421),A
59787 INC A Write 1 to *Timeout_Ready.
59788 LD (61051),A
59791 LD HL,255 Write 255 to *Countdown.
59794 LD (61323),HL
59797 RET Return.
Prev: 59500 Up: Map Next: 59798