diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-08-27 18:48:13 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-08-27 18:48:13 +0000 |
commit | a5d45f2fa5b0042e2d08a2bfed060dfb0417e75e (patch) | |
tree | 576815fd394d8d7bee804aaf46e9ff59f8eeb512 | |
parent | 2cdb3c70b062014d9e96ff778c3bdee8796ecf5e (diff) | |
download | mana-a5d45f2fa5b0042e2d08a2bfed060dfb0417e75e.tar.gz mana-a5d45f2fa5b0042e2d08a2bfed060dfb0417e75e.tar.bz2 mana-a5d45f2fa5b0042e2d08a2bfed060dfb0417e75e.tar.xz mana-a5d45f2fa5b0042e2d08a2bfed060dfb0417e75e.zip |
Renamed "randomnes" to "randomness", so that it won't show up as part of Fate's
patch.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | src/particle.cpp | 10 | ||||
-rw-r--r-- | src/particle.h | 6 | ||||
-rw-r--r-- | src/particleemitter.cpp | 14 | ||||
-rw-r--r-- | src/particleemitter.h | 2 |
5 files changed, 24 insertions, 18 deletions
@@ -1,8 +1,14 @@ +2008-08-27 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/particleemitter.h, src/particle.h, src/particleemitter.cpp, + src/particle.cpp: Renamed "randomnes" to "randomness", so that it + won't show up as part of Fate's patch. + 2008-08-24 Philipp Sehmisch <tmw@crushnet.org> * src/particleemitter.cpp, src/particleemitter.h: Added new particle - emitter property "output-pause" which allows to define a fixed (or random) - interval between two outputs. + emitter property "output-pause" which allows to define a fixed (or + random) interval between two outputs. 2008-08-06 Bjørn Lindeijer <bjorn@lindeijer.nl> diff --git a/src/particle.cpp b/src/particle.cpp index 3b3f5116..8591838f 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -61,7 +61,7 @@ Particle::Particle(Map *map): mAutoDelete(true), mMap(map), mGravity(0.0f), - mRandomnes(0), + mRandomness(0), mBounce(0.0f), mFollow(false), mTarget(NULL), @@ -139,11 +139,11 @@ Particle::update() } } - if (mRandomnes > 0) + if (mRandomness > 0) { - mVelocity.x += (rand()%mRandomnes - rand()%mRandomnes) / 1000.0f; - mVelocity.y += (rand()%mRandomnes - rand()%mRandomnes) / 1000.0f; - mVelocity.z += (rand()%mRandomnes - rand()%mRandomnes) / 1000.0f; + mVelocity.x += (rand()%mRandomness - rand()%mRandomness) / 1000.0f; + mVelocity.y += (rand()%mRandomness - rand()%mRandomness) / 1000.0f; + mVelocity.z += (rand()%mRandomness - rand()%mRandomness) / 1000.0f; } mVelocity.z -= mGravity; diff --git a/src/particle.h b/src/particle.h index 88a38417..d9b8c6b7 100644 --- a/src/particle.h +++ b/src/particle.h @@ -227,8 +227,8 @@ class Particle : public Sprite * Sets the ammount of random vector changes */ void - setRandomnes(int r) - { mRandomnes = r; } + setRandomness(int r) + { mRandomness = r; } /** * Sets the ammount of velocity particles retain after @@ -303,7 +303,7 @@ class Particle : public Sprite // dynamic particle Vector mVelocity; /**< Speed in pixels per game-tick. */ float mGravity; /**< Downward acceleration in pixels per game-tick. */ - int mRandomnes; /**< Ammount of random vector change */ + int mRandomness; /**< Ammount of random vector change */ float mBounce; /**< How much the particle bounces off when hitting the ground */ bool mFollow; /**< is this particle moved when its parent particle moves? */ diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp index b2cc16c7..545936f0 100644 --- a/src/particleemitter.cpp +++ b/src/particleemitter.cpp @@ -39,8 +39,8 @@ #define DEG_RAD_FACTOR 0.017453293f ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *map): - mParticleImage(0), - mOutputPauseLeft(0) + mOutputPauseLeft(0), + mParticleImage(0) { mMap = map; mParticleTarget = target; @@ -53,7 +53,7 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map * mParticleAngleVertical.set(0.0f); mParticlePower.set(0.0f); mParticleGravity.set(0.0f); - mParticleRandomnes.set(0); + mParticleRandomness.set(0); mParticleBounce.set(0.0f); mParticleFollow = false; mParticleAcceleration.set(0.0f); @@ -119,9 +119,9 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map * { mParticleGravity = readMinMax(propertyNode, 0.0f); } - else if (name == "randomnes") + else if (name == "randomnes" || name == "randomness") // legacy bug { - mParticleRandomnes = readMinMax(propertyNode, 0); + mParticleRandomness = readMinMax(propertyNode, 0); } else if (name == "bounce") { @@ -268,7 +268,7 @@ ParticleEmitter & ParticleEmitter::operator=(const ParticleEmitter &o) mParticleAngleVertical = o.mParticleAngleVertical; mParticlePower = o.mParticlePower; mParticleGravity = o.mParticleGravity; - mParticleRandomnes = o.mParticleRandomnes; + mParticleRandomness = o.mParticleRandomness; mParticleBounce = o.mParticleBounce; mParticleFollow = o.mParticleFollow; mParticleTarget = o.mParticleTarget; @@ -356,7 +356,7 @@ ParticleEmitter::createParticles() sin(angleH) * cos(angleV) * power, sin(angleV) * power); - newParticle->setRandomnes(mParticleRandomnes.value()); + newParticle->setRandomness(mParticleRandomness.value()); newParticle->setGravity(mParticleGravity.value()); newParticle->setBounce(mParticleBounce.value()); newParticle->setFollow(mParticleFollow); diff --git a/src/particleemitter.h b/src/particleemitter.h index 54341018..5cf3fd46 100644 --- a/src/particleemitter.h +++ b/src/particleemitter.h @@ -97,7 +97,7 @@ class ParticleEmitter * Vector changing of particles: */ MinMax<float> mParticleGravity; - MinMax<int> mParticleRandomnes; + MinMax<int> mParticleRandomness; MinMax<float> mParticleBounce; bool mParticleFollow; |