summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-07-17 23:10:05 -0600
committerJared Adams <jaxad0127@gmail.com>2010-07-18 11:45:33 -0600
commit81d8168bb5796ccb1704bcce9f5327c35e55d281 (patch)
tree3e7e111eb956757f49579bb4366c24c94712387d /src/game.cpp
parent2ae96bdc5517b2147662f19ff6d700657c0d0d42 (diff)
downloadmana-81d8168bb5796ccb1704bcce9f5327c35e55d281.tar.gz
mana-81d8168bb5796ccb1704bcce9f5327c35e55d281.tar.bz2
mana-81d8168bb5796ccb1704bcce9f5327c35e55d281.tar.xz
mana-81d8168bb5796ccb1704bcce9f5327c35e55d281.zip
Move more from LocalPlayer to PlayerInfo
Also cleanup PlayerInfo a bit. Reviewed-by: Chuck Miller
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index c867bda9..4d101fd5 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -28,6 +28,8 @@
#include "commandhandler.h"
#include "configuration.h"
#include "effectmanager.h"
+#include "event.h"
+#include "eventmanager.h"
#include "emoteshortcut.h"
#include "graphics.h"
#include "itemshortcut.h"
@@ -147,10 +149,10 @@ static void createGuiWindows()
// Create dialogs
chatWindow = new ChatWindow;
tradeWindow = new TradeWindow;
- equipmentWindow = new EquipmentWindow(player_node->mEquipment.get());
+ equipmentWindow = new EquipmentWindow(PlayerInfo::getEquipment());
statusWindow = new StatusWindow;
miniStatusWindow = new MiniStatusWindow;
- inventoryWindow = new InventoryWindow(player_node->getInventory());
+ inventoryWindow = new InventoryWindow(PlayerInfo::getInventory());
skillDialog = new SkillDialog;
minimap = new Minimap;
helpWindow = new HelpWindow;
@@ -250,6 +252,9 @@ Game::Game():
joystick = new Joystick(0);
setupWindow->setInGame(true);
+
+ Mana::Event event("Constructed");
+ Mana::EventManager::trigger("Game", event);
}
Game::~Game()
@@ -269,6 +274,9 @@ Game::~Game()
del_0(mCurrentMap)
mInstance = 0;
+
+ Mana::Event event("Destructed");
+ Mana::EventManager::trigger("Game", event);
}
static bool saveScreenshot()