diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-08-16 17:47:51 +0200 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-08-16 17:47:51 +0200 |
commit | e0ba8f7f67ddd08c54f0d453a316b3620d52529d (patch) | |
tree | 7324fa33f2c6af04067b77e0ce7f73d9effed1c6 /src/game.cpp | |
parent | 346d68307553c18777df4c49f9b3fe57955c5c0d (diff) | |
parent | 6460413ee2f50be561fd0824e3eaa9c2c09415b1 (diff) | |
download | mana-e0ba8f7f67ddd08c54f0d453a316b3620d52529d.tar.gz mana-e0ba8f7f67ddd08c54f0d453a316b3620d52529d.tar.bz2 mana-e0ba8f7f67ddd08c54f0d453a316b3620d52529d.tar.xz mana-e0ba8f7f67ddd08c54f0d453a316b3620d52529d.zip |
Merged changes from last month with a commit I forgot to commit before I went on vacation.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/game.cpp b/src/game.cpp index f1df57cc..ff0d84f7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -62,8 +62,8 @@ #include "gui/sdlinput.h" #include "gui/sell.h" #include "gui/setup.h" -#include "gui/skill.h" -#include "gui/status.h" +#include "gui/skilldialog.h" +#include "gui/statuswindow.h" #include "gui/trade.h" #include "gui/viewport.h" #include "gui/windowmenu.h" @@ -206,6 +206,8 @@ int get_elapsed_time(int start_time) */ static void createGuiWindows() { + setupWindow->clearWindowsForReset(); + // Create dialogs chatWindow = new ChatWindow; buyDialog = new BuyDialog; @@ -214,17 +216,16 @@ static void createGuiWindows() partyWindow = new PartyWindow; #ifdef TMWSERV_SUPPORT magicDialog = new MagicDialog; - equipmentWindow = new EquipmentWindow(player_node->mEquipment.get()); buddyWindow = new BuddyWindow; guildWindow = new GuildWindow; #else buySellDialog = new BuySellDialog; - equipmentWindow = new EquipmentWindow; #endif + equipmentWindow = new EquipmentWindow(player_node->mEquipment.get()); npcDialog = new NpcDialog; npcPostDialog = new NpcPostDialog; storageWindow = new StorageWindow; - statusWindow = new StatusWindow(player_node); + statusWindow = new StatusWindow; miniStatusWindow = new MiniStatusWindow; inventoryWindow = new InventoryWindow; skillDialog = new SkillDialog; @@ -405,6 +406,7 @@ static bool saveScreenshot() if (success) { std::stringstream chatlogentry; + // TODO: Make it one complete gettext string below chatlogentry << _("Screenshot saved to ~/") << filenameSuffix.str(); localChatTab->chatLog(chatlogentry.str(), BY_SERVER); } @@ -763,8 +765,8 @@ void Game::handleInput() Uint16 x = (int) pos.x / 32; Uint16 y = (int) pos.y / 32; #else - Uint16 x = player_node->mX; - Uint16 y = player_node->mY; + Uint16 x = player_node->getTileX(); + Uint16 y = player_node->getTileY(); #endif FloorItem *item = floorItemManager->findByCoordinates(x, y); @@ -937,14 +939,9 @@ void Game::handleInput() return; } -#ifdef TMWSERV_SUPPORT const Vector &pos = player_node->getPosition(); const Uint16 x = (int) pos.x / 32; const Uint16 y = (int) pos.y / 32; -#else - const Uint16 x = player_node->mX; - const Uint16 y = player_node->mY; -#endif unsigned char direction = 0; // Translate pressed keys to movement and direction |