summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-28 00:01:38 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-28 00:01:38 +0000
commit55786731e0517efdc123d4e8245b2aa94fa55cbe (patch)
tree17d64454f3daeb9f55241e8c9a95b5671f2da023 /src/engine.cpp
parent76291862ce0e26040f251bc4764539d8ff6634a0 (diff)
downloadmana-55786731e0517efdc123d4e8245b2aa94fa55cbe.tar.gz
mana-55786731e0517efdc123d4e8245b2aa94fa55cbe.tar.bz2
mana-55786731e0517efdc123d4e8245b2aa94fa55cbe.tar.xz
mana-55786731e0517efdc123d4e8245b2aa94fa55cbe.zip
Made buy dialog resizable and added a WindowListener class for listening for
window resize and move events.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 4a0f2f1f..4e37dc27 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -72,15 +72,11 @@ void Engine::changeMap(const std::string &mapPath)
particleEngine->clear();
// Store full map path in global var
- const std::string base = "maps/" + mapPath.substr(0, mapPath.rfind("."));
+ map_path = "maps/" + mapPath.substr(0, mapPath.rfind(".")) + ".tmx";
ResourceManager *resman = ResourceManager::getInstance();
- if (resman->exists(base + ".tmx"))
+ if (!resman->exists(map_path))
{
- map_path = base + ".tmx";
- }
- else
- {
- map_path = base + ".tmx.gz";
+ map_path += ".gz";
}
// Attempt to load the new map