summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-03-29 18:33:44 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-03-29 18:33:44 +0200
commit9587fb9b86ee4081ba14d23c1133bf1a09ee4578 (patch)
tree7682df3ec17534be553caae85ffa9e5a68c9a815 /src/engine.cpp
parent63b41440a0555c6b39141eab94ef4627f712b476 (diff)
parent8748f26234bba1e71bbe059147fb02256f8cec2a (diff)
downloadmana-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.tar.gz
mana-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.tar.bz2
mana-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.tar.xz
mana-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.zip
Merge branch 'master' of git@gitorious.org:tmw/mainline
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index da4eb336..04d06e38 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -33,25 +33,14 @@
#include "gui/minimap.h"
#include "gui/viewport.h"
-#ifdef EATHENA_SUPPORT
-#include "net/messageout.h"
-#include "net/ea/protocol.h"
-#endif
-
#include "resources/mapreader.h"
#include "resources/monsterdb.h"
#include "resources/resourcemanager.h"
#include "utils/stringutils.h"
-#ifdef TMWSERV_SUPPORT
Engine::Engine():
mCurrentMap(NULL)
-#else
-Engine::Engine(Network *network):
- mCurrentMap(NULL),
- mNetwork(network)
-#endif
{
}
@@ -60,7 +49,7 @@ Engine::~Engine()
delete mCurrentMap;
}
-void Engine::changeMap(const std::string &mapPath)
+bool Engine::changeMap(const std::string &mapPath)
{
// Clean up floor items, beings and particles
floorItemManager->clear();
@@ -77,11 +66,7 @@ void Engine::changeMap(const std::string &mapPath)
mMapName = mapPath;
// Store full map path in global var
-#ifdef TMWSERV_SUPPORT
map_path = "maps/" + mapPath + ".tmx";
-#else
- map_path = "maps/" + mapPath.substr(0, mapPath.rfind(".")) + ".tmx";
-#endif
ResourceManager *resman = ResourceManager::getInstance();
if (!resman->exists(map_path))
map_path += ".gz";
@@ -149,11 +134,7 @@ void Engine::changeMap(const std::string &mapPath)
mCurrentMap = newMap;
-#ifdef EATHENA_SUPPORT
- // Send "map loaded"
- MessageOut outMsg(mNetwork);
- outMsg.writeInt16(CMSG_MAP_LOADED);
-#endif
+ return true;
}
void Engine::logic()