summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-26 22:28:40 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-26 22:42:26 +0200
commit739e1ef748cf61935d3d15ef5319576f81d3a615 (patch)
tree925274893a87ad73d6e934ba7c3b07eed3c6a5ab /src/engine.cpp
parent9e5bdec034d81a9afec170988ea0a6d0a40e9e77 (diff)
downloadmana-739e1ef748cf61935d3d15ef5319576f81d3a615.tar.gz
mana-739e1ef748cf61935d3d15ef5319576f81d3a615.tar.bz2
mana-739e1ef748cf61935d3d15ef5319576f81d3a615.tar.xz
mana-739e1ef748cf61935d3d15ef5319576f81d3a615.zip
Moved minimap title setting into the Minimap class
Also cleaned up some debug log statements, fixed initialization order, removed an unused member variable and added some documentation.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 5cceb4cc..ece98d5d 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -43,7 +43,7 @@
#include "utils/stringutils.h"
Engine::Engine():
- mCurrentMap(NULL)
+ mCurrentMap(0)
{
}
@@ -84,27 +84,6 @@ bool Engine::changeMap(const std::string &mapPath)
logger->error("Could not find map file");
// Notify the minimap and beingManager about the map change
- if (newMap->hasProperty("minimap"))
- {
- // Set the title for the Minimap
- if (newMap->hasProperty("mapname"))
- minimap->setCaption(newMap->getProperty("mapname"));
- else if (newMap->hasProperty("name"))
- minimap->setCaption(newMap->getProperty("name"));
- else
- {
- minimap->setCaption("Unknown");
- logger->log("WARNING: Map file '%s' defines a minimap image but "
- "does not define a 'mapname' property",
- map_path.c_str());
- }
- }
- if (newMap->hasProperty("name"))
- {
- minimap->setCaption(newMap->getProperty("name"));
- } else {
- minimap->setCaption("Map");
- }
minimap->setMap(newMap);
beingManager->setMap(newMap);
particleEngine->setMap(newMap);