diff options
-rw-r--r-- | src/com/android/phasebeam/phasebeam.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/phasebeam/phasebeam.rs b/src/com/android/phasebeam/phasebeam.rs index 037f303..26b2910 100644 --- a/src/com/android/phasebeam/phasebeam.rs +++ b/src/com/android/phasebeam/phasebeam.rs @@ -63,10 +63,11 @@ void positionParticles() { halfScreenHeight = screenHeight/2.0f; quarterScreenWidth = screenWidth/4.0f; quarterScreenHeight = screenHeight/4.0f; - Particle_t* particle = dotParticles; + rs_allocation aParticles = rsGetAllocation(dotParticles); numDotParticles = rsAllocationGetDimX(rsGetAllocation(dotParticles)); numVertColors = rsAllocationGetDimX(rsGetAllocation(vertexColors)); for(int i=0; i<numDotParticles; i++) { + Particle_t* particle = (Particle_t *) rsGetElementAt(aParticles, i); particle->position.x = rsRand(0.0f, 3.0f); particle->position.y = rsRand(-1.25f, 1.25f); @@ -85,8 +86,6 @@ void positionParticles() { } particle->position.z = z; particle->offsetX = 0; - - particle++; } Particle_t* beam = beamParticles; |