diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-06-03 17:42:54 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-06-03 17:42:54 +0000 |
commit | 778ca33725a8bfac629b405f0bd26cfefaf47caf (patch) | |
tree | 0b20376964c8b60f30c2827b1790cb038740a00b /src/particleemitter.h | |
parent | 6276c1ff96e449e73e84977110334cd8957c31b6 (diff) | |
download | mana-778ca33725a8bfac629b405f0bd26cfefaf47caf.tar.gz mana-778ca33725a8bfac629b405f0bd26cfefaf47caf.tar.bz2 mana-778ca33725a8bfac629b405f0bd26cfefaf47caf.tar.xz mana-778ca33725a8bfac629b405f0bd26cfefaf47caf.zip |
Have ParticleEmitter load a possible particle image early on and don't cause a
crash when the image can't be found.
Diffstat (limited to 'src/particleemitter.h')
-rw-r--r-- | src/particleemitter.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/particleemitter.h b/src/particleemitter.h index dcc7069b..ca6d8622 100644 --- a/src/particleemitter.h +++ b/src/particleemitter.h @@ -18,6 +18,7 @@ * along with The Mana World; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
+ * $Id$
*/
#ifndef _PARTICLEEMITTER_H
@@ -30,6 +31,7 @@ #include "resources/animation.h"
+class Image;
class Map;
class Particle;
@@ -40,8 +42,15 @@ class Particle; class ParticleEmitter
{
public:
+ /**
+ * Constructor.
+ */
+ ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *map);
- ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *map);
+ /**
+ * Destructor.
+ */
+ ~ParticleEmitter();
/**
* Spawns new particles
@@ -74,14 +83,14 @@ class ParticleEmitter */
MinMax<float> mParticlePower;
- /**
- * vector changing of particles:
+ /*
+ * Vector changing of particles:
*/
MinMax<float> mParticleGravity;
MinMax<int> mParticleRandomnes;
MinMax<float> mParticleBounce;
- /**
+ /*
* Properties of targeting particles:
*/
Particle *mParticleTarget;
@@ -89,20 +98,23 @@ class ParticleEmitter MinMax<float> mParticleDieDistance;
MinMax<float> mParticleMomentum;
- /**
+ /*
* Behavior over time of the particles:
*/
MinMax<int> mParticleLifetime;
MinMax<int> mParticleFadeOut;
MinMax<int> mParticleFadeIn;
- Map *mMap; /**< Map the particles are supposed to spawn on */
+ Map *mMap; /**< Map the particles are spawned on */
+
+ MinMax<int> mOutput; /**< Number of particles spawned per update */
- MinMax<int> mOutput; /**< Number of particles spawned per update */
+ Image *mParticleImage; /**< Particle image, if used */
- std::string mParticleImage; /**< Filename of particle image */
- Animation mParticleAnimation; /**< Filename of particle animation file */
+ /** Filename of particle animation file */
+ Animation mParticleAnimation;
- std::list<ParticleEmitter> mParticleChildEmitters; /** List of emitters the spawned particles are equipped with */
+ /** List of emitters the spawned particles are equipped with */
+ std::list<ParticleEmitter> mParticleChildEmitters;
};
#endif
|