summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/animatedsprite.cpp1
-rw-r--r--src/animationparticle.cpp1
-rw-r--r--src/animationparticle.h4
-rw-r--r--src/being.h16
-rw-r--r--src/channelmanager.cpp1
-rw-r--r--src/commandhandler.cpp5
-rw-r--r--src/configuration.cpp3
-rw-r--r--src/engine.cpp3
-rw-r--r--src/equipment.h4
-rw-r--r--src/flooritem.h4
-rw-r--r--src/game.cpp12
-rw-r--r--src/game.h3
-rw-r--r--src/gui/buy.h4
-rw-r--r--src/gui/changeemaildialog.h4
-rw-r--r--src/gui/changepassworddialog.h4
-rw-r--r--src/gui/charcreatedialog.h4
-rw-r--r--src/gui/charselectdialog.h4
-rw-r--r--src/gui/connectiondialog.h4
-rw-r--r--src/gui/equipmentwindow.h4
-rw-r--r--src/gui/focushandler.h4
-rw-r--r--src/gui/gui.h4
-rw-r--r--src/gui/guildwindow.cpp4
-rw-r--r--src/gui/guildwindow.h5
-rw-r--r--src/gui/help.cpp3
-rw-r--r--src/gui/inventorywindow.h4
-rw-r--r--src/gui/itempopup.cpp1
-rw-r--r--src/gui/npcdialog.h4
-rw-r--r--src/gui/palette.h6
-rw-r--r--src/gui/quitdialog.h4
-rw-r--r--src/gui/register.h4
-rw-r--r--src/gui/setup.h4
-rw-r--r--src/gui/setup_keyboard.cpp4
-rw-r--r--src/gui/setup_video.cpp1
-rw-r--r--src/gui/skilldialog.h4
-rw-r--r--src/gui/specialswindow.h5
-rw-r--r--src/gui/speechbubble.cpp1
-rw-r--r--src/gui/statuswindow.h4
-rw-r--r--src/gui/storagewindow.h4
-rw-r--r--src/gui/trade.cpp3
-rw-r--r--src/gui/trade.h4
-rw-r--r--src/gui/truetypefont.h7
-rw-r--r--src/gui/unregisterdialog.h4
-rw-r--r--src/gui/viewport.h4
-rw-r--r--src/gui/widgets/browserbox.h6
-rw-r--r--src/gui/widgets/chattab.h3
-rw-r--r--src/gui/widgets/checkbox.h1
-rw-r--r--src/gui/widgets/desktop.cpp8
-rw-r--r--src/gui/widgets/desktop.h4
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.h4
-rw-r--r--src/gui/widgets/guildlistbox.h4
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp3
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h4
-rw-r--r--src/gui/widgets/linkhandler.h2
-rw-r--r--src/gui/widgets/popup.h4
-rw-r--r--src/gui/widgets/progressbar.h4
-rw-r--r--src/gui/widgets/tab.cpp2
-rw-r--r--src/gui/worldselectdialog.h1
-rw-r--r--src/inventory.cpp4
-rw-r--r--src/keyboardconfig.h1
-rw-r--r--src/localplayer.cpp5
-rw-r--r--src/localplayer.h7
-rw-r--r--src/log.cpp8
-rw-r--r--src/main.cpp24
-rw-r--r--src/main.h12
-rw-r--r--src/map.cpp4
-rw-r--r--src/map.h6
-rw-r--r--src/net/download.cpp3
-rw-r--r--src/net/download.h1
-rw-r--r--src/net/ea/adminhandler.cpp10
-rw-r--r--src/net/ea/beinghandler.cpp4
-rw-r--r--src/net/ea/buysellhandler.cpp8
-rw-r--r--src/net/ea/charserverhandler.cpp18
-rw-r--r--src/net/ea/chathandler.cpp10
-rw-r--r--src/net/ea/gamehandler.cpp14
-rw-r--r--src/net/ea/generalhandler.cpp15
-rw-r--r--src/net/ea/gui/partytab.h6
-rw-r--r--src/net/ea/guildhandler.cpp6
-rw-r--r--src/net/ea/inventoryhandler.cpp10
-rw-r--r--src/net/ea/inventoryhandler.h8
-rw-r--r--src/net/ea/itemhandler.cpp6
-rw-r--r--src/net/ea/loginhandler.cpp8
-rw-r--r--src/net/ea/network.cpp6
-rw-r--r--src/net/ea/npchandler.cpp12
-rw-r--r--src/net/ea/partyhandler.cpp1
-rw-r--r--src/net/ea/playerhandler.cpp10
-rw-r--r--src/net/ea/specialhandler.cpp10
-rw-r--r--src/net/ea/tradehandler.cpp12
-rw-r--r--src/net/logindata.h5
-rw-r--r--src/net/manaserv/beinghandler.cpp10
-rw-r--r--src/net/manaserv/buysellhandler.cpp8
-rw-r--r--src/net/manaserv/charhandler.cpp20
-rw-r--r--src/net/manaserv/charhandler.h4
-rw-r--r--src/net/manaserv/chathandler.cpp13
-rw-r--r--src/net/manaserv/connection.cpp4
-rw-r--r--src/net/manaserv/connection.h4
-rw-r--r--src/net/manaserv/effecthandler.cpp8
-rw-r--r--src/net/manaserv/gamehandler.cpp6
-rw-r--r--src/net/manaserv/generalhandler.cpp9
-rw-r--r--src/net/manaserv/guildhandler.cpp14
-rw-r--r--src/net/manaserv/inventoryhandler.cpp10
-rw-r--r--src/net/manaserv/inventoryhandler.h4
-rw-r--r--src/net/manaserv/itemhandler.cpp6
-rw-r--r--src/net/manaserv/loginhandler.cpp8
-rw-r--r--src/net/manaserv/network.cpp4
-rw-r--r--src/net/manaserv/npchandler.cpp12
-rw-r--r--src/net/manaserv/partyhandler.cpp10
-rw-r--r--src/net/manaserv/playerhandler.cpp14
-rw-r--r--src/net/manaserv/tradehandler.cpp14
-rw-r--r--src/net/messagein.h1
-rw-r--r--src/net/messageout.h3
-rw-r--r--src/net/net.cpp1
-rw-r--r--src/net/serverinfo.h4
-rw-r--r--src/openglgraphics.cpp4
-rw-r--r--src/particle.cpp7
-rw-r--r--src/particle.h6
-rw-r--r--src/particlecontainer.cpp1
-rw-r--r--src/particleemitter.cpp4
-rw-r--r--src/particleemitter.h8
-rw-r--r--src/position.h2
-rw-r--r--src/resources/action.h4
-rw-r--r--src/resources/ambientlayer.cpp3
-rw-r--r--src/resources/ambientoverlay.cpp3
-rw-r--r--src/resources/animation.h4
-rw-r--r--src/resources/image.cpp2
-rw-r--r--src/resources/imageloader.cpp1
-rw-r--r--src/resources/imageset.cpp4
-rw-r--r--src/resources/itemdb.cpp4
-rw-r--r--src/resources/iteminfo.h4
-rw-r--r--src/resources/mapreader.cpp7
-rw-r--r--src/resources/mapreader.h2
-rw-r--r--src/resources/monsterdb.cpp4
-rw-r--r--src/resources/resourcemanager.cpp8
-rw-r--r--src/resources/sdlrescalefacility.h3
-rw-r--r--src/resources/spritedef.cpp4
-rw-r--r--src/resources/spritedef.h4
-rw-r--r--src/resources/wallpaper.cpp6
-rw-r--r--src/rotationalparticle.h4
-rw-r--r--src/shopitem.h4
-rw-r--r--src/statuseffect.cpp3
-rw-r--r--src/statuseffect.h3
-rw-r--r--src/text.cpp4
-rw-r--r--src/text.h4
-rw-r--r--src/textmanager.cpp4
143 files changed, 413 insertions, 384 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp
index 1f8778e1..4f395c19 100644
--- a/src/animatedsprite.cpp
+++ b/src/animatedsprite.cpp
@@ -20,6 +20,7 @@
*/
#include "animatedsprite.h"
+
#include "graphics.h"
#include "log.h"
diff --git a/src/animationparticle.cpp b/src/animationparticle.cpp
index 9c1f7ccb..ca4f4d31 100644
--- a/src/animationparticle.cpp
+++ b/src/animationparticle.cpp
@@ -20,6 +20,7 @@
*/
#include "animationparticle.h"
+
#include "graphics.h"
#include "simpleanimation.h"
diff --git a/src/animationparticle.h b/src/animationparticle.h
index 57b5163a..1dcbfbfa 100644
--- a/src/animationparticle.h
+++ b/src/animationparticle.h
@@ -22,10 +22,10 @@
#ifndef ANIMATION_PARTICLE_H
#define ANIMATION_PARTICLE_H
-#include <libxml/tree.h>
-
#include "imageparticle.h"
+#include <libxml/tree.h>
+
class Animation;
class Map;
class SimpleAnimation;
diff --git a/src/being.h b/src/being.h
index 67ad8096..02abf898 100644
--- a/src/being.h
+++ b/src/being.h
@@ -22,14 +22,6 @@
#ifndef BEING_H
#define BEING_H
-#include <guichan/color.hpp>
-
-#include <SDL_types.h>
-
-#include <set>
-#include <string>
-#include <vector>
-
#include "configlistener.h"
#include "map.h"
#include "particlecontainer.h"
@@ -39,6 +31,14 @@
#include "resources/spritedef.h"
+#include <guichan/color.hpp>
+
+#include <SDL_types.h>
+
+#include <set>
+#include <string>
+#include <vector>
+
#define FIRST_IGNORE_EMOTE 14
#define STATUS_EFFECTS 32
diff --git a/src/channelmanager.cpp b/src/channelmanager.cpp
index 6868c283..962b5884 100644
--- a/src/channelmanager.cpp
+++ b/src/channelmanager.cpp
@@ -20,6 +20,7 @@
*/
#include "channelmanager.h"
+
#include "channel.h"
#include "utils/dtor.h"
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 6711f962..e2021273 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -19,17 +19,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#include "commandhandler.h"
+
#include "channelmanager.h"
#include "channel.h"
#include "game.h"
#include "localplayer.h"
#include "playerrelations.h"
+#include "gui/chat.h"
+
#include "gui/widgets/channeltab.h"
#include "gui/widgets/chattab.h"
-#include "gui/chat.h"
#include "net/adminhandler.h"
#include "net/chathandler.h"
diff --git a/src/configuration.cpp b/src/configuration.cpp
index cb5d9002..2e6681b2 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -19,8 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "configlistener.h"
#include "configuration.h"
+
+#include "configlistener.h"
#include "log.h"
#include "utils/stringutils.h"
diff --git a/src/engine.cpp b/src/engine.cpp
index f7e1d175..65a9ed83 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -19,8 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "beingmanager.h"
#include "engine.h"
+
+#include "beingmanager.h"
#include "flooritemmanager.h"
#include "game.h"
#include "localplayer.h"
diff --git a/src/equipment.h b/src/equipment.h
index f76c0bc6..d8f12551 100644
--- a/src/equipment.h
+++ b/src/equipment.h
@@ -32,12 +32,12 @@ class Equipment
/**
* Constructor.
*/
- Equipment(): mBackend(NULL) {}
+ Equipment(): mBackend(0) {}
/**
* Destructor.
*/
- ~Equipment() { mBackend = NULL; }
+ ~Equipment() { mBackend = 0; }
enum Slot
{
diff --git a/src/flooritem.h b/src/flooritem.h
index a4c18547..1628030e 100644
--- a/src/flooritem.h
+++ b/src/flooritem.h
@@ -22,11 +22,11 @@
#ifndef FLOORITEM_H
#define FLOORITEM_H
-#include <list>
-
#include "map.h"
#include "sprite.h"
+#include <list>
+
class Graphics;
class Image;
class Item;
diff --git a/src/game.cpp b/src/game.cpp
index 9cd91b04..ff947a24 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -19,6 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "game.h"
+
#include "beingmanager.h"
#include "channelmanager.h"
#include "commandhandler.h"
@@ -27,7 +29,6 @@
#include "emoteshortcut.h"
#include "engine.h"
#include "flooritemmanager.h"
-#include "game.h"
#include "graphics.h"
#include "itemshortcut.h"
#include "joystick.h"
@@ -41,9 +42,6 @@
#include "playerrelations.h"
#include "sound.h"
-#include "gui/widgets/chattab.h"
-#include "gui/widgets/emoteshortcutcontainer.h"
-#include "gui/widgets/itemshortcutcontainer.h"
#include "gui/buy.h"
#include "gui/buysell.h"
#include "gui/chat.h"
@@ -75,10 +73,14 @@
#include "gui/specialswindow.h"
#include "gui/storagewindow.h"
+#include "gui/widgets/chattab.h"
+#include "gui/widgets/emoteshortcutcontainer.h"
+#include "gui/widgets/itemshortcutcontainer.h"
+
#include "net/gamehandler.h"
#include "net/generalhandler.h"
-#include "net/playerhandler.h"
#include "net/net.h"
+#include "net/playerhandler.h"
#include "resources/imagewriter.h"
diff --git a/src/game.h b/src/game.h
index 1293db98..cd0e9551 100644
--- a/src/game.h
+++ b/src/game.h
@@ -22,9 +22,8 @@
#ifndef GAME_H
#define GAME_H
-#include "SDL.h"
-
#include "configlistener.h"
+#include "SDL.h"
extern std::string map_path;
extern volatile int fps;
diff --git a/src/gui/buy.h b/src/gui/buy.h
index 7fddaf6c..86a4e320 100644
--- a/src/gui/buy.h
+++ b/src/gui/buy.h
@@ -22,10 +22,10 @@
#ifndef BUY_H
#define BUY_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <guichan/selectionlistener.hpp>
diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h
index 87e99068..e3c38fcf 100644
--- a/src/gui/changeemaildialog.h
+++ b/src/gui/changeemaildialog.h
@@ -22,10 +22,10 @@
#ifndef GUI_CHANGEEMAIL_H
#define GUI_CHANGEEMAIL_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
class LoginData;
diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h
index d54c0e1a..2bd75ffa 100644
--- a/src/gui/changepassworddialog.h
+++ b/src/gui/changepassworddialog.h
@@ -22,10 +22,10 @@
#ifndef CHANGEPASSWORDDIALOG_H
#define CHANGEPASSWORDDIALOG_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
class LoginData;
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index 0d8b9856..70c3e3a2 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -26,10 +26,10 @@
#include "guichanfwd.h"
#include "lockedarray.h"
-#include "gui/widgets/window.h"
-
#include "gui/charselectdialog.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <string>
diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h
index 6144847a..d16453a6 100644
--- a/src/gui/charselectdialog.h
+++ b/src/gui/charselectdialog.h
@@ -22,13 +22,13 @@
#ifndef CHAR_SELECT_H
#define CHAR_SELECT_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
#include "lockedarray.h"
#include "main.h"
#include "player.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
diff --git a/src/gui/connectiondialog.h b/src/gui/connectiondialog.h
index d6059c3f..f2fca68d 100644
--- a/src/gui/connectiondialog.h
+++ b/src/gui/connectiondialog.h
@@ -22,10 +22,10 @@
#ifndef CONNECTION_H
#define CONNECTION_H
-#include "gui/widgets/window.h"
-
#include "main.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
class ProgressBar;
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index a7b2c0d1..dee31f94 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -22,11 +22,11 @@
#ifndef EQUIPMENTWINDOW_H
#define EQUIPMENTWINDOW_H
-#include "gui/widgets/window.h"
-
#include "equipment.h"
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
class Inventory;
diff --git a/src/gui/focushandler.h b/src/gui/focushandler.h
index b0639bd8..0ce12246 100644
--- a/src/gui/focushandler.h
+++ b/src/gui/focushandler.h
@@ -22,10 +22,10 @@
#ifndef FOCUSHANDLER_H
#define FOCUSHANDLER_H
-#include <list>
-
#include <guichan/focushandler.hpp>
+#include <list>
+
/**
* The focus handler. This focus handler does exactly the same as the Guichan
* focus handler, but keeps a stack of modal widgets to be able to handle
diff --git a/src/gui/gui.h b/src/gui/gui.h
index c7b9bbfa..8d9e0225 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -22,10 +22,10 @@
#ifndef GUI_H
#define GUI_H
-#include <guichan/gui.hpp>
-
#include "guichanfwd.h"
+#include <guichan/gui.hpp>
+
class Graphics;
class GuiConfigListener;
class ImageSet;
diff --git a/src/gui/guildwindow.cpp b/src/gui/guildwindow.cpp
index 7a39adb9..0c1eae67 100644
--- a/src/gui/guildwindow.cpp
+++ b/src/gui/guildwindow.cpp
@@ -45,10 +45,10 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
-#include <algorithm>
-
#include <guichan/widgets/tab.hpp>
+#include <algorithm>
+
GuildWindow::GuildWindow():
Window(_("Guild")),
mFocus(false)
diff --git a/src/gui/guildwindow.h b/src/gui/guildwindow.h
index 5afe01dd..2e8ab71c 100644
--- a/src/gui/guildwindow.h
+++ b/src/gui/guildwindow.h
@@ -22,11 +22,12 @@
#ifndef GUI_GUILDWINDOW_H
#define GUI_GUILDWINDOW_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
+
#include <guichan/widgets/listbox.hpp>
#include <iosfwd>
diff --git a/src/gui/help.cpp b/src/gui/help.cpp
index e28f64e3..21ec04b1 100644
--- a/src/gui/help.cpp
+++ b/src/gui/help.cpp
@@ -21,11 +21,12 @@
#include "gui/help.h"
+#include "gui/setup.h"
+
#include "gui/widgets/button.h"
#include "gui/widgets/browserbox.h"
#include "gui/widgets/layout.h"
#include "gui/widgets/scrollarea.h"
-#include "gui/setup.h"
#include "resources/resourcemanager.h"
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index e40ac325..5117c23f 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -22,10 +22,10 @@
#ifndef INVENTORYWINDOW_H
#define INVENTORYWINDOW_H
-#include "gui/widgets/window.h"
-
#include "inventory.h"
+#include "gui/widgets/window.h"
+
#include "net/inventoryhandler.h"
#include "net/net.h"
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index aec09c10..324bb071 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -34,6 +34,7 @@
#include "utils/stringutils.h"
#include <guichan/font.hpp>
+
#include <guichan/widgets/label.hpp>
ItemPopup::ItemPopup():
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h
index ecce0c62..7cce0b80 100644
--- a/src/gui/npcdialog.h
+++ b/src/gui/npcdialog.h
@@ -22,10 +22,10 @@
#ifndef NPCDIALOG_H
#define NPCDIALOG_H
-#include "gui/widgets/window.h"
-
#include "npc.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <guichan/listmodel.hpp>
diff --git a/src/gui/palette.h b/src/gui/palette.h
index c68a4e1c..e778b2a4 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -23,13 +23,13 @@
#ifndef PALETTE_H
#define PALETTE_H
+#include <guichan/listmodel.hpp>
+#include <guichan/color.hpp>
+
#include <cstdlib>
#include <string>
#include <vector>
-#include <guichan/listmodel.hpp>
-#include <guichan/color.hpp>
-
// Generate strings from an enum ... some preprocessor fun.
#define EDEF(a) a,
#define LASTEDEF(a) a
diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h
index 83c514e6..cd73fd72 100644
--- a/src/gui/quitdialog.h
+++ b/src/gui/quitdialog.h
@@ -22,10 +22,10 @@
#ifndef QUITDIALOG_H
#define QUITDIALOG_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
diff --git a/src/gui/register.h b/src/gui/register.h
index 418d6dcd..37cda844 100644
--- a/src/gui/register.h
+++ b/src/gui/register.h
@@ -22,10 +22,10 @@
#ifndef REGISTER_H
#define REGISTER_H
-#include "gui/widgets/window.h"
-
#include "player.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
diff --git a/src/gui/setup.h b/src/gui/setup.h
index 6000adfa..a9cfb8e1 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -22,10 +22,10 @@
#ifndef SETUP_H
#define SETUP_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <list>
diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp
index 6bddbcdd..2ac73621 100644
--- a/src/gui/setup_keyboard.cpp
+++ b/src/gui/setup_keyboard.cpp
@@ -34,10 +34,10 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
-#include <SDL_keyboard.h>
-
#include <guichan/listmodel.hpp>
+#include <SDL_keyboard.h>
+
/**
* The list model for key function list.
*
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index d9966db5..d7ad3e5f 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -47,6 +47,7 @@
#include <guichan/listmodel.hpp>
#include <SDL.h>
+
#include <string>
#include <vector>
diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h
index 12cb3581..861ad07b 100644
--- a/src/gui/skilldialog.h
+++ b/src/gui/skilldialog.h
@@ -22,10 +22,10 @@
#ifndef SKILL_H
#define SKILL_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <map>
diff --git a/src/gui/specialswindow.h b/src/gui/specialswindow.h
index cd92c065..d5370884 100644
--- a/src/gui/specialswindow.h
+++ b/src/gui/specialswindow.h
@@ -24,12 +24,11 @@
#include <vector>
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
-#include <guichan/actionlistener.hpp>
+#include "gui/widgets/window.h"
+#include <guichan/actionlistener.hpp>
#include <map>
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index 4f2df7e4..bbede198 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -29,6 +29,7 @@
#include "gui/widgets/textbox.h"
#include <guichan/font.hpp>
+
#include <guichan/widgets/label.hpp>
SpeechBubble::SpeechBubble():
diff --git a/src/gui/statuswindow.h b/src/gui/statuswindow.h
index 84c74ee7..f40be782 100644
--- a/src/gui/statuswindow.h
+++ b/src/gui/statuswindow.h
@@ -22,10 +22,10 @@
#ifndef STATUS_H
#define STATUS_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <map>
diff --git a/src/gui/storagewindow.h b/src/gui/storagewindow.h
index a67e0617..1ead188d 100644
--- a/src/gui/storagewindow.h
+++ b/src/gui/storagewindow.h
@@ -22,10 +22,10 @@
#ifndef STORAGEWINDOW_H
#define STORAGEWINDOW_H
-#include "gui/widgets/window.h"
-
#include "inventory.h"
+#include "gui/widgets/window.h"
+
#include "net/inventoryhandler.h"
#include "net/net.h"
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 2a4934f3..bebb4186 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -45,11 +45,10 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
+#include <guichan/font.hpp>
#include <sstream>
-#include <guichan/font.hpp>
-
#define CAPTION_PROPOSE _("Propose trade")
#define CAPTION_CONFIRMED _("Confirmed. Waiting...")
#define CAPTION_ACCEPT _("Agree trade")
diff --git a/src/gui/trade.h b/src/gui/trade.h
index 3c292496..d5b03d70 100644
--- a/src/gui/trade.h
+++ b/src/gui/trade.h
@@ -22,10 +22,10 @@
#ifndef TRADE_H
#define TRADE_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
#include <guichan/selectionlistener.hpp>
diff --git a/src/gui/truetypefont.h b/src/gui/truetypefont.h
index 25dcbe44..eb89697d 100644
--- a/src/gui/truetypefont.h
+++ b/src/gui/truetypefont.h
@@ -22,10 +22,8 @@
#ifndef TRUETYPEFONT_H
#define TRUETYPEFONT_H
-#include <list>
-#include <string>
-
#include <guichan/font.hpp>
+
#ifdef __APPLE__
#include <SDL_ttf/SDL_ttf.h>
#else
@@ -36,6 +34,9 @@
#endif
#endif
+#include <list>
+#include <string>
+
class TextChunk;
/**
diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h
index 222dab2f..b31d0e61 100644
--- a/src/gui/unregisterdialog.h
+++ b/src/gui/unregisterdialog.h
@@ -22,10 +22,10 @@
#ifndef UNREGISTERDIALOG_H
#define UNREGISTERDIALOG_H
-#include "gui/widgets/window.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/window.h"
+
#include <guichan/actionlistener.hpp>
class LoginData;
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index e1030972..d3a86f1d 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -22,11 +22,11 @@
#ifndef VIEWPORT_H
#define VIEWPORT_H
-#include "gui/widgets/windowcontainer.h"
-
#include "configlistener.h"
#include "position.h"
+#include "gui/widgets/windowcontainer.h"
+
#include <guichan/mouselistener.hpp>
class Being;
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index 2823d308..2cd571c9 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -22,12 +22,12 @@
#ifndef BROWSERBOX_H
#define BROWSERBOX_H
-#include <list>
-#include <vector>
-
#include <guichan/mouselistener.hpp>
#include <guichan/widget.hpp>
+#include <list>
+#include <vector>
+
class LinkHandler;
struct BROWSER_LINK {
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index 5d8b594a..2caf2b73 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -22,9 +22,10 @@
#ifndef CHATTAB_H
#define CHATTAB_H
-#include "gui/widgets/tab.h"
#include "gui/chat.h"
+#include "gui/widgets/tab.h"
+
class BrowserBox;
class Recorder;
class ScrollArea;
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index a65a5196..d971fd66 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -24,7 +24,6 @@
#include <guichan/widgets/checkbox.hpp>
-
class Image;
/**
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index fb807f38..249d083a 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -21,6 +21,10 @@
#include "gui/widgets/desktop.h"
+#include "graphics.h"
+#include "log.h"
+#include "main.h"
+
#include "gui/palette.h"
#include "gui/widgets/label.h"
@@ -29,10 +33,6 @@
#include "resources/resourcemanager.h"
#include "resources/wallpaper.h"
-#include "graphics.h"
-#include "log.h"
-#include "main.h"
-
Desktop::Desktop()
: mWallpaper(0)
{
diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h
index da623bbd..bd69019f 100644
--- a/src/gui/widgets/desktop.h
+++ b/src/gui/widgets/desktop.h
@@ -22,10 +22,10 @@
#ifndef DESKTOP_H
#define DESKTOP_H
-#include "gui/widgets/container.h"
-
#include "guichanfwd.h"
+#include "gui/widgets/container.h"
+
#include <guichan/widgetlistener.hpp>
class Image;
diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h
index 8860927e..a75fe968 100644
--- a/src/gui/widgets/emoteshortcutcontainer.h
+++ b/src/gui/widgets/emoteshortcutcontainer.h
@@ -22,10 +22,10 @@
#ifndef EMOTESHORTCUTCONTAINER_H
#define EMOTESHORTCUTCONTAINER_H
-#include <vector>
-
#include "gui/widgets/shortcutcontainer.h"
+#include <vector>
+
class AnimatedSprite;
class Image;
diff --git a/src/gui/widgets/guildlistbox.h b/src/gui/widgets/guildlistbox.h
index d266fe46..959e3bd0 100644
--- a/src/gui/widgets/guildlistbox.h
+++ b/src/gui/widgets/guildlistbox.h
@@ -22,12 +22,12 @@
#ifndef GUI_GUILDLISTBOX_H
#define GUI_GUILDLISTBOX_H
+#include "gui/widgets/listbox.h"
+
#include <map>
#include <string>
#include <vector>
-#include "gui/widgets/listbox.h"
-
class Image;
class GuildListBox : public ListBox
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index 1a7011ab..d284658d 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -22,10 +22,11 @@
#include <sstream>
#include <string>
-#include "gui/widgets/itemlinkhandler.h"
#include "gui/itempopup.h"
#include "gui/viewport.h"
+#include "gui/widgets/itemlinkhandler.h"
+
#include "resources/iteminfo.h"
#include "resources/itemdb.h"
diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h
index 03d57b8d..411ad2d1 100644
--- a/src/gui/widgets/itemshortcutcontainer.h
+++ b/src/gui/widgets/itemshortcutcontainer.h
@@ -22,10 +22,10 @@
#ifndef ITEMSHORTCUTCONTAINER_H
#define ITEMSHORTCUTCONTAINER_H
-#include <guichan/mouselistener.hpp>
-
#include "gui/widgets/shortcutcontainer.h"
+#include <guichan/mouselistener.hpp>
+
class Image;
class Item;
class ItemPopup;
diff --git a/src/gui/widgets/linkhandler.h b/src/gui/widgets/linkhandler.h
index 30267f87..03fcc491 100644
--- a/src/gui/widgets/linkhandler.h
+++ b/src/gui/widgets/linkhandler.h
@@ -24,8 +24,6 @@
#include <string>
-#include <string>
-
/**
* A simple interface to windows that need to handle links from BrowserBox
* widget.
diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h
index 119ed841..7d45841b 100644
--- a/src/gui/widgets/popup.h
+++ b/src/gui/widgets/popup.h
@@ -23,11 +23,11 @@
#ifndef POPUP_H
#define POPUP_H
-#include "gui/widgets/container.h"
-
#include "configuration.h"
#include "guichanfwd.h"
+#include "gui/widgets/container.h"
+
class Skin;
class WindowContainer;
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index a0a8f951..20e0d169 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -22,10 +22,10 @@
#ifndef PROGRESSBAR_H
#define PROGRESSBAR_H
-#include <string>
-
#include <guichan/widget.hpp>
+#include <string>
+
class ImageRect;
/**
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 9abe1f58..6ad25125 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -25,12 +25,12 @@
#include "graphics.h"
#include "gui/palette.h"
+#include "gui/skin.h"
#include "gui/widgets/tabbedarea.h"
#include "resources/image.h"
#include "resources/resourcemanager.h"
-#include "gui/skin.h"
#include "utils/dtor.h"
diff --git a/src/gui/worldselectdialog.h b/src/gui/worldselectdialog.h
index acd00898..fc622071 100644
--- a/src/gui/worldselectdialog.h
+++ b/src/gui/worldselectdialog.h
@@ -29,6 +29,7 @@
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
#include <guichan/listmodel.hpp>
+
#include <vector>
class LoginData;
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 0e5108ac..d5ca8630 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -19,12 +19,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <algorithm>
-
#include "inventory.h"
#include "item.h"
#include "log.h"
+#include <algorithm>
+
struct SlotUsed : public std::unary_function<Item*, bool>
{
bool operator()(const Item *item) const
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h
index c14eec58..4a36ea63 100644
--- a/src/keyboardconfig.h
+++ b/src/keyboardconfig.h
@@ -23,6 +23,7 @@
#define KEYBOARDCONFIG_H
#include <SDL_types.h>
+
#include <string>
/**
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index f5af4434..86dcf7a2 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -22,10 +22,12 @@
#include "localplayer.h"
#include "configuration.h"
+#include "effectmanager.h"
#include "equipment.h"
#include "flooritem.h"
#include "game.h"
#include "graphics.h"
+#include "guild.h"
#include "inventory.h"
#include "item.h"
#include "log.h"
@@ -54,9 +56,6 @@
#include "net/specialhandler.h"
#include "net/tradehandler.h"
-#include "effectmanager.h"
-#include "guild.h"
-
#include "resources/animation.h"
#include "resources/imageset.h"
#include "resources/itemdb.h"
diff --git a/src/localplayer.h b/src/localplayer.h
index 00415ab9..bc4f3647 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -22,12 +22,13 @@
#ifndef LOCALPLAYER_H
#define LOCALPLAYER_H
-#include <memory>
-#include <vector>
-
#include "player.h"
+
#include "gui/palette.h"
+#include <memory>
+#include <vector>
+
class Equipment;
class FloorItem;
class ImageSet;
diff --git a/src/log.cpp b/src/log.cpp
index 322fcdae..9ed940a1 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -22,7 +22,9 @@
#include <iostream>
#include <sstream>
-#include <sys/time.h>
+#include "log.h"
+
+#include "gui/widgets/chattab.h"
#ifdef WIN32
#include <windows.h>
@@ -30,9 +32,7 @@
#include <Carbon/Carbon.h>
#endif
-#include "log.h"
-
-#include "gui/widgets/chattab.h"
+#include <sys/time.h>
Logger::Logger():
mLogToStandardOut(false),
diff --git a/src/main.cpp b/src/main.cpp
index 9789ee46..69b45091 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -38,11 +38,6 @@
#include "statuseffect.h"
#include "units.h"
-#include "gui/widgets/button.h"
-#include "gui/widgets/desktop.h"
-#include "gui/widgets/label.h"
-#include "gui/widgets/progressbar.h"
-
#include "gui/changeemaildialog.h"
#include "gui/changepassworddialog.h"
#include "gui/charselectdialog.h"
@@ -61,6 +56,11 @@
#include "gui/updatewindow.h"
#include "gui/worldselectdialog.h"
+#include "gui/widgets/button.h"
+#include "gui/widgets/desktop.h"
+#include "gui/widgets/label.h"
+#include "gui/widgets/progressbar.h"
+
#include "net/charhandler.h"
#include "net/gamehandler.h"
#include "net/generalhandler.h"
@@ -84,6 +84,13 @@
#include <libxml/parser.h>
+#ifdef WIN32
+#include <SDL_syswm.h>
+#else
+#include <cerrno>
+#include <sys/stat.h>
+#endif
+
#include <getopt.h>
#include <iostream>
#include <physfs.h>
@@ -99,13 +106,6 @@
#define usleep(usec) (Sleep ((usec) / 1000), 0)
#endif
-#ifdef WIN32
-#include <SDL_syswm.h>
-#else
-#include <cerrno>
-#include <sys/stat.h>
-#endif
-
namespace
{
class SetupListener : public gcn::ActionListener
diff --git a/src/main.h b/src/main.h
index 4938e80d..ca2612e2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -51,12 +51,6 @@
* MessageHanders\endlink.
*/
-#include <string>
-
-#include "net/logindata.h"
-
-#include <guichan/actionlistener.hpp>
-
#ifdef HAVE_CONFIG_H
#include "../config.h"
#elif defined WIN32
@@ -65,6 +59,12 @@
#define PACKAGE_VERSION "0.0.29.1"
#endif
+#include "net/logindata.h"
+
+#include <guichan/actionlistener.hpp>
+
+#include <string>
+
#ifdef MANASERV_SUPPORT
#define SERVER_BUILD "manaserv"
#else
diff --git a/src/map.cpp b/src/map.cpp
index df03873f..34064a64 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <queue>
-
#include "beingmanager.h"
#include "configuration.h"
#include "game.h"
@@ -38,6 +36,8 @@
#include "utils/dtor.h"
#include "utils/stringutils.h"
+#include <queue>
+
extern volatile int tick_time;
/**
diff --git a/src/map.h b/src/map.h
index f8b14cd3..9914b50f 100644
--- a/src/map.h
+++ b/src/map.h
@@ -22,12 +22,12 @@
#ifndef MAP_H
#define MAP_H
-#include <list>
-#include <vector>
-
#include "position.h"
#include "properties.h"
+#include <list>
+#include <vector>
+
class Animation;
class AmbientLayer;
class Graphics;
diff --git a/src/net/download.cpp b/src/net/download.cpp
index ecc36a0c..9a1dcdd1 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -24,10 +24,11 @@
#include "log.h"
#include "main.h"
+#include <curl/curl.h>
+
#include <SDL.h>
#include <SDL_thread.h>
-#include <curl/curl.h>
#include <zlib.h>
const char *DOWNLOAD_ERROR_MESSAGE_THREAD = "Could not create download thread!";
diff --git a/src/net/download.h b/src/net/download.h
index 1e1f806f..3bea2276 100644
--- a/src/net/download.h
+++ b/src/net/download.h
@@ -20,6 +20,7 @@
*/
#include <SDL_types.h>
+
#include <stdio.h>
#include <string>
diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp
index a58154f6..72068f6b 100644
--- a/src/net/ea/adminhandler.cpp
+++ b/src/net/ea/adminhandler.cpp
@@ -21,11 +21,6 @@
#include "net/ea/adminhandler.h"
-#include "net/chathandler.h"
-#include "net/net.h"
-
-#include "net/ea/protocol.h"
-
#include "being.h"
#include "beingmanager.h"
#include "game.h"
@@ -33,6 +28,11 @@
#include "gui/widgets/chattab.h"
+#include "net/chathandler.h"
+#include "net/net.h"
+
+#include "net/ea/protocol.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 6c943454..932f88d9 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -21,8 +21,6 @@
#include "net/ea/beinghandler.h"
-#include "net/ea/protocol.h"
-
#include "being.h"
#include "beingmanager.h"
#include "effectmanager.h"
@@ -34,6 +32,8 @@
#include "gui/partywindow.h"
+#include "net/ea/protocol.h"
+
#include "resources/colordb.h"
#include <iostream>
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index 8dba566d..32908dee 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -21,10 +21,6 @@
#include "net/ea/buysellhandler.h"
-#include "net/ea/protocol.h"
-
-#include "net/messagein.h"
-
#include "beingmanager.h"
#include "inventory.h"
#include "item.h"
@@ -37,6 +33,10 @@
#include "gui/widgets/chattab.h"
+#include "net/messagein.h"
+
+#include "net/ea/protocol.h"
+
#include "utils/gettext.h"
namespace EAthena {
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index cda839bb..b671db23 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -21,15 +21,6 @@
#include "net/ea/charserverhandler.h"
-#include "net/ea/loginhandler.h"
-#include "net/ea/network.h"
-#include "net/ea/protocol.h"
-
-#include "net/logindata.h"
-#include "net/messagein.h"
-#include "net/messageout.h"
-#include "net/net.h"
-
#include "game.h"
#include "log.h"
#include "main.h"
@@ -37,6 +28,15 @@
#include "gui/charcreatedialog.h"
#include "gui/okdialog.h"
+#include "net/logindata.h"
+#include "net/messagein.h"
+#include "net/messageout.h"
+#include "net/net.h"
+
+#include "net/ea/loginhandler.h"
+#include "net/ea/network.h"
+#include "net/ea/protocol.h"
+
#include "resources/colordb.h"
#include "utils/gettext.h"
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index dd4d18a1..9fb124c5 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -21,11 +21,6 @@
#include "net/ea/chathandler.h"
-#include "net/ea/protocol.h"
-
-#include "net/messagein.h"
-#include "net/messageout.h"
-
#include "being.h"
#include "beingmanager.h"
#include "game.h"
@@ -34,6 +29,11 @@
#include "gui/widgets/chattab.h"
+#include "net/messagein.h"
+#include "net/messageout.h"
+
+#include "net/ea/protocol.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 41c86d4d..4c732070 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -21,13 +21,6 @@
#include "net/ea/gamehandler.h"
-#include "net/ea/loginhandler.h"
-#include "net/ea/network.h"
-#include "net/ea/protocol.h"
-
-#include "net/messagein.h"
-#include "net/messageout.h"
-
#include "game.h"
#include "localplayer.h"
#include "log.h"
@@ -37,6 +30,13 @@
#include "gui/okdialog.h"
+#include "net/messagein.h"
+#include "net/messageout.h"
+
+#include "net/ea/loginhandler.h"
+#include "net/ea/network.h"
+#include "net/ea/protocol.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/net/ea/generalhandler.cpp b/src/net/ea/generalhandler.cpp
index 5c7c5036..677b2aa5 100644
--- a/src/net/ea/generalhandler.cpp
+++ b/src/net/ea/generalhandler.cpp
@@ -21,15 +21,16 @@
#include "net/ea/generalhandler.h"
+#include "configuration.h"
+#include "log.h"
+#include "main.h"
+
#include "gui/charselectdialog.h"
#include "gui/inventorywindow.h"
#include "gui/register.h"
#include "gui/skilldialog.h"
#include "gui/statuswindow.h"
-#include "net/ea/network.h"
-#include "net/ea/protocol.h"
-
#include "net/ea/adminhandler.h"
#include "net/ea/beinghandler.h"
#include "net/ea/buysellhandler.h"
@@ -39,9 +40,11 @@
#include "net/ea/inventoryhandler.h"
#include "net/ea/itemhandler.h"
#include "net/ea/loginhandler.h"
+#include "net/ea/network.h"
#include "net/ea/npchandler.h"
-#include "net/ea/playerhandler.h"
#include "net/ea/partyhandler.h"
+#include "net/ea/playerhandler.h"
+#include "net/ea/protocol.h"
#include "net/ea/tradehandler.h"
#include "net/ea/specialhandler.h"
@@ -52,10 +55,6 @@
#include "resources/itemdb.h"
-#include "configuration.h"
-#include "log.h"
-#include "main.h"
-
#include "utils/gettext.h"
#include <assert.h>
diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h
index 9ef481e2..afbc8fd9 100644
--- a/src/net/ea/gui/partytab.h
+++ b/src/net/ea/gui/partytab.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef CHANNELTAB_H
-#define CHANNELTAB_H
+#ifndef EA_PARTYTAB_H
+#define EA_PARTYTAB_H
#include "gui/widgets/chattab.h"
@@ -45,4 +45,4 @@ class PartyTab : public ChatTab
extern PartyTab *partyTab;
-#endif // CHANNELTAB_H
+#endif // EA_PARTYTAB_H
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index c61e88ac..d96aef0d 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -21,12 +21,12 @@
#include "net/ea/guildhandler.h"
-#include "net/ea/messagein.h"
-#include "net/ea/protocol.h"
-
#include "localplayer.h"
#include "log.h"
+#include "net/ea/messagein.h"
+#include "net/ea/protocol.h"
+
extern Net::GuildHandler *guildHandler;
namespace EAthena {
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index c7080c2d..34f3f6d7 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -21,11 +21,6 @@
#include "net/ea/inventoryhandler.h"
-#include "net/ea/protocol.h"
-
-#include "net/messagein.h"
-#include "net/messageout.h"
-
#include "configuration.h"
#include "equipment.h"
#include "inventory.h"
@@ -38,6 +33,11 @@
#include "gui/widgets/chattab.h"
+#include "net/messagein.h"
+#include "net/messageout.h"
+
+#include "net/ea/protocol.h"
+
#include "resources/iteminfo.h"
#include "utils/gettext.h"
diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h
index 65f48f6a..15bdfb76 100644
--- a/src/net/ea/inventoryhandler.h
+++ b/src/net/ea/inventoryhandler.h
@@ -22,15 +22,15 @@
#ifndef NET_EA_INVENTORYHANDLER_H
#define NET_EA_INVENTORYHANDLER_H
+#include "equipment.h"
+#include "inventory.h"
+#include "localplayer.h"
+
#include "net/inventoryhandler.h"
#include "net/net.h"
#include "net/ea/messagehandler.h"
-#include "equipment.h"
-#include "inventory.h"
-#include "localplayer.h"
-
namespace EAthena {
class EquipBackend : public Equipment::Backend {
diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp
index f926f8e8..2f65c064 100644
--- a/src/net/ea/itemhandler.cpp
+++ b/src/net/ea/itemhandler.cpp
@@ -21,12 +21,12 @@
#include "net/ea/itemhandler.h"
-#include "net/ea/protocol.h"
+#include "engine.h"
+#include "flooritemmanager.h"
#include "net/messagein.h"
-#include "engine.h"
-#include "flooritemmanager.h"
+#include "net/ea/protocol.h"
namespace EAthena {
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index 07caa325..94a8ca6d 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -21,15 +21,15 @@
#include "net/ea/loginhandler.h"
-#include "net/ea/network.h"
-#include "net/ea/protocol.h"
+#include "log.h"
+#include "main.h"
#include "net/logindata.h"
#include "net/messagein.h"
#include "net/messageout.h"
-#include "log.h"
-#include "main.h"
+#include "net/ea/network.h"
+#include "net/ea/protocol.h"
#include "utils/dtor.h"
#include "utils/gettext.h"
diff --git a/src/net/ea/network.cpp b/src/net/ea/network.cpp
index a93d6cfd..d00006b0 100644
--- a/src/net/ea/network.cpp
+++ b/src/net/ea/network.cpp
@@ -21,16 +21,16 @@
#include "net/ea/network.h"
-#include "net/ea/protocol.h"
+#include "log.h"
#include "net/messagehandler.h"
#include "net/messagein.h"
+#include "net/ea/protocol.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
-#include "log.h"
-
#include <assert.h>
#include <sstream>
diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp
index 5800504c..40e9daf8 100644
--- a/src/net/ea/npchandler.cpp
+++ b/src/net/ea/npchandler.cpp
@@ -21,18 +21,18 @@
#include "net/ea/npchandler.h"
-#include "net/ea/protocol.h"
+#include "beingmanager.h"
+#include "localplayer.h"
+#include "npc.h"
+
+#include "gui/npcdialog.h"
#include "net/messagein.h"
#include "net/messageout.h"
#include "net/net.h"
#include "net/npchandler.h"
-#include "beingmanager.h"
-#include "localplayer.h"
-#include "npc.h"
-
-#include "gui/npcdialog.h"
+#include "net/ea/protocol.h"
#include <SDL_types.h>
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index af842c11..bd69fa05 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -32,6 +32,7 @@
#include "net/messageout.h"
#include "net/ea/protocol.h"
+
#include "net/ea/gui/partytab.h"
#include "utils/gettext.h"
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 14907300..d7b8594e 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -21,11 +21,6 @@
#include "net/ea/playerhandler.h"
-#include "net/ea/protocol.h"
-
-#include "net/messagein.h"
-#include "net/messageout.h"
-
#include "engine.h"
#include "localplayer.h"
#include "log.h"
@@ -43,6 +38,11 @@
#include "gui/widgets/chattab.h"
+#include "net/messagein.h"
+#include "net/messageout.h"
+
+#include "net/ea/protocol.h"
+
#include "utils/stringutils.h"
#include "utils/gettext.h"
diff --git a/src/net/ea/specialhandler.cpp b/src/net/ea/specialhandler.cpp
index b9335553..0ac2f106 100644
--- a/src/net/ea/specialhandler.cpp
+++ b/src/net/ea/specialhandler.cpp
@@ -21,11 +21,6 @@
#include "net/ea/specialhandler.h"
-#include "net/ea/protocol.h"
-
-#include "net/messagein.h"
-#include "net/messageout.h"
-
#include "localplayer.h"
#include "log.h"
@@ -33,6 +28,11 @@
#include "gui/widgets/chattab.h"
+#include "net/messagein.h"
+#include "net/messageout.h"
+
+#include "net/ea/protocol.h"
+
#include "utils/gettext.h"
/** job dependend identifiers (?) */
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index b02bb900..80600dc7 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -21,12 +21,6 @@
#include "net/ea/tradehandler.h"
-#include "net/ea/protocol.h"
-
-#include "net/inventoryhandler.h"
-#include "net/messagein.h"
-#include "net/messageout.h"
-
#include "inventory.h"
#include "item.h"
#include "localplayer.h"
@@ -37,6 +31,12 @@
#include "gui/widgets/chattab.h"
+#include "net/inventoryhandler.h"
+#include "net/messagein.h"
+#include "net/messageout.h"
+
+#include "net/ea/protocol.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/net/logindata.h b/src/net/logindata.h
index 8df06171..a09d8fb3 100644
--- a/src/net/logindata.h
+++ b/src/net/logindata.h
@@ -22,11 +22,12 @@
#ifndef LOGINDATA_H
#define LOGINDATA_H
-#include <string>
-
#include "player.h"
+
#include "net/serverinfo.h"
+#include <string>
+
struct LoginData
{
std::string username;
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp
index d7cb40c0..585f0823 100644
--- a/src/net/manaserv/beinghandler.cpp
+++ b/src/net/manaserv/beinghandler.cpp
@@ -21,11 +21,6 @@
#include "net/manaserv/beinghandler.h"
-#include "net/manaserv/playerhandler.h"
-#include "net/manaserv/protocol.h"
-
-#include "net/messagein.h"
-
#include "being.h"
#include "beingmanager.h"
#include "game.h"
@@ -38,6 +33,11 @@
#include "gui/okdialog.h"
+#include "net/messagein.h"
+
+#include "net/manaserv/playerhandler.h"
+#include "net/manaserv/protocol.h"
+
#include "resources/colordb.h"
#include "utils/gettext.h"
diff --git a/src/net/manaserv/buysellhandler.cpp b/src/net/manaserv/buysellhandler.cpp
index 9f3e65ad..9c8cb129 100644
--- a/src/net/manaserv/buysellhandler.cpp
+++ b/src/net/manaserv/buysellhandler.cpp
@@ -21,15 +21,15 @@
#include "net/manaserv/buysellhandler.h"
-#include "net/manaserv/protocol.h"
-
-#include "net/messagein.h"
-
#include "beingmanager.h"
#include "item.h"
#include "localplayer.h"
#include "npc.h"
+#include "net/messagein.h"
+
+#include "net/manaserv/protocol.h"
+
#include "gui/buy.h"
#include "gui/chat.h"
#include "gui/sell.h"
diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp
index ee32c5ae..06c81c9e 100644
--- a/src/net/manaserv/charhandler.cpp
+++ b/src/net/manaserv/charhandler.cpp
@@ -21,16 +21,6 @@
#include "net/manaserv/charhandler.h"
-#include "net/manaserv/connection.h"
-#include "net/manaserv/gamehandler.h"
-#include "net/manaserv/messagein.h"
-#include "net/manaserv/messageout.h"
-#include "net/manaserv/protocol.h"
-
-#include "net/logindata.h"
-#include "net/loginhandler.h"
-#include "net/net.h"
-
#include "game.h"
#include "localplayer.h"
#include "log.h"
@@ -39,6 +29,16 @@
#include "gui/charcreatedialog.h"
#include "gui/okdialog.h"
+#include "net/logindata.h"
+#include "net/loginhandler.h"
+#include "net/net.h"
+
+#include "net/manaserv/connection.h"
+#include "net/manaserv/gamehandler.h"
+#include "net/manaserv/messagein.h"
+#include "net/manaserv/messageout.h"
+#include "net/manaserv/protocol.h"
+
#include "resources/colordb.h"
#include "utils/gettext.h"
diff --git a/src/net/manaserv/charhandler.h b/src/net/manaserv/charhandler.h
index 6131412b..fca2b30a 100644
--- a/src/net/manaserv/charhandler.h
+++ b/src/net/manaserv/charhandler.h
@@ -22,10 +22,10 @@
#ifndef NET_MANASERV_CHARSERVERHANDLER_H
#define NET_MANASERV_CHARSERVERHANDLER_H
-#include "net/charhandler.h"
-
#include "gui/charselectdialog.h"
+#include "net/charhandler.h"
+
#include "net/manaserv/messagehandler.h"
class LoginData;
diff --git a/src/net/manaserv/chathandler.cpp b/src/net/manaserv/chathandler.cpp
index 36e57278..70e148b1 100644
--- a/src/net/manaserv/chathandler.cpp
+++ b/src/net/manaserv/chathandler.cpp
@@ -21,11 +21,6 @@
#include "net/manaserv/chathandler.h"
-#include "net/manaserv/connection.h"
-#include "net/manaserv/messagein.h"
-#include "net/manaserv/messageout.h"
-#include "net/manaserv/protocol.h"
-
#include "being.h"
#include "beingmanager.h"
#include "channel.h"
@@ -33,10 +28,16 @@
#include "game.h"
#include "main.h"
-#include "gui/widgets/channeltab.h"
#include "gui/chat.h"
#include "gui/guildwindow.h"
+#include "gui/widgets/channeltab.h"
+
+#include "net/manaserv/connection.h"
+#include "net/manaserv/messagein.h"
+#include "net/manaserv/messageout.h"
+#include "net/manaserv/protocol.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/net/manaserv/connection.cpp b/src/net/manaserv/connection.cpp
index 6ddcf186..af2816fb 100644
--- a/src/net/manaserv/connection.cpp
+++ b/src/net/manaserv/connection.cpp
@@ -21,11 +21,11 @@
#include "net/manaserv/connection.h"
+#include "log.h"
+
#include "net/manaserv/internal.h"
#include "net/manaserv/messageout.h"
-#include "log.h"
-
#include <string>
namespace ManaServ
diff --git a/src/net/manaserv/connection.h b/src/net/manaserv/connection.h
index e5db8c8e..daab8b69 100644
--- a/src/net/manaserv/connection.h
+++ b/src/net/manaserv/connection.h
@@ -22,10 +22,10 @@
#ifndef NET_MANASERV_CONNECTION_H
#define NET_MANASERV_CONNECTION_H
-#include <iosfwd>
-
#include <enet/enet.h>
+#include <iosfwd>
+
namespace ManaServ
{
class MessageOut;
diff --git a/src/net/manaserv/effecthandler.cpp b/src/net/manaserv/effecthandler.cpp
index 39bc9cba..ca484b30 100644
--- a/src/net/manaserv/effecthandler.cpp
+++ b/src/net/manaserv/effecthandler.cpp
@@ -21,14 +21,14 @@
#include "net/manaserv/effecthandler.h"
-#include "net/manaserv/protocol.h"
-
-#include "net/messagein.h"
-
#include "beingmanager.h"
#include "effectmanager.h"
#include "log.h"
+#include "net/messagein.h"
+
+#include "net/manaserv/protocol.h"
+
namespace ManaServ {
EffectHandler::EffectHandler()
diff --git a/src/net/manaserv/gamehandler.cpp b/src/net/manaserv/gamehandler.cpp
index 700d2d6c..2e310cc7 100644
--- a/src/net/manaserv/gamehandler.cpp
+++ b/src/net/manaserv/gamehandler.cpp
@@ -21,14 +21,14 @@
#include "net/manaserv/gamehandler.h"
+#include "localplayer.h"
+#include "main.h"
+
#include "net/manaserv/chathandler.h"
#include "net/manaserv/connection.h"
#include "net/manaserv/messageout.h"
#include "net/manaserv/protocol.h"
-#include "localplayer.h"
-#include "main.h"
-
extern Net::GameHandler *gameHandler;
extern ManaServ::ChatHandler *chatHandler;
diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp
index 96a6750d..79eb59ef 100644
--- a/src/net/manaserv/generalhandler.cpp
+++ b/src/net/manaserv/generalhandler.cpp
@@ -21,6 +21,8 @@
#include "net/manaserv/generalhandler.h"
+#include "main.h"
+
#include "gui/changeemaildialog.h"
#include "gui/charselectdialog.h"
#include "gui/inventorywindow.h"
@@ -30,19 +32,18 @@
#include "gui/specialswindow.h"
#include "gui/statuswindow.h"
-#include "net/manaserv/network.h"
-#include "net/manaserv/connection.h"
-
#include "net/manaserv/beinghandler.h"
#include "net/manaserv/buysellhandler.h"
#include "net/manaserv/charhandler.h"
#include "net/manaserv/chathandler.h"
+#include "net/manaserv/connection.h"
#include "net/manaserv/effecthandler.h"
#include "net/manaserv/gamehandler.h"
#include "net/manaserv/guildhandler.h"
#include "net/manaserv/inventoryhandler.h"
#include "net/manaserv/itemhandler.h"
#include "net/manaserv/loginhandler.h"
+#include "net/manaserv/network.h"
#include "net/manaserv/npchandler.h"
#include "net/manaserv/partyhandler.h"
#include "net/manaserv/playerhandler.h"
@@ -51,8 +52,6 @@
#include "utils/gettext.h"
-#include "main.h"
-
#include <list>
extern Net::GeneralHandler *generalHandler;
diff --git a/src/net/manaserv/guildhandler.cpp b/src/net/manaserv/guildhandler.cpp
index 79f76320..c2160332 100644
--- a/src/net/manaserv/guildhandler.cpp
+++ b/src/net/manaserv/guildhandler.cpp
@@ -21,13 +21,6 @@
#include "net/manaserv/guildhandler.h"
-#include "net/messagein.h"
-
-#include "net/manaserv/connection.h"
-#include "net/manaserv/messagein.h"
-#include "net/manaserv/messageout.h"
-#include "net/manaserv/protocol.h"
-
#include "gui/widgets/channeltab.h"
#include "gui/chat.h"
#include "gui/guildwindow.h"
@@ -38,6 +31,13 @@
#include "channel.h"
#include "channelmanager.h"
+#include "net/messagein.h"
+
+#include "net/manaserv/connection.h"
+#include "net/manaserv/messagein.h"
+#include "net/manaserv/messageout.h"
+#include "net/manaserv/protocol.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/net/manaserv/inventoryhandler.cpp b/src/net/manaserv/inventoryhandler.cpp
index f62da41c..163ff305 100644
--- a/src/net/manaserv/inventoryhandler.cpp
+++ b/src/net/manaserv/inventoryhandler.cpp
@@ -21,11 +21,6 @@
#include "net/manaserv/inventoryhandler.h"
-#include "net/manaserv/connection.h"
-#include "net/manaserv/messagein.h"
-#include "net/manaserv/messageout.h"
-#include "net/manaserv/protocol.h"
-
#include "equipment.h"
#include "inventory.h"
#include "item.h"
@@ -34,6 +29,11 @@
#include "gui/chat.h"
+#include "net/manaserv/connection.h"
+#include "net/manaserv/messagein.h"
+#include "net/manaserv/messageout.h"
+#include "net/manaserv/protocol.h"
+
#include "resources/iteminfo.h"
#include "log.h" // <<< REMOVE ME!
diff --git a/src/net/manaserv/inventoryhandler.h b/src/net/manaserv/inventoryhandler.h
index fd28738c..65b51e3b 100644
--- a/src/net/manaserv/inventoryhandler.h
+++ b/src/net/manaserv/inventoryhandler.h
@@ -22,12 +22,12 @@
#ifndef NET_MANASERV_INVENTORYHANDLER_H
#define NET_MANASERV_INVENTORYHANDLER_H
+#include "equipment.h"
+
#include "net/inventoryhandler.h"
#include "net/manaserv/messagehandler.h"
-#include "equipment.h"
-
namespace ManaServ {
class EquipBackend : public Equipment::Backend {
diff --git a/src/net/manaserv/itemhandler.cpp b/src/net/manaserv/itemhandler.cpp
index c63eb5bd..3d89487c 100644
--- a/src/net/manaserv/itemhandler.cpp
+++ b/src/net/manaserv/itemhandler.cpp
@@ -21,13 +21,13 @@
#include "net/manaserv/itemhandler.h"
+#include "engine.h"
+#include "flooritemmanager.h"
+
#include "net/manaserv/protocol.h"
#include "net/manaserv/messagein.h"
-#include "engine.h"
-#include "flooritemmanager.h"
-
namespace ManaServ {
ItemHandler::ItemHandler()
diff --git a/src/net/manaserv/loginhandler.cpp b/src/net/manaserv/loginhandler.cpp
index 91d9171b..704d600b 100644
--- a/src/net/manaserv/loginhandler.cpp
+++ b/src/net/manaserv/loginhandler.cpp
@@ -21,15 +21,15 @@
#include "net/manaserv/loginhandler.h"
+#include "main.h"
+
+#include "net/logindata.h"
+
#include "net/manaserv/connection.h"
#include "net/manaserv/messagein.h"
#include "net/manaserv/messageout.h"
#include "net/manaserv/protocol.h"
-#include "net/logindata.h"
-
-#include "main.h"
-
#include "utils/gettext.h"
#include "utils/sha256.h"
diff --git a/src/net/manaserv/network.cpp b/src/net/manaserv/network.cpp
index 83d78e06..5bf411cb 100644
--- a/src/net/manaserv/network.cpp
+++ b/src/net/manaserv/network.cpp
@@ -21,13 +21,13 @@
#include "net/manaserv/network.h"
+#include "log.h"
+
#include "net/manaserv/connection.h"
#include "net/manaserv/internal.h"
#include "net/manaserv/messagehandler.h"
#include "net/manaserv/messagein.h"
-#include "log.h"
-
#include <enet/enet.h>
#include <map>
diff --git a/src/net/manaserv/npchandler.cpp b/src/net/manaserv/npchandler.cpp
index 9856daeb..5d9b62de 100644
--- a/src/net/manaserv/npchandler.cpp
+++ b/src/net/manaserv/npchandler.cpp
@@ -21,16 +21,16 @@
#include "net/manaserv/npchandler.h"
-#include "net/manaserv/connection.h"
-#include "net/manaserv/messagein.h"
-#include "net/manaserv/messageout.h"
-#include "net/manaserv/protocol.h"
-
#include "beingmanager.h"
#include "npc.h"
-#include "gui/npcpostdialog.h"
#include "gui/npcdialog.h"
+#include "gui/npcpostdialog.h"
+
+#include "net/manaserv/connection.h"
+#include "net/manaserv/messagein.h"
+#include "net/manaserv/messageout.h"
+#include "net/manaserv/protocol.h"
extern Net::NpcHandler *npcHandler;
diff --git a/src/net/manaserv/partyhandler.cpp b/src/net/manaserv/partyhandler.cpp
index ae33ead6..a013ae29 100644
--- a/src/net/manaserv/partyhandler.cpp
+++ b/src/net/manaserv/partyhandler.cpp
@@ -21,11 +21,6 @@
#include "net/manaserv/partyhandler.h"
-#include "net/manaserv/connection.h"
-#include "net/manaserv/messagein.h"
-#include "net/manaserv/messageout.h"
-#include "net/manaserv/protocol.h"
-
#include "gui/partywindow.h"
#include "gui/widgets/chattab.h"
@@ -33,6 +28,11 @@
#include "log.h"
#include "localplayer.h"
+#include "net/manaserv/connection.h"
+#include "net/manaserv/messagein.h"
+#include "net/manaserv/messageout.h"
+#include "net/manaserv/protocol.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp
index 62110f8f..60274288 100644
--- a/src/net/manaserv/playerhandler.cpp
+++ b/src/net/manaserv/playerhandler.cpp
@@ -21,13 +21,6 @@
#include "net/manaserv/playerhandler.h"
-#include "net/manaserv/connection.h"
-#include "net/manaserv/messagein.h"
-#include "net/manaserv/messageout.h"
-#include "net/manaserv/protocol.h"
-
-#include "net/net.h"
-
#include "effectmanager.h"
#include "engine.h"
#include "localplayer.h"
@@ -42,6 +35,13 @@
#include "gui/sell.h"
#include "gui/viewport.h"
+#include "net/net.h"
+
+#include "net/manaserv/connection.h"
+#include "net/manaserv/messagein.h"
+#include "net/manaserv/messageout.h"
+#include "net/manaserv/protocol.h"
+
// TODO Move somewhere else
OkDialog *weightNotice = NULL;
OkDialog *deathNotice = NULL;
diff --git a/src/net/manaserv/tradehandler.cpp b/src/net/manaserv/tradehandler.cpp
index 08fc354c..5eedbec8 100644
--- a/src/net/manaserv/tradehandler.cpp
+++ b/src/net/manaserv/tradehandler.cpp
@@ -21,13 +21,6 @@
#include "net/manaserv/tradehandler.h"
-#include "net/manaserv/connection.h"
-#include "net/manaserv/messagein.h"
-#include "net/manaserv/messageout.h"
-#include "net/manaserv/protocol.h"
-
-#include "net/net.h"
-
#include "beingmanager.h"
#include "item.h"
#include "localplayer.h"
@@ -37,6 +30,13 @@
#include "gui/widgets/chattab.h"
+#include "net/net.h"
+
+#include "net/manaserv/connection.h"
+#include "net/manaserv/messagein.h"
+#include "net/manaserv/messageout.h"
+#include "net/manaserv/protocol.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/net/messagein.h b/src/net/messagein.h
index 6f68c49b..fe48a455 100644
--- a/src/net/messagein.h
+++ b/src/net/messagein.h
@@ -23,6 +23,7 @@
#define NET_MESSAGEIN_H
#include <SDL_types.h>
+
#include <string>
namespace Net {
diff --git a/src/net/messageout.h b/src/net/messageout.h
index b3fd3a96..d4769335 100644
--- a/src/net/messageout.h
+++ b/src/net/messageout.h
@@ -22,9 +22,10 @@
#ifndef NET_MESSAGEOUT_H
#define NET_MESSAGEOUT_H
-#include <iosfwd>
#include <SDL_types.h>
+#include <iosfwd>
+
namespace Net {
/**
diff --git a/src/net/net.cpp b/src/net/net.cpp
index ade879a3..9c05595d 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -38,6 +38,7 @@
#include "net/tradehandler.h"
#include "net/ea/generalhandler.h"
+
#include "net/manaserv/generalhandler.h"
Net::AdminHandler *adminHandler = NULL;
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index 25b4e9a8..335a2115 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -22,11 +22,11 @@
#ifndef SERVERINFO_H
#define SERVERINFO_H
+#include "utils/stringutils.h"
+
#include <string>
#include <vector>
-#include "utils/stringutils.h"
-
class ServerInfo
{
public:
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 3f5bf8d8..38d0fb8e 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <SDL.h>
-
#include "log.h"
#include "openglgraphics.h"
@@ -32,6 +30,8 @@
#include <OpenGL/OpenGL.h>
#endif
+#include <SDL.h>
+
#ifndef GL_TEXTURE_RECTANGLE_ARB
#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
diff --git a/src/particle.cpp b/src/particle.cpp
index 21bcec99..3507d0a0 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -22,8 +22,6 @@
#include <algorithm>
#include <cmath>
-#include <guichan/color.hpp>
-
#include "animationparticle.h"
#include "configuration.h"
#include "imageparticle.h"
@@ -40,6 +38,11 @@
#include "utils/mathutils.h"
#include "utils/xml.h"
+#include <guichan/color.hpp>
+
+#include <algorithm>
+#include <cmath>
+
#define SIN45 0.707106781f
class Graphics;
diff --git a/src/particle.h b/src/particle.h
index 1b2d24ae..70074e06 100644
--- a/src/particle.h
+++ b/src/particle.h
@@ -22,13 +22,13 @@
#ifndef PARTICLE_H
#define PARTICLE_H
-#include <list>
-#include <string>
-
#include "guichanfwd.h"
#include "sprite.h"
#include "vector.h"
+#include <list>
+#include <string>
+
class Map;
class Particle;
class ParticleEmitter;
diff --git a/src/particlecontainer.cpp b/src/particlecontainer.cpp
index 67f82b0b..a3d3729a 100644
--- a/src/particlecontainer.cpp
+++ b/src/particlecontainer.cpp
@@ -24,7 +24,6 @@
#include "particle.h"
#include "particlecontainer.h"
-
ParticleContainer::ParticleContainer(ParticleContainer *parent,
bool delParent):
mDelParent(delParent),
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp
index 885f25d4..8eb8ccc8 100644
--- a/src/particleemitter.cpp
+++ b/src/particleemitter.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <cmath>
-
#include "animationparticle.h"
#include "imageparticle.h"
#include "log.h"
@@ -32,6 +30,8 @@
#include "resources/imageset.h"
#include "resources/resourcemanager.h"
+#include <cmath>
+
#define SIN45 0.707106781f
#define DEG_RAD_FACTOR 0.017453293f
diff --git a/src/particleemitter.h b/src/particleemitter.h
index 18af2dc2..d2f8ae44 100644
--- a/src/particleemitter.h
+++ b/src/particleemitter.h
@@ -22,14 +22,14 @@
#ifndef PARTICLEEMITTER_H
#define PARTICLEEMITTER_H
-#include <list>
-
-#include "utils/xml.h"
-
#include "particleemitterprop.h"
#include "resources/animation.h"
+#include "utils/xml.h"
+
+#include <list>
+
class Image;
class Map;
class Particle;
diff --git a/src/position.h b/src/position.h
index 9cc86602..7dbb4400 100644
--- a/src/position.h
+++ b/src/position.h
@@ -22,8 +22,8 @@
#ifndef POSITION_H
#define POSITION_H
-#include <list>
#include <iostream>
+#include <list>
/**
* A position along a being's path.
diff --git a/src/resources/action.h b/src/resources/action.h
index 387f1b14..12340628 100644
--- a/src/resources/action.h
+++ b/src/resources/action.h
@@ -22,10 +22,10 @@
#ifndef ACTION_H
#define ACTION_H
-#include <map>
-
#include <libxml/tree.h>
+#include <map>
+
class Animation;
/**
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp
index 92895bc2..34678736 100644
--- a/src/resources/ambientlayer.cpp
+++ b/src/resources/ambientlayer.cpp
@@ -21,9 +21,10 @@
#include "resources/ambientlayer.h"
+#include "graphics.h"
+
#include "resources/image.h"
#include "resources/resourcemanager.h"
-#include "graphics.h"
AmbientLayer::AmbientLayer(Image *img, float parallax,
float speedX, float speedY, bool keepRatio):
diff --git a/src/resources/ambientoverlay.cpp b/src/resources/ambientoverlay.cpp
index 8c851e2e..c68336ab 100644
--- a/src/resources/ambientoverlay.cpp
+++ b/src/resources/ambientoverlay.cpp
@@ -21,9 +21,10 @@
#include "resources/ambientoverlay.h"
+#include "graphics.h"
+
#include "resources/image.h"
#include "resources/resourcemanager.h"
-#include "graphics.h"
AmbientOverlay::AmbientOverlay(Image *img, float parallax,
float speedX, float speedY, bool keepRatio):
diff --git a/src/resources/animation.h b/src/resources/animation.h
index 80e0781a..8de57f01 100644
--- a/src/resources/animation.h
+++ b/src/resources/animation.h
@@ -22,10 +22,10 @@
#ifndef ANIMATION_H
#define ANIMATION_H
-#include <vector>
-
#include <libxml/tree.h>
+#include <vector>
+
class Image;
/**
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 41c3a194..f1ee3280 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -22,11 +22,11 @@
#include "resources/image.h"
#include "resources/dye.h"
+#include "resources/sdlrescalefacility.h"
#include "log.h"
#include <SDL_image.h>
-#include "resources/sdlrescalefacility.h"
#ifdef USE_OPENGL
bool Image::mUseOpenGL = false;
diff --git a/src/resources/imageloader.cpp b/src/resources/imageloader.cpp
index 694c57af..24c99df1 100644
--- a/src/resources/imageloader.cpp
+++ b/src/resources/imageloader.cpp
@@ -25,6 +25,7 @@
#include "resources/resourcemanager.h"
#include <guichan/color.hpp>
+
#include <guichan/sdl/sdlpixel.hpp>
#include <cassert>
diff --git a/src/resources/imageset.cpp b/src/resources/imageset.cpp
index 0c836134..e7183062 100644
--- a/src/resources/imageset.cpp
+++ b/src/resources/imageset.cpp
@@ -21,10 +21,10 @@
#include "resources/imageset.h"
-#include "resources/image.h"
-
#include "log.h"
+#include "resources/image.h"
+
#include "utils/dtor.h"
ImageSet::ImageSet(Image *img, int width, int height)
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 900e3547..ef7954c9 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -21,11 +21,11 @@
#include "resources/itemdb.h"
+#include "log.h"
+
#include "resources/iteminfo.h"
#include "resources/resourcemanager.h"
-#include "log.h"
-
#include "utils/dtor.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 6c033490..2af4069c 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -22,10 +22,10 @@
#ifndef ITEMINFO_H
#define ITEMINFO_H
-#include "resources/spritedef.h"
-
#include "player.h"
+#include "resources/spritedef.h"
+
#include <map>
#include <string>
#include <vector>
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 28bc91c3..b149ca76 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -19,15 +19,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "resources/animation.h"
-#include "resources/image.h"
#include "resources/mapreader.h"
-#include "resources/resourcemanager.h"
#include "log.h"
#include "map.h"
#include "tileset.h"
+#include "resources/animation.h"
+#include "resources/image.h"
+#include "resources/resourcemanager.h"
+
#include "utils/base64.h"
#include "utils/stringutils.h"
#include "utils/xml.h"
diff --git a/src/resources/mapreader.h b/src/resources/mapreader.h
index 0ed553c3..9ee79579 100644
--- a/src/resources/mapreader.h
+++ b/src/resources/mapreader.h
@@ -24,6 +24,8 @@
#include <libxml/tree.h>
+#include <string>
+
class Map;
class Properties;
class Tileset;
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 0c28586a..823001a2 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -21,10 +21,10 @@
#include "resources/monsterdb.h"
-#include "resources/monsterinfo.h"
-
#include "log.h"
+#include "resources/monsterinfo.h"
+
#include "utils/dtor.h"
#include "utils/gettext.h"
#include "utils/xml.h"
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index fe594a3f..eee76d55 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -21,6 +21,8 @@
#include "resources/resourcemanager.h"
+#include "log.h"
+
#include "resources/dye.h"
#include "resources/image.h"
#include "resources/imageset.h"
@@ -28,11 +30,11 @@
#include "resources/soundeffect.h"
#include "resources/spritedef.h"
-#include "log.h"
-
-#include <cassert>
#include <physfs.h>
+
#include <SDL_image.h>
+
+#include <cassert>
#include <sstream>
#include <sys/time.h>
diff --git a/src/resources/sdlrescalefacility.h b/src/resources/sdlrescalefacility.h
index 971f5d73..bffd583d 100644
--- a/src/resources/sdlrescalefacility.h
+++ b/src/resources/sdlrescalefacility.h
@@ -29,9 +29,10 @@
#ifndef SDLRESCALEFACILITY_H
#define SDLRESCALEFACILITY_H
-#include <SDL.h>
#include "image.h"
+#include <SDL.h>
+
/**
* _SDLzoomSurface is internally used by Image::getScaledImage() to provide
* a rescaled copy of its internal mImage member.
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index 62db7b66..2d051f57 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -21,6 +21,8 @@
#include "resources/spritedef.h"
+#include "log.h"
+
#include "resources/action.h"
#include "resources/animation.h"
#include "resources/dye.h"
@@ -28,8 +30,6 @@
#include "resources/imageset.h"
#include "resources/resourcemanager.h"
-#include "log.h"
-
#include "utils/xml.h"
#include <set>
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index 45b5b043..dc555baa 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -24,11 +24,11 @@
#include "resources/resource.h"
+#include <libxml/tree.h>
+
#include <map>
#include <string>
-#include <libxml/tree.h>
-
class Action;
class ImageSet;
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index 2c7395f0..c907352c 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -25,12 +25,12 @@
#include "utils/stringutils.h"
+#include <physfs.h>
+
#include <algorithm>
#include <cstring>
-#include <vector>
-
-#include <physfs.h>
#include <time.h>
+#include <vector>
#define WALLPAPER_FOLDER "graphics/images/"
#define WALLPAPER_BASE "login_wallpaper.png"
diff --git a/src/rotationalparticle.h b/src/rotationalparticle.h
index 464cb7bc..9ef5ac9b 100644
--- a/src/rotationalparticle.h
+++ b/src/rotationalparticle.h
@@ -22,10 +22,10 @@
#ifndef ROTATIONAL_PARTICLE_H
#define ROTATIONAL_PARTICLE_H
-#include <libxml/tree.h>
-
#include "imageparticle.h"
+#include <libxml/tree.h>
+
class Animation;
class Map;
class SimpleAnimation;
diff --git a/src/shopitem.h b/src/shopitem.h
index 33021d8c..c7787491 100644
--- a/src/shopitem.h
+++ b/src/shopitem.h
@@ -22,10 +22,10 @@
#ifndef _SHOPITEM_H
#define _SHOPITEM_H
-#include <stack>
-
#include "item.h"
+#include <stack>
+
/**
* Represents an item in a shop inventory. It can store quantity and inventory
* indices of duplicate entries in the shop as well.
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 7ef1be19..958c15b1 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <map>
-
#include "statuseffect.h"
#include "log.h"
@@ -29,6 +27,7 @@
#include "utils/xml.h"
+#include <map>
#define STATUS_EFFECTS_FILE "status-effects.xml"
diff --git a/src/statuseffect.h b/src/statuseffect.h
index f1af93d2..18592400 100644
--- a/src/statuseffect.h
+++ b/src/statuseffect.h
@@ -22,11 +22,12 @@
#ifndef STATUS_EFFECT_H
#define STATUS_EFFECT_H
-#include "resources/animation.h"
#include "particle.h"
#include "animatedsprite.h"
#include "sound.h"
+#include "resources/animation.h"
+
class StatusEffect
{
public:
diff --git a/src/text.cpp b/src/text.cpp
index 1f03ebd2..c7df8715 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -22,8 +22,6 @@
#include "text.h"
-#include <guichan/font.hpp>
-
#include "configuration.h"
#include "textmanager.h"
#include "textrenderer.h"
@@ -34,6 +32,8 @@
#include "resources/resourcemanager.h"
#include "resources/image.h"
+#include <guichan/font.hpp>
+
int Text::mInstances = 0;
ImageRect Text::mBubble;
Image *Text::mBubbleArrow;
diff --git a/src/text.h b/src/text.h
index 89612050..ac8563ab 100644
--- a/src/text.h
+++ b/src/text.h
@@ -23,11 +23,11 @@
#ifndef TEXT_H
#define TEXT_H
-#include <guichan/color.hpp>
-
#include "graphics.h"
#include "guichanfwd.h"
+#include <guichan/color.hpp>
+
class TextManager;
class Text
diff --git a/src/textmanager.cpp b/src/textmanager.cpp
index 6bc8f8b6..d1207e15 100644
--- a/src/textmanager.cpp
+++ b/src/textmanager.cpp
@@ -21,10 +21,10 @@
#include "textmanager.h"
-#include <cstring>
-
#include "text.h"
+#include <cstring>
+
TextManager *textManager = 0;
TextManager::TextManager()