diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-04-10 22:03:57 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-04-10 22:03:57 +0000 |
commit | f97ddedaa9672c78147fc13282bd14a5be46eb19 (patch) | |
tree | b433e4f9fe285ab6b48fb0e98a8c010e8a9b73e2 /src/resources | |
parent | 720f716ba8d98a85266b8e81a534737c6fcdcf5f (diff) | |
download | mana-client-f97ddedaa9672c78147fc13282bd14a5be46eb19.tar.gz mana-client-f97ddedaa9672c78147fc13282bd14a5be46eb19.tar.bz2 mana-client-f97ddedaa9672c78147fc13282bd14a5be46eb19.tar.xz mana-client-f97ddedaa9672c78147fc13282bd14a5be46eb19.zip |
Fixed some compiler warnings and don't try to load particle effects when no
file is set.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/mapreader.cpp | 6 | ||||
-rw-r--r-- | src/resources/spritedef.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 9c6c52aa..33616c0a 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -258,8 +258,14 @@ MapReader::readMap(xmlNodePtr node, const std::string &path) logger->log("- Loading object name: %s type: %s at %d:%d", objName.c_str(), objType.c_str(), objX, objY); + if (objType == "PARTICLE_EFFECT") { + if (objName.empty()) { + logger->log(" Warning: No particle file given"); + continue; + } + map->addParticleEffect(objName, objX, objY); } else diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index 11821a60..9d98184a 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -51,8 +51,6 @@ SpriteDef::getAction(SpriteAction action) const SpriteDef *SpriteDef::load(std::string const &animationFile, int variant) { - ResourceManager *resman = ResourceManager::getInstance(); - std::string::size_type pos = animationFile.find('|'); std::string palettes; if (pos != std::string::npos) |