summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 575f80d3..1f0c22b9 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -29,6 +29,7 @@
#include "beingmanager.h"
#include "game.h"
#include "graphics.h"
+#include "particle.h"
#include "sprite.h"
#include "tileset.h"
@@ -508,3 +509,25 @@ Map::findPath(int startX, int startY, int destX, int destY)
return path;
}
+
+void
+Map::addParticleEffect (std::string effectFile, int x, int y)
+{
+ ParticleEffectData newEffect;
+ newEffect.file = effectFile;
+ newEffect.x = x;
+ newEffect.y = y;
+ particleEffects.push_back(newEffect);
+}
+
+void
+Map::initializeParticleEffects(Particle* particleEngine)
+{
+ for (std::list<ParticleEffectData>::iterator i = particleEffects.begin();
+ i != particleEffects.end();
+ i++
+ )
+ {
+ particleEngine->addEffect(i->file, i->x, i->y);
+ }
+}