From d0fe17c1b5ac0ee20fba8bdb50db1696291415f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 28 Jul 2013 21:24:08 +0300 Subject: move bools in particle. --- src/particle.cpp | 14 +++++++------- src/particle.h | 41 +++++++++++++++++++---------------------- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/src/particle.cpp b/src/particle.cpp index b93fe376d..dcd9422a1 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -66,20 +66,20 @@ Particle::Particle(Map *const map) : mFadeIn(0), mVelocity(), mAlive(ALIVE), - mAutoDelete(true), mChildEmitters(), mChildParticles(), - mAllowSizeAdjust(false), mDeathEffect(), - mDeathEffectConditions(0x00), mGravity(0.0f), - mRandomness(0), mBounce(0.0f), - mFollow(false), - mTarget(nullptr), mAcceleration(0.0f), mInvDieDistance(-1.0f), - mMomentum(1.0f) + mMomentum(1.0f), + mTarget(nullptr), + mRandomness(0), + mDeathEffectConditions(0x00), + mAutoDelete(true), + mAllowSizeAdjust(false), + mFollow(false) { setMap(map); Particle::particleCount++; diff --git a/src/particle.h b/src/particle.h index 05d22454e..61e231d20 100644 --- a/src/particle.h +++ b/src/particle.h @@ -315,44 +315,22 @@ class Particle : public Actor // Is the particle supposed to be drawn and updated? AliveStatus mAlive; private: - // generic properties - // May the particle request its deletion by the parent particle? - bool mAutoDelete; - // List of child emitters. Emitters mChildEmitters; // List of particles controlled by this particle Particles mChildParticles; - // Can the effect size be adjusted by the object props in the map file? - bool mAllowSizeAdjust; - // Particle effect file to be spawned when the particle dies std::string mDeathEffect; - // Bitfield of death conditions which trigger spawning - // of the death particle - signed char mDeathEffectConditions; - // dynamic particle // Downward acceleration in pixels per game-tick. float mGravity; - // Ammount of random vector change - int mRandomness; - // How much the particle bounces off when hitting the ground float mBounce; - // is this particle moved when its parent particle moves? - bool mFollow; - - // follow-point particles - - // The particle that attracts this particle - Particle *mTarget; - // Acceleration towards the target particle in pixels per game-tick float mAcceleration; @@ -362,6 +340,25 @@ class Particle : public Actor // How much speed the particle retains after each game tick float mMomentum; + + // The particle that attracts this particle + Particle *mTarget; + + // Ammount of random vector change + int mRandomness; + + // Bitfield of death conditions which trigger spawning + // of the death particle + signed char mDeathEffectConditions; + + // May the particle request its deletion by the parent particle? + bool mAutoDelete; + + // Can the effect size be adjusted by the object props in the map file? + bool mAllowSizeAdjust; + + // is this particle moved when its parent particle moves? + bool mFollow; }; extern Particle *particleEngine; -- cgit v1.2.3-70-g09d2