.AddExplosionToBuffer STMFD R13!, {R3-R9, R14} \ Store the registers that we want to use on \ the stack so they can be preserved .expl1 \ Each cluster is made up of four particles, \ so we now add them to the particle data \ buffer BL AddSparkParticleToBuffer \ Add a spark particle to the particle data \ buffer (one that fades from white to red) BL AddDebrisParticleToBuffer \ Add a spark particle to the particle data \ buffer (a purple-brownish-green particle \ that flies out and bounces on the ground) BL AddSmokeParticleToBuffer \ Add a smoke particle to the particle data \ buffer (a grey particle that slowly rises) BL AddSparkParticleToBuffer \ Add another spark particle to the particle \ data buffer (one that fades from white to \ red) SUBS R8, R8, #1 \ Decrement the particle cluster counter in \ R8 BPL expl1 \ Loop back until we have drawn all R8 \ particle clusters in the explosion LDMFD R13!, {R3-R9, PC} \ Retrieve the registers that we stored on \ the stack and return from the subroutineName: AddExplosionToBuffer [Show more] Type: Subroutine Category: Particles Summary: Create a big explosion of particles and add it to the particle data buffer Deep dive: Particles and particle cloudsContext: See this subroutine in context in the source code References: This subroutine is called as follows: * AddShipExplosionToBuffer calls AddExplosionToBuffer * AddSmallExplosionToBuffer calls AddExplosionToBuffer * LoseLife calls AddExplosionToBuffer * ProcessObjectDestruction calls AddExplosionToBuffer
Arguments: R8 The number of particle clusters in the explosion (there are four particles per cluster)
[X]
Subroutine AddDebrisParticleToBuffer (category: Particles)
Add a debris particle to the particle data buffer, which is a purple-brownish-green particle that bounces out of an explosion
[X]
Subroutine AddSmokeParticleToBuffer (category: Particles)
Add a smoke particle to the particle data buffer
[X]
Subroutine AddSparkParticleToBuffer (category: Particles)
Add a spark particle to the particle data buffer that fades from white-hot to red over time
[X]
Label expl1 is local to this routine