From 55786731e0517efdc123d4e8245b2aa94fa55cbe Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 28 Aug 2007 00:01:38 +0000 Subject: Made buy dialog resizable and added a WindowListener class for listening for window resize and move events. --- src/engine.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/engine.cpp') 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 -- cgit v1.2.3-70-g09d2