diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-30 01:34:16 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-09 20:00:07 +0100 |
commit | 1b1050da1c7b84cc72b7efbb2229294975be9e10 (patch) | |
tree | 68d15ccb015d58aeb5797ffd06efca3e55997c24 /src/map.cpp | |
parent | 0d4142a891cd228da24ee3aa3bbd7dc622da5b75 (diff) | |
parent | 955a7613d1fe116fe5e1da07a222b6849b3c885c (diff) | |
download | mana-client-1b1050da1c7b84cc72b7efbb2229294975be9e10.tar.gz mana-client-1b1050da1c7b84cc72b7efbb2229294975be9e10.tar.bz2 mana-client-1b1050da1c7b84cc72b7efbb2229294975be9e10.tar.xz mana-client-1b1050da1c7b84cc72b7efbb2229294975be9e10.zip |
Merged with Aethyra master as of 2009-01-27
Conflicts:
Almost everywhere.
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/map.cpp b/src/map.cpp index f0c84159..17c28180 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -19,21 +19,21 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "map.h" - #include <queue> #include "beingmanager.h" #include "configuration.h" #include "game.h" #include "graphics.h" +#include "localplayer.h" +#include "map.h" #include "particle.h" #include "sprite.h" #include "tileset.h" -#include "resources/resourcemanager.h" #include "resources/ambientoverlay.h" #include "resources/image.h" +#include "resources/resourcemanager.h" #include "utils/dtor.h" #include "utils/tostring.h" @@ -136,6 +136,7 @@ void MapLayer::draw(Graphics *graphics, // If drawing the fringe layer, make sure all sprites above this row of // tiles have been drawn if (mIsFringeLayer) { + player_node->drawTargetCursor(graphics, scrollX, scrollY); while (si != sprites.end() && (*si)->getPixelY() <= y * 32 - 32) { (*si)->draw(graphics, -scrollX, -scrollY); si++; @@ -256,7 +257,8 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY) // draw the game world Layers::const_iterator layeri = mLayers.begin(); - for (; layeri != mLayers.end(); ++layeri) { + for (; layeri != mLayers.end(); ++layeri) + { (*layeri)->draw(graphics, startX, startY, endX, endY, scrollX, scrollY, @@ -547,12 +549,15 @@ void Map::addParticleEffect(const std::string &effectFile, int x, int y) void Map::initializeParticleEffects(Particle* particleEngine) { - for (std::list<ParticleEffectData>::iterator i = particleEffects.begin(); - i != particleEffects.end(); - i++ - ) + if (config.getValue("particleeffects", 1)) { - particleEngine->addEffect(i->file, i->x, i->y); + for (std::list<ParticleEffectData>::iterator i = particleEffects.begin(); + i != particleEffects.end(); + i++ + ) + { + particleEngine->addEffect(i->file, i->x, i->y); + } } } |