![]() |
Routines |
| Prev: 43743 | Up: Map | Next: 43848 |
|
Save the X and Y of the 16 debris particles at Debris_Particles into the template at Debris_Defaults.
|
||||
|
Copy the X and Y of each particle into the template.
|
||||
| InitialiseDebris | 43823 | LD HL,43595 | HL=Debris_Particles. | |
| 43826 | LD DE,43743 | DE=Debris_Defaults. | ||
| 43829 | LD B,16 | Set a particle counter in B for 16 loops. | ||
| InitialiseDebris_Loop | 43831 | LD A,(HL) | Copy the particle X. | |
| 43832 | INC HL | |||
| 43833 | LD (DE),A | Write it and move on. | ||
| 43834 | INC DE | |||
| 43835 | LD A,(HL) | Copy the particle Y. | ||
| 43836 | INC HL | |||
| 43837 | LD (DE),A | Write it and move on. | ||
| 43838 | INC DE | |||
|
Skip the velocity and colour bytes of both records.
|
||||
| 43839 | INC HL | Skip the rest of this particle record. | ||
| 43840 | INC HL | |||
| 43841 | INC HL | |||
| 43842 | INC DE | Skip the rest of this template record. | ||
| 43843 | INC DE | |||
| 43844 | INC DE | |||
| 43845 | DJNZ InitialiseDebris_Loop | Decrease the particle counter by one and loop back to InitialiseDebris_Loop until all 16 are copied. | ||
| 43847 | RET | Return. | ||
| Prev: 43743 | Up: Map | Next: 43848 |