summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-05-04 13:09:25 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-05-04 13:09:25 +0000
commit00fb4bde7974a20aacfc1c52e48fff2faee2d385 (patch)
tree2097ef003495d7e6b4a8cf697ad7896039aac113 /src/map.cpp
parentb3376bfe4e26591e1dc1066d8f2270baf4f9f759 (diff)
downloadmana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.tar.gz
mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.tar.bz2
mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.tar.xz
mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.zip
Merged particle engine into main eAthena branch.
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);
+ }
+}