diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-12-18 20:35:54 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-12-18 20:35:54 +0000 |
commit | 78ee1357ccaf6c821f07db045841c18da0c2ab66 (patch) | |
tree | bc5232fded1bd79fb7941f1270ebe14851ae3211 /src/main.cpp | |
parent | f83ed8b03c85fb485e0a85439f36c555ca1910ee (diff) | |
download | manaserv-78ee1357ccaf6c821f07db045841c18da0c2ab66.tar.gz manaserv-78ee1357ccaf6c821f07db045841c18da0c2ab66.tar.bz2 manaserv-78ee1357ccaf6c821f07db045841c18da0c2ab66.tar.xz manaserv-78ee1357ccaf6c821f07db045841c18da0c2ab66.zip |
Added a map manager to load/unload/relod maps.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp index 419c00e2..f3064eda 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,28 +20,27 @@ * $Id$ */ - +#include <cstdlib> #include <iostream> - +#include <physfs.h> #include <SDL.h> #include <SDL_net.h> -#include <cstdlib> - #ifdef __USE_UNIX98 #include "../config.h" #endif -#include "netsession.h" -#include "connectionhandler.h" #include "accounthandler.h" -#include "gamehandler.h" #include "chathandler.h" -#include "storage.h" #include "configuration.h" -#include "state.h" - +#include "connectionhandler.h" +#include "gamehandler.h" +#include "mapmanager.h" +#include "netsession.h" +#include "resourcemanager.h" #include "skill.h" +#include "state.h" +#include "storage.h" #include "utils/logger.h" @@ -176,6 +175,14 @@ void initialize() config.init(configPath); LOG_INFO("Using Config File: " << configPath) LOG_INFO("Using Log File: " << LOG_FILE) + + // Initialize PhysicsFS + PHYSFS_init(""); + + // TODO: only a test, maps should be loaded as they are needed + tmwserv::MapManager::instance().loadMap("tulimshar.tmx.gz"); + tmwserv::MapManager::instance().reloadMap("tulimshar.tmx.gz"); + tmwserv::MapManager::instance().unloadMap("tulimshar.tmx.gz"); } @@ -206,6 +213,8 @@ void deinitialize() // Get rid of persistent data storage tmwserv::Storage::destroy(); + + PHYSFS_deinit(); } |