Prev: 41386 Up: Map Next: 41586
41555: Fill Pickup Debris
Fill the 16 debris particles at Debris_Particles from the template at 43547, using Debris_Y as the starting Y of the burst.
FillPickupDebris 41555 LD DE,43547 DE=43547.
41558 LD HL,43595 HL=Debris_Particles.
41561 LD B,16 Set a particle counter in B for 16 loops.
Fill each debris particle with a flag, the burst Y and template bytes.
FillPickupDebris_Loop 41563 LD (HL),128 Write 128 as the particle flag.
41565 INC HL Move onto the particle Y.
41566 LD A,(24170) Fetch Debris_Y.
41569 LD (HL),A Write it.
41570 INC HL Move onto the next field.
41571 LD A,(DE) Copy the next template byte.
41572 INC DE
41573 LD (HL),A Write it and move on.
41574 INC HL
41575 LD A,(DE) Copy the next template byte.
41576 INC DE
41577 LD (HL),A Write it and move on.
41578 INC HL
41579 LD A,(DE) Copy the next template byte.
41580 INC DE
41581 LD (HL),A Write it and move on.
41582 INC HL
41583 DJNZ FillPickupDebris_Loop Decrease the particle counter by one and loop back to FillPickupDebris_Loop until all 16 are filled.
41585 RET Return.
Prev: 41386 Up: Map Next: 41586