summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <joel@joel-desktop.(none)>2008-01-23 21:55:52 +0900
committerJoel Bosveld <joel@joel-desktop.(none)>2008-01-23 21:55:52 +0900
commitf4ebb624eb815fd0b3654f5c5af365db61a55d54 (patch)
tree82d8c6eaf201baf9c694d81c282d22714420e357
parentd3db11d66f28c57b48b6dc5a182a8ed9d956b52a (diff)
downloadcubedbus-f4ebb624eb815fd0b3654f5c5af365db61a55d54.tar.gz
cubedbus-f4ebb624eb815fd0b3654f5c5af365db61a55d54.tar.bz2
Update some function names
-rw-r--r--cubedbusParticle.c.in2
-rw-r--r--particleFx/emitter.c.in12
2 files changed, 8 insertions, 6 deletions
diff --git a/cubedbusParticle.c.in b/cubedbusParticle.c.in
index 4eecd7d..e5744ae 100644
--- a/cubedbusParticle.c.in
+++ b/cubedbusParticle.c.in
@@ -101,7 +101,7 @@ cubedbusAddParticleObject (CubedbusObject *obj, CompOption *option, int nOption)
particleData->emitter->prev = NULL;
particleData->emitter->head = particleData->emitter->tail = NULL;
particleData->emitter->nParticles=0;
- particleData->emitter->compFxParticleEmitterStepProc = &compFxParticleCreateEmitterColour;
+ particleData->emitter->compFxParticleEmitterStepProc = &compFxParticleEmitterStepColour;
return TRUE;
diff --git a/particleFx/emitter.c.in b/particleFx/emitter.c.in
index 3eb096b..fb52560 100644
--- a/particleFx/emitter.c.in
+++ b/particleFx/emitter.c.in
@@ -60,10 +60,12 @@ compFxParticleEmitterAddDataStandard (CompFxParticleData *particleData, CompFxPa
memcpy(particleData, emitterData->data, sizeof( CompFxParticleData));
}
+
+
/* Softcoded step function to create particles for an emitter - also for testing */
static void
-compFxParticleCreateEmitterSoft (CompFxParticleEmitter *emitter)
+compFxParticleEmitterStepSoft (CompFxParticleEmitter *emitter)
{
CompFxParticle *particle = NULL;
@@ -83,7 +85,7 @@ compFxParticleCreateEmitterSoft (CompFxParticleEmitter *emitter)
/* Hardcoded emitter - XXX - for testing only */
static void
-compFxParticleCreateEmitterColour (CompFxParticleEmitter *emitter)
+compFxParticleEmitterStepColour (CompFxParticleEmitter *emitter)
{
CompFxParticle *particle = NULL;
@@ -143,9 +145,9 @@ compFxParticleCreateEmitterColour (CompFxParticleEmitter *emitter)
glEnd();
glEndList();
- particle->dataSets[2].data[0].f=(double) rand() / ((double) RAND_MAX+1);
- particle->dataSets[2].data[1].f=(double) rand() / ((double) RAND_MAX+1);
- particle->dataSets[2].data[2].f=(double) rand() / ((double) RAND_MAX+1);
+ particle->dataSets[2].data[0].f=0.75+0.25*((double) rand() / ((double) RAND_MAX+1));
+ particle->dataSets[2].data[1].f=0.25*((double) rand() / ((double) RAND_MAX+1));
+ particle->dataSets[2].data[2].f=0.25*((double) rand() / ((double) RAND_MAX+1));
particle->dataSets[1].data[0].f= .00125-(0.0025 * (double) rand() / ((double) RAND_MAX+1));
particle->dataSets[1].data[1].f= (0.0050 * (double) rand() / ((double) RAND_MAX+1));