diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-22 01:44:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-22 01:44:36 +0300 |
commit | 2925b20acb9f70d032cd5981687642a770778c53 (patch) | |
tree | e9dd3bd137dd359b8a0845487520ac28f5e3bdb7 /src/game.cpp | |
parent | ab0b6df9f69a736f79d2233508d8aa88b8e11800 (diff) | |
download | manaplus-2925b20acb9f70d032cd5981687642a770778c53.tar.gz manaplus-2925b20acb9f70d032cd5981687642a770778c53.tar.bz2 manaplus-2925b20acb9f70d032cd5981687642a770778c53.tar.xz manaplus-2925b20acb9f70d032cd5981687642a770778c53.zip |
Rename object event to depricatedevent because current implimentation very
bad and must be replaced with better implimentation.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/game.cpp b/src/game.cpp index 3aae1f60b..44ec0ea68 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -32,10 +32,10 @@ #include "client.h" #include "commandhandler.h" #include "configuration.h" +#include "depricatedevent.h" #include "dropshortcut.h" #include "effectmanager.h" #include "emoteshortcut.h" -#include "event.h" #include "guildmanager.h" #include "graphics.h" #include "itemshortcut.h" @@ -175,7 +175,8 @@ const unsigned adjustDelay = 10; */ static void initEngines() { - Event::trigger(CHANNEL_GAME, Event(EVENT_ENGINESINITALIZING)); + DepricatedEvent::trigger(CHANNEL_GAME, + DepricatedEvent(EVENT_ENGINESINITALIZING)); actorSpriteManager = new ActorSpriteManager; commandHandler = new CommandHandler; @@ -187,7 +188,8 @@ static void initEngines() particleEngine = new Particle(nullptr); particleEngine->setupEngine(); - Event::trigger(CHANNEL_GAME, Event(EVENT_ENGINESINITALIZED)); + DepricatedEvent::trigger(CHANNEL_GAME, + DepricatedEvent(EVENT_ENGINESINITALIZED)); } /** @@ -195,7 +197,8 @@ static void initEngines() */ static void createGuiWindows() { - Event::trigger(CHANNEL_GAME, Event(EVENT_GUIWINDOWSLOADING)); + DepricatedEvent::trigger(CHANNEL_GAME, + DepricatedEvent(EVENT_GUIWINDOWSLOADING)); if (setupWindow) setupWindow->clearWindowsForReset(); @@ -292,7 +295,8 @@ static void createGuiWindows() if (player_node) player_node->updateStatus(); - Event::trigger(CHANNEL_GAME, Event(EVENT_GUIWINDOWSLOADED)); + DepricatedEvent::trigger(CHANNEL_GAME, + DepricatedEvent(EVENT_GUIWINDOWSLOADED)); } #define del_0(X) { delete X; X = nullptr; } @@ -302,7 +306,8 @@ static void createGuiWindows() */ static void destroyGuiWindows() { - Event::trigger(CHANNEL_GAME, Event(EVENT_GUIWINDOWSUNLOADING)); + DepricatedEvent::trigger(CHANNEL_GAME, + DepricatedEvent(EVENT_GUIWINDOWSUNLOADING)); logger->setChatWindow(nullptr); if (whoIsOnline) @@ -345,7 +350,8 @@ static void destroyGuiWindows() del_0(killStats); del_0(didYouKnowWindow); - Event::trigger(CHANNEL_GAME, Event(EVENT_GUIWINDOWSUNLOADED)); + DepricatedEvent::trigger(CHANNEL_GAME, + DepricatedEvent(EVENT_GUIWINDOWSUNLOADED)); if (auctionManager && AuctionManager::getEnableAuctionBot()) auctionManager->reload(); @@ -416,7 +422,8 @@ Game::Game(): if (guildManager && GuildManager::getEnableGuildBot()) guildManager->requestGuildInfo(); - Event::trigger(CHANNEL_GAME, Event(EVENT_CONSTRUCTED)); + DepricatedEvent::trigger(CHANNEL_GAME, + DepricatedEvent(EVENT_CONSTRUCTED)); } Game::~Game() @@ -450,7 +457,8 @@ Game::~Game() mInstance = nullptr; - Event::trigger(CHANNEL_GAME, Event(EVENT_DESTRUCTED)); + DepricatedEvent::trigger(CHANNEL_GAME, + DepricatedEvent(EVENT_DESTRUCTED)); } static bool saveScreenshot() @@ -1846,9 +1854,9 @@ void Game::changeMap(const std::string &mapPath) if (mumbleManager) mumbleManager->setMap(mapPath); - Event event(EVENT_MAPLOADED); + DepricatedEvent event(EVENT_MAPLOADED); event.setString("mapPath", mapPath); - Event::trigger(CHANNEL_GAME, event); + DepricatedEvent::trigger(CHANNEL_GAME, event); } void Game::updateHistory(SDL_Event &event) |