Prev: 29107 Up: Map Next: 29205
29117: Add Object Deltas
Used by the routines at Initialise_Object_Slots and Advance_Object_Slots.
Adds the Long_Object_Slots deltas to each slot at Object_Slots.
Add_Object_Deltas 29117 LD IX,60160 Point IX at Object_Slots.
29121 LD IY,58496 Point IY at Long_Object_Slots.
29125 LD B,21 Set the slot counter to 21 in B.
Update one slot.
Add_Object_Deltas_Update 29127 LD L,(IX+1) Add the X delta to the slot.
29130 LD H,(IX+2)
29133 LD E,(IY+0)
29136 LD D,(IY+1)
29139 ADD HL,DE
29140 LD (IX+1),L
29143 LD (IX+2),H
29146 LD L,(IX+3) Add the Y delta to the slot.
29149 LD H,(IX+4)
29152 LD E,(IY+2)
29155 LD D,(IY+3)
29158 ADD HL,DE
29159 LD (IX+3),L
29162 LD (IX+4),H
29165 LD L,(IX+5) Add the depth delta to the slot.
29168 LD H,(IX+6)
29171 LD E,(IY+4)
29174 LD D,(IY+5)
29177 ADD HL,DE
29178 LD (IX+5),L
29181 LD (IX+6),H
29184 BIT 7,H Jump to Add_Object_Deltas_Advance if the depth is not negative.
29186 JR Z,Add_Object_Deltas_Advance
29188 LD (IX+0),0 Clear the occupied flag.
Advance to the next slot.
Add_Object_Deltas_Advance 29192 LD DE,11 Advance IX by 11.
29195 ADD IX,DE
29197 LD DE,6 Advance IY by 6.
29200 ADD IY,DE
29202 DJNZ Add_Object_Deltas_Update Decrease the slot counter by one and loop back to Add_Object_Deltas_Update until it is zero.
29204 RET Return.
Prev: 29107 Up: Map Next: 29205