summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <joel@joel-desktop.(none)>2008-01-28 22:54:14 +0900
committerJoel Bosveld <joel@joel-desktop.(none)>2008-01-28 22:54:14 +0900
commit841b94f322da17cadb94a54017fbb392692b887f (patch)
tree7cdc54c234c35a33e0f10ab82497e3f05c884b98
parenta61cb3c0c1db4f459ff288e6eb42e4e7083a810a (diff)
downloadcubedbus-841b94f322da17cadb94a54017fbb392692b887f.tar.gz
cubedbus-841b94f322da17cadb94a54017fbb392692b887f.tar.bz2
Bring everything up to date, also changed velocity to use random
direction
-rw-r--r--cubedbusParticle.c.in24
1 files changed, 15 insertions, 9 deletions
diff --git a/cubedbusParticle.c.in b/cubedbusParticle.c.in
index d947132..b1e9f9c 100644
--- a/cubedbusParticle.c.in
+++ b/cubedbusParticle.c.in
@@ -131,12 +131,15 @@ cubedbusAddParticleObject (CubedbusObject *obj, CompOption *option, int nOption)
particle->dataSets[1].data = malloc (sizeof (CompFxParticleEmitterParticleData) * particle->dataSets[1].nData);
particle->dataSets[1].name= malloc (sizeof (char) * 10);
strcpy (particle->dataSets[1].name, "velocity");
- particle->dataSets[1].data[0].compFxParticleEmitterAddDataProc = &compFxParticleEmitterAddDataStandard;
- particle->dataSets[1].data[1].compFxParticleEmitterAddDataProc = &compFxParticleEmitterAddDataStandard;
- particle->dataSets[1].data[2].compFxParticleEmitterAddDataProc = &compFxParticleEmitterAddDataStandard;
- particle->dataSets[1].data[0].data = malloc (sizeof(CompFxParticleData));
- particle->dataSets[1].data[1].data = malloc (sizeof(CompFxParticleData));
- particle->dataSets[1].data[2].data = malloc (sizeof(CompFxParticleData));
+ particle->dataSets[1].data[0].compFxParticleEmitterAddDataProc = &compFxParticleEmitterAddDataRandomComponent;
+ particle->dataSets[1].data[1].compFxParticleEmitterAddDataProc = &compFxParticleEmitterAddDataRandomComponent;
+ particle->dataSets[1].data[2].compFxParticleEmitterAddDataProc = &compFxParticleEmitterAddDataRandomComponent;
+ particle->dataSets[1].data[0].data = malloc (sizeof(CompFxParticleData)*2);
+ particle->dataSets[1].data[0].type = CompFxParticleDataTypeFloat;
+ particle->dataSets[1].data[1].data = malloc (sizeof(CompFxParticleData)*2);
+ particle->dataSets[1].data[1].type = CompFxParticleDataTypeFloat;
+ particle->dataSets[1].data[2].data = malloc (sizeof(CompFxParticleData)*2);
+ particle->dataSets[1].data[2].type = CompFxParticleDataTypeFloat;
particle->dataSets[2].nData=3;
particle->dataSets[2].data = malloc (sizeof (CompFxParticleEmitterParticleData) * particle->dataSets[2].nData);
@@ -216,13 +219,16 @@ cubedbusAddParticleObject (CubedbusObject *obj, CompOption *option, int nOption)
particleDataUnion = &particle->dataSets[1].data[0];
dta = particleDataUnion->data;
- dta[0].f= .00125-(0.0025 * (double) rand() / ((double) RAND_MAX+1));
+ dta[0].f= 0;
+ dta[1].f=0.00125;
particleDataUnion = &particle->dataSets[1].data[1];
dta = particleDataUnion->data;
- dta[0].f= (0.0050 * (double) rand() / ((double) RAND_MAX+1));
+ dta[0].f= 0.0050 ;
+ dta[1].f=.001;
particleDataUnion = &particle->dataSets[1].data[2];
dta = particleDataUnion->data;
- dta[0].f= .00125-(0.0025 * (double) rand() / ((double) RAND_MAX+1));
+ dta[0].f= 0;
+ dta[1].f= 0.00125;
particleDataUnion = particle->dataSets[3].data;