summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-07 13:53:35 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-07 13:53:35 +0300
commitd21a9461e853d657c139b97cb474d8e2549d83a9 (patch)
treec4d770418006d7d87d7148c60bf5a5c5f2711708
parent1a6b16b7047b8558a5870318190b038b2b81556f (diff)
downloadManaVerse-d21a9461e853d657c139b97cb474d8e2549d83a9.tar.gz
ManaVerse-d21a9461e853d657c139b97cb474d8e2549d83a9.tar.bz2
ManaVerse-d21a9461e853d657c139b97cb474d8e2549d83a9.tar.xz
ManaVerse-d21a9461e853d657c139b97cb474d8e2549d83a9.zip
remove client.h include from some files.
-rw-r--r--src/client.cpp1
-rw-r--r--src/client.h2
-rw-r--r--src/defaults.cpp7
-rw-r--r--src/flooritem.cpp3
-rw-r--r--src/gui/popups/itempopup.cpp3
-rw-r--r--src/net/tmwa/playerhandler.cpp2
-rw-r--r--src/resources/db/colordb.cpp3
-rw-r--r--src/resources/db/itemdb.cpp3
-rw-r--r--src/resources/sdl2imagehelper.cpp1
-rw-r--r--src/resources/sdl2softwareimagehelper.cpp1
-rw-r--r--src/resources/surfaceimagehelper.cpp1
-rw-r--r--src/shopitem.cpp5
12 files changed, 20 insertions, 12 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 83395f409..f170946c8 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -81,6 +81,7 @@
#include "net/inventoryhandler.h"
#include "net/loginhandler.h"
#include "net/net.h"
+#include "net/netconsts.h"
#include "net/partyhandler.h"
#include "resources/imagehelper.h"
diff --git a/src/client.h b/src/client.h
index 34f1227ae..1607a73ab 100644
--- a/src/client.h
+++ b/src/client.h
@@ -51,8 +51,6 @@ class Skin;
class Window;
class QuitDialog;
-static const uint16_t DEFAULT_PORT = 6901;
-
extern bool isSafeMode;
extern int serverVersion;
extern unsigned int tmwServerVersion;
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 98ad30398..d4b2a5379 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -21,7 +21,6 @@
#include "defaults.h"
-#include "client.h"
#include "graphicsmanager.h"
#include "being/being.h"
@@ -30,6 +29,12 @@
#include "render/graphics.h"
+#include "net/netconsts.h"
+
+#ifndef USE_SDL2
+#include <SDL_keyboard.h>
+#endif
+
#include "debug.h"
VariableData* createData(const int defData)
diff --git a/src/flooritem.cpp b/src/flooritem.cpp
index f0679e55b..1976574ab 100644
--- a/src/flooritem.cpp
+++ b/src/flooritem.cpp
@@ -22,7 +22,6 @@
#include "flooritem.h"
-#include "client.h"
#include "configuration.h"
#include "render/graphics.h"
@@ -37,6 +36,8 @@
#include "debug.h"
+extern int serverVersion;
+
FloorItem::FloorItem(const int id, const int itemId, const int x, const int y,
const int amount, const unsigned char color) :
ActorSprite(id),
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 72fd3e0bd..a2998cacb 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -23,7 +23,6 @@
#include "gui/popups/itempopup.h"
-#include "client.h"
#include "configuration.h"
#include "item.h"
#include "units.h"
@@ -43,6 +42,8 @@
#include "debug.h"
+extern int serverVersion;
+
ItemPopup::ItemPopup() :
Popup("ItemPopup", "itempopup.xml"),
mItemName(new Label(this)),
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index b1fa64d25..164ecb8c2 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -23,7 +23,6 @@
#include "net/tmwa/playerhandler.h"
#include "configuration.h"
-#include "client.h"
#include "game.h"
#include "soundmanager.h"
@@ -40,6 +39,7 @@
#include "debug.h"
extern Net::PlayerHandler *playerHandler;
+extern int serverVersion;
namespace TmwAthena
{
diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp
index 0e81ff1c0..8f4e1431c 100644
--- a/src/resources/db/colordb.cpp
+++ b/src/resources/db/colordb.cpp
@@ -21,7 +21,6 @@
#include "resources/db/colordb.h"
-#include "client.h"
#include "configuration.h"
#include "logger.h"
@@ -37,6 +36,8 @@ namespace
ColorDB::ColorLists mColorLists;
}
+extern int serverVersion;
+
void ColorDB::load()
{
if (mLoaded)
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index cc8c0338b..f7b1f6349 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -22,7 +22,6 @@
#include "resources/db/itemdb.h"
-#include "client.h"
#include "configuration.h"
#include "logger.h"
@@ -45,6 +44,8 @@ namespace
std::map<std::string, ItemSoundEvent> mSoundNames;
} // namespace
+extern int serverVersion;
+
// Forward declarations
static void loadSpriteRef(ItemInfo *const itemInfo, const XmlNodePtr node);
static void loadSoundRef(ItemInfo *const itemInfo, const XmlNodePtr node);
diff --git a/src/resources/sdl2imagehelper.cpp b/src/resources/sdl2imagehelper.cpp
index 2ee72b0ee..c3481a1b5 100644
--- a/src/resources/sdl2imagehelper.cpp
+++ b/src/resources/sdl2imagehelper.cpp
@@ -27,7 +27,6 @@
#include "resources/dye.h"
#include "resources/resourcemanager.h"
-#include "client.h"
#include "logger.h"
#include "main.h"
diff --git a/src/resources/sdl2softwareimagehelper.cpp b/src/resources/sdl2softwareimagehelper.cpp
index db41a4ddc..2886c3ff6 100644
--- a/src/resources/sdl2softwareimagehelper.cpp
+++ b/src/resources/sdl2softwareimagehelper.cpp
@@ -27,7 +27,6 @@
#include "resources/dye.h"
#include "resources/resourcemanager.h"
-#include "client.h"
#include "logger.h"
#include "main.h"
diff --git a/src/resources/surfaceimagehelper.cpp b/src/resources/surfaceimagehelper.cpp
index b249dfea9..22aa904f5 100644
--- a/src/resources/surfaceimagehelper.cpp
+++ b/src/resources/surfaceimagehelper.cpp
@@ -27,7 +27,6 @@
#include "resources/dye.h"
#include "resources/resourcemanager.h"
-#include "client.h"
#include "logger.h"
#include "main.h"
diff --git a/src/shopitem.cpp b/src/shopitem.cpp
index 56f66478e..fd2a7e670 100644
--- a/src/shopitem.cpp
+++ b/src/shopitem.cpp
@@ -22,13 +22,16 @@
#include "shopitem.h"
-#include "client.h"
#include "units.h"
#include "resources/iteminfo.h"
+#include "utils/stringutils.h"
+
#include "debug.h"
+extern int serverVersion;
+
ShopItem::ShopItem(const int inventoryIndex, const int id,
const unsigned char color,
const int quantity, const int price) :