summaryrefslogtreecommitdiff
path: root/src/particle/particle.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-16 18:05:12 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-16 18:15:50 +0300
commitac65e2c9b72e35a9e5a1a84da57ecdbd41e5923e (patch)
tree0feb142dc738715d3216f0832f94ae4c3716fc30 /src/particle/particle.h
parent117c99ff5c8358624df6d176860ac64c86b6fa5f (diff)
downloadplus-ac65e2c9b72e35a9e5a1a84da57ecdbd41e5923e.tar.gz
plus-ac65e2c9b72e35a9e5a1a84da57ecdbd41e5923e.tar.bz2
plus-ac65e2c9b72e35a9e5a1a84da57ecdbd41e5923e.tar.xz
plus-ac65e2c9b72e35a9e5a1a84da57ecdbd41e5923e.zip
Split ParticleEngine from Particle class.
Diffstat (limited to 'src/particle/particle.h')
-rw-r--r--src/particle/particle.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/particle/particle.h b/src/particle/particle.h
index 323e1c171..01fea38e0 100644
--- a/src/particle/particle.h
+++ b/src/particle/particle.h
@@ -27,6 +27,8 @@
#include "enums/particle/alivestatus.h"
+#include "particle/particleengine.h"
+
#include "localconsts.h"
class Color;
@@ -34,27 +36,13 @@ class Font;
class Particle;
class ParticleEmitter;
-typedef std::list<Particle *> Particles;
-typedef Particles::iterator ParticleIterator;
-typedef Particles::const_iterator ParticleConstIterator;
-typedef std::list<ParticleEmitter *> Emitters;
-typedef Emitters::iterator EmitterIterator;
-typedef Emitters::const_iterator EmitterConstIterator;
-
/**
* A particle spawned by a ParticleEmitter.
*/
class Particle notfinal : public Actor
{
public:
- static const float PARTICLE_SKY; // Maximum Z position of particles
- static int fastPhysics; // Mode of squareroot calculation
- static int particleCount; // Current number of particles
- static int maxCount; // Maximum number of particles
- static int emitterSkip; // Duration of pause between two
- // emitter updates in ticks
- static bool enabled; // true when non-crucial particle effects
- // are disabled
+ friend class ParticleEngine;
Particle();
@@ -71,12 +59,6 @@ class Particle notfinal : public Actor
void clear() restrict2;
/**
- * Gives a particle the properties of an engine root particle and loads
- * the particle-related config settings.
- */
- void setupEngine() restrict2;
-
- /**
* Updates particle position, returns false when the particle should
* be deleted.
*/
@@ -351,6 +333,4 @@ class Particle notfinal : public Actor
bool mFollow;
};
-extern Particle *particleEngine;
-
#endif // PARTICLE_PARTICLE_H