Prev: 71B3 Up: Map Next: 7215
71BD: 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 71BD LD IX,$EB00 Point IX at Object_Slots.
71C1 LD IY,$E480 Point IY at Long_Object_Slots.
71C5 LD B,$15 Set the slot counter to 15 in B.
Update one slot.
Add_Object_Deltas_Update 71C7 LD L,(IX+$01) Add the X delta to the slot.
71CA LD H,(IX+$02)
71CD LD E,(IY+$00)
71D0 LD D,(IY+$01)
71D3 ADD HL,DE
71D4 LD (IX+$01),L
71D7 LD (IX+$02),H
71DA LD L,(IX+$03) Add the Y delta to the slot.
71DD LD H,(IX+$04)
71E0 LD E,(IY+$02)
71E3 LD D,(IY+$03)
71E6 ADD HL,DE
71E7 LD (IX+$03),L
71EA LD (IX+$04),H
71ED LD L,(IX+$05) Add the depth delta to the slot.
71F0 LD H,(IX+$06)
71F3 LD E,(IY+$04)
71F6 LD D,(IY+$05)
71F9 ADD HL,DE
71FA LD (IX+$05),L
71FD LD (IX+$06),H
7200 BIT 7,H Jump to Add_Object_Deltas_Advance if the depth is not negative.
7202 JR Z,Add_Object_Deltas_Advance
7204 LD (IX+$00),$00 Clear the occupied flag.
Advance to the next slot.
Add_Object_Deltas_Advance 7208 LD DE,$000B Advance IX by 0B.
720B ADD IX,DE
720D LD DE,$0006 Advance IY by 06.
7210 ADD IY,DE
7212 DJNZ Add_Object_Deltas_Update Decrease the slot counter by one and loop back to Add_Object_Deltas_Update until it is zero.
7214 RET Return.
Prev: 71B3 Up: Map Next: 7215