diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-19 01:18:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-20 00:49:07 +0300 |
commit | 26f9aad24bc50d4e9fd161d185df049c9e7a62cf (patch) | |
tree | d8fd87aef6395b5a4704e9570fcbcddcc8ccca83 /src | |
parent | 50b5afdb7e68cdec8f77020b578dc3f6874933bb (diff) | |
download | ManaVerse-26f9aad24bc50d4e9fd161d185df049c9e7a62cf.tar.gz ManaVerse-26f9aad24bc50d4e9fd161d185df049c9e7a62cf.tar.bz2 ManaVerse-26f9aad24bc50d4e9fd161d185df049c9e7a62cf.tar.xz ManaVerse-26f9aad24bc50d4e9fd161d185df049c9e7a62cf.zip |
improve includes.
Diffstat (limited to 'src')
205 files changed, 376 insertions, 278 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp index 473e6cbc7..b8ea34286 100644 --- a/src/actionmanager.cpp +++ b/src/actionmanager.cpp @@ -31,10 +31,9 @@ #include "being/playerinfo.h" #include "being/playerrelations.h" -#include "events/inputevent.h" - #include "input/inputmanager.h" +#include "gui/gui.h" #include "gui/sdlinput.h" #include "gui/viewport.h" @@ -45,7 +44,6 @@ #include "gui/windows/questswindow.h" #include "gui/windows/quitdialog.h" #include "gui/windows/whoisonline.h" - #include "gui/windows/botcheckerwindow.h" #include "gui/windows/buyselldialog.h" #include "gui/windows/chatwindow.h" diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index a74f4f477..bbb016525 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -21,6 +21,7 @@ #include "being/actorsprite.h" +#include "animatedsprite.h" #include "configuration.h" #include "imagesprite.h" #include "statuseffect.h" @@ -31,6 +32,8 @@ #include "listeners/actorspritelistener.h" +#include "particle/particle.h" + #include "resources/resourcemanager.h" #include "utils/checkutils.h" diff --git a/src/being/being.cpp b/src/being/being.cpp index 1fcccb0cf..76af509d3 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -40,6 +40,7 @@ #include "particle/particleinfo.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/popups/speechbubble.h" diff --git a/src/being/being.h b/src/being/being.h index c8da2d97c..afa023068 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -23,12 +23,10 @@ #ifndef BEING_BEING_H #define BEING_BEING_H -#include "equipment.h" +//#include "equipment.h" #include "resources/beinginfo.h" -#include "gui/base/color.hpp" - #include <map> #include "localconsts.h" @@ -45,6 +43,7 @@ static const int DEFAULT_BEING_HEIGHT = 32; class AnimatedSprite; class BeingCacheEntry; +class Equipment; class FlashText; class Guild; class ItemInfo; @@ -55,6 +54,11 @@ class Text; struct ParticleInfo; +namespace gcn +{ + class Color; +} + extern volatile int cur_time; enum Gender diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 0e57eabfe..2a3c5fa2f 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -23,6 +23,7 @@ #include "being/localplayer.h" #include "actormanager.h" +#include "animatedsprite.h" #include "client.h" #include "configuration.h" #include "dropshortcut.h" @@ -42,7 +43,6 @@ #include "input/keyboardconfig.h" -#include "gui/font.h" #include "gui/gui.h" #include "gui/viewport.h" @@ -51,7 +51,6 @@ #include "gui/windows/okdialog.h" #include "gui/windows/outfitwindow.h" #include "gui/windows/shopwindow.h" -#include "gui/windows/skilldialog.h" #include "gui/windows/socialwindow.h" #include "gui/windows/updaterwindow.h" @@ -85,6 +84,8 @@ typedef std::map<int, Guild*>::const_iterator GuildMapCIter; LocalPlayer *player_node = nullptr; +class SkillDialog; + extern std::list<BeingCacheEntry*> beingInfoCache; extern OkDialog *weightNotice; extern int weightNoticeTime; diff --git a/src/being/playerrelations.cpp b/src/being/playerrelations.cpp index a04c77e76..4404791ca 100644 --- a/src/being/playerrelations.cpp +++ b/src/being/playerrelations.cpp @@ -30,6 +30,8 @@ #include "utils/dtor.h" #include "utils/gettext.h" +#include "listeners/playerrelationslistener.h" + #include <algorithm> #include "debug.h" diff --git a/src/being/playerrelations.h b/src/being/playerrelations.h index cddec5f10..3543d4221 100644 --- a/src/being/playerrelations.h +++ b/src/being/playerrelations.h @@ -25,14 +25,13 @@ #include "utils/stringvector.h" -#include "listeners/playerrelationslistener.h" - #include <list> #include <map> #include "localconsts.h" class Being; +class PlayerRelationsListener; struct PlayerRelation final { diff --git a/src/client.cpp b/src/client.cpp index 0fac5b3f2..a08406d10 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -85,6 +85,8 @@ #include "net/netconsts.h" #include "net/partyhandler.h" +#include "particle/particle.h" + #include "resources/imagehelper.h" #include "resources/openglimagehelper.h" #include "resources/surfaceimagehelper.h" @@ -112,7 +114,6 @@ #include "utils/files.h" #include "utils/fuzzer.h" #include "utils/gettext.h" -#include "utils/files.h" #include "utils/mkdir.h" #include "utils/paths.h" #include "utils/physfstools.h" diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 6d3881432..ef8acc26c 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -22,6 +22,8 @@ #include "commandhandler.h" +#include "commands.h" + #include "input/inputmanager.h" #include "gui/widgets/tabs/chattab.h" diff --git a/src/commandhandler.h b/src/commandhandler.h index de1561d74..b2b74d77d 100644 --- a/src/commandhandler.h +++ b/src/commandhandler.h @@ -23,15 +23,16 @@ #ifndef COMMANDHANDLER_H #define COMMANDHANDLER_H -#include "commands.h" - #include <list> +#include <map> #include <string> #include "localconsts.h" class ChatTab; +struct CommandInfo; + extern ChatTab *localChatTab; typedef std::map<std::string, const CommandInfo*> CommandsMap; diff --git a/src/configuration.cpp b/src/configuration.cpp index 7d6fc43fd..ed2adfc61 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -23,6 +23,7 @@ #include "configuration.h" #include "logger.h" +#include "variabledata.h" #include "listeners/configlistener.h" diff --git a/src/defaults.cpp b/src/defaults.cpp index c343f9f11..7a110a539 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -22,6 +22,7 @@ #include "defaults.h" #include "graphicsmanager.h" +#include "variabledata.h" #include "being/being.h" diff --git a/src/defaults.h b/src/defaults.h index e4ba4d5ae..abc9eb50c 100644 --- a/src/defaults.h +++ b/src/defaults.h @@ -22,13 +22,13 @@ #ifndef DEFAULTS_H #define DEFAULTS_H -#include "variabledata.h" - #include <map> #include <string> #include "localconsts.h" +class VariableData; + typedef std::map<std::string, VariableData*> DefaultsData; VariableData* createData(const int defData) A_WARN_UNUSED; diff --git a/src/events/actionevent.h b/src/events/actionevent.h index 70ed0f398..3164955e6 100644 --- a/src/events/actionevent.h +++ b/src/events/actionevent.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EVENTS_ACTIONEVENT_HPP -#define EVENTS_ACTIONEVENT_HPP +#ifndef EVENTS_ACTIONEVENT_H +#define EVENTS_ACTIONEVENT_H #include "events/event.h" @@ -136,4 +136,4 @@ class ActionEvent final : public Event std::string mId; }; -#endif // EVENTS_ACTIONEVENT_HPP +#endif // EVENTS_ACTIONEVENT_H diff --git a/src/events/event.h b/src/events/event.h index d62dd672b..b71d0edd4 100644 --- a/src/events/event.h +++ b/src/events/event.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EVENTS_EVENT_HPP -#define EVENTS_EVENT_HPP +#ifndef EVENTS_EVENT_H +#define EVENTS_EVENT_H #include "localconsts.h" @@ -114,4 +114,4 @@ class Event gcn::Widget* mSource; }; -#endif // EVENTS_EVENT_HPP +#endif // EVENTS_EVENT_H diff --git a/src/events/inputguievent.h b/src/events/inputguievent.h index a2aefc35f..8523959ed 100644 --- a/src/events/inputguievent.h +++ b/src/events/inputguievent.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EVENTS_INPUTEVENT_HPP -#define EVENTS_INPUTEVENT_HPP +#ifndef EVENTS_INPUTGUIEVENT_H +#define EVENTS_INPUTGUIEVENT_H #include "events/event.h" @@ -184,4 +184,4 @@ class InputGuiEvent: public Event bool mIsConsumed; }; -#endif // EVENTS_INPUTEVENT_HPP +#endif // EVENTS_INPUTGUIEVENT_H diff --git a/src/events/keyevent.h b/src/events/keyevent.h index 728cd79ea..c0c950639 100644 --- a/src/events/keyevent.h +++ b/src/events/keyevent.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EVENTS_KEYEVENT_HPP -#define EVENTS_KEYEVENT_HPP +#ifndef EVENTS_KEYEVENT_H +#define EVENTS_KEYEVENT_H #include "events/inputguievent.h" #include "input/key.h" @@ -191,4 +191,4 @@ class KeyEvent: public InputGuiEvent bool mIsNumericPad; }; -#endif // EVENTS_KEYEVENT_HPP +#endif // EVENTS_KEYEVENT_H diff --git a/src/events/mouseevent.h b/src/events/mouseevent.h index 9284822ba..9378faac6 100644 --- a/src/events/mouseevent.h +++ b/src/events/mouseevent.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EVENTS_MOUSEEVENT_HPP -#define EVENTS_MOUSEEVENT_HPP +#ifndef EVENTS_MOUSEEVENT_H +#define EVENTS_MOUSEEVENT_H #include "events/inputguievent.h" @@ -237,4 +237,4 @@ class MouseEvent: public InputGuiEvent friend class gcn::Gui; }; -#endif // EVENTS_MOUSEEVENT_HPP +#endif // EVENTS_MOUSEEVENT_H diff --git a/src/events/selectionevent.h b/src/events/selectionevent.h index fc030cab0..b2e91e04f 100644 --- a/src/events/selectionevent.h +++ b/src/events/selectionevent.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EVENTS_SELECTIONEVENT_HPP -#define EVENTS_SELECTIONEVENT_HPP +#ifndef EVENTS_SELECTIONEVENT_H +#define EVENTS_SELECTIONEVENT_H #include "events/event.h" @@ -98,4 +98,4 @@ class SelectionEvent final: public Event { } }; -#endif // EVENTS_SELECTIONEVENT_HPP +#endif // EVENTS_SELECTIONEVENT_H diff --git a/src/graphicsvertexes.h b/src/graphicsvertexes.h index 15256113f..8746bcce3 100644 --- a/src/graphicsvertexes.h +++ b/src/graphicsvertexes.h @@ -38,10 +38,12 @@ #endif -#include "resources/image.h" +#include <SDL_video.h> #include <vector> +class Image; + struct DoubleRect final { SDL_Rect src; diff --git a/src/gui/base/basiccontainer.cpp b/src/gui/base/basiccontainer.cpp index 05d89f172..edc465726 100644 --- a/src/gui/base/basiccontainer.cpp +++ b/src/gui/base/basiccontainer.cpp @@ -71,8 +71,6 @@ #include "gui/focushandler.h" -#include "input/mouseinput.h" - #include "render/graphics.h" #include "debug.h" diff --git a/src/gui/base/basiccontainer.hpp b/src/gui/base/basiccontainer.hpp index cc3aee808..fd28ef7b6 100644 --- a/src/gui/base/basiccontainer.hpp +++ b/src/gui/base/basiccontainer.hpp @@ -64,7 +64,6 @@ #ifndef GCN_BASICCONTAINER_HPP #define GCN_BASICCONTAINER_HPP -#include <list> #include <vector> #include "gui/base/widget.hpp" @@ -85,7 +84,7 @@ namespace gcn public DeathListener { public: - BasicContainer(const Widget2 *const widget) : + explicit BasicContainer(const Widget2 *const widget) : Widget(widget), DeathListener(), mWidgets() diff --git a/src/gui/base/gui.cpp b/src/gui/base/gui.cpp index f62e24260..d5b23e960 100644 --- a/src/gui/base/gui.cpp +++ b/src/gui/base/gui.cpp @@ -67,20 +67,15 @@ #include "gui/base/gui.hpp" -#include "gui/base/basiccontainer.hpp" #include "gui/base/widget.hpp" #include "gui/focushandler.h" -#include "gui/sdlinput.h" -#include "input/keyinput.h" #include "input/mouseinput.h" #include "listeners/keylistener.h" #include "listeners/mouselistener.h" -#include "render/graphics.h" - #include "debug.h" namespace gcn diff --git a/src/gui/base/gui.hpp b/src/gui/base/gui.hpp index f614c00fd..391a0520e 100644 --- a/src/gui/base/gui.hpp +++ b/src/gui/base/gui.hpp @@ -68,7 +68,6 @@ #include <deque> #include "events/keyevent.h" -#include "events/mouseevent.h" #include "input/mouseinput.h" diff --git a/src/gui/base/rectangle.hpp b/src/gui/base/rectangle.hpp index b8503db98..299ce99b9 100644 --- a/src/gui/base/rectangle.hpp +++ b/src/gui/base/rectangle.hpp @@ -95,6 +95,9 @@ namespace gcn */ Rectangle(const int x, const int y, const int width, const int height); + virtual ~Rectangle() + { } + /** * Sets the dimension of a rectangle. * diff --git a/src/gui/base/widget.cpp b/src/gui/base/widget.cpp index f5994d1af..692ea479c 100644 --- a/src/gui/base/widget.cpp +++ b/src/gui/base/widget.cpp @@ -71,17 +71,10 @@ #include "events/event.h" -#include "gui/base/basiccontainer.hpp" - #include "gui/focushandler.h" -#include "input/keyinput.h" -#include "input/mouseinput.h" - #include "listeners/actionlistener.h" #include "listeners/deathlistener.h" -#include "listeners/keylistener.h" -#include "listeners/mouselistener.h" #include "listeners/widgetlistener.h" #include "render/graphics.h" diff --git a/src/gui/base/widget.hpp b/src/gui/base/widget.hpp index 013ead3b8..6245d3c98 100644 --- a/src/gui/base/widget.hpp +++ b/src/gui/base/widget.hpp @@ -89,8 +89,6 @@ class WidgetListener; namespace gcn { - class BasicContainer; - /** * Abstract class for widgets of Guichan. It contains basic functions * every widget should have. @@ -110,7 +108,7 @@ namespace gcn * focusable as default, therefore, widgets that are supposed to be * focusable should overide this default in their own constructor. */ - Widget(const Widget2 *const widget); + explicit Widget(const Widget2 *const widget); A_DELETE_COPY(Widget) diff --git a/src/gui/base/widgets/button.cpp b/src/gui/base/widgets/button.cpp index e4285cffd..5187c625b 100644 --- a/src/gui/base/widgets/button.cpp +++ b/src/gui/base/widgets/button.cpp @@ -67,11 +67,6 @@ #include "gui/base/widgets/button.hpp" -#include "gui/font.h" - -#include "input/key.h" -#include "input/mouseinput.h" - #include "events/mouseevent.h" #include "render/graphics.h" diff --git a/src/gui/base/widgets/button.hpp b/src/gui/base/widgets/button.hpp index 7fd5613bd..fea175362 100644 --- a/src/gui/base/widgets/button.hpp +++ b/src/gui/base/widgets/button.hpp @@ -70,8 +70,6 @@ #include "listeners/keylistener.h" #include "listeners/mouselistener.h" -#include "events/mouseevent.h" - #include "gui/base/widget.hpp" #include "render/graphics.h" diff --git a/src/gui/base/widgets/checkbox.cpp b/src/gui/base/widgets/checkbox.cpp index d75fb5cb0..a5ec72dfa 100644 --- a/src/gui/base/widgets/checkbox.cpp +++ b/src/gui/base/widgets/checkbox.cpp @@ -67,13 +67,6 @@ #include "gui/base/widgets/checkbox.hpp" -#include "gui/font.h" - -#include "input/key.h" -#include "input/mouseinput.h" - -#include "render/graphics.h" - #include "debug.h" namespace gcn diff --git a/src/gui/base/widgets/checkbox.hpp b/src/gui/base/widgets/checkbox.hpp index d87a6b206..c79ccaff9 100644 --- a/src/gui/base/widgets/checkbox.hpp +++ b/src/gui/base/widgets/checkbox.hpp @@ -90,7 +90,7 @@ namespace gcn /** * Contructor. */ - CheckBox(const Widget2 *const widget); + explicit CheckBox(const Widget2 *const widget); /** * Constructor. The check box will be automatically resized diff --git a/src/gui/base/widgets/container.hpp b/src/gui/base/widgets/container.hpp index ba3cff153..3e6c0a587 100644 --- a/src/gui/base/widgets/container.hpp +++ b/src/gui/base/widgets/container.hpp @@ -64,12 +64,8 @@ #ifndef GCN_CONTAINER_HPP #define GCN_CONTAINER_HPP -#include <list> - #include "gui/base/basiccontainer.hpp" -#include "render/graphics.h" - namespace gcn { /** @@ -89,7 +85,7 @@ namespace gcn * * @see setOpaque, isOpaque */ - Container(const Widget2 *const widget); + explicit Container(const Widget2 *const widget); /** * Destructor. diff --git a/src/gui/base/widgets/listbox.cpp b/src/gui/base/widgets/listbox.cpp index 0dd5c88f7..02d94626c 100644 --- a/src/gui/base/widgets/listbox.cpp +++ b/src/gui/base/widgets/listbox.cpp @@ -69,16 +69,8 @@ #include "gui/font.h" -#include "gui/base/basiccontainer.hpp" -#include "gui/base/listmodel.hpp" - -#include "input/key.h" -#include "input/mouseinput.h" - #include "listeners/selectionlistener.h" -#include "render/graphics.h" - #include "debug.h" namespace gcn diff --git a/src/gui/base/widgets/radiobutton.cpp b/src/gui/base/widgets/radiobutton.cpp index 832c00bbe..e17b9f776 100644 --- a/src/gui/base/widgets/radiobutton.cpp +++ b/src/gui/base/widgets/radiobutton.cpp @@ -67,13 +67,6 @@ #include "gui/base/widgets/radiobutton.hpp" -#include "gui/font.h" - -#include "input/key.h" -#include "input/mouseinput.h" - -#include "render/graphics.h" - #include "debug.h" namespace gcn diff --git a/src/gui/base/widgets/radiobutton.hpp b/src/gui/base/widgets/radiobutton.hpp index 4d4403fac..f4bfd53fa 100644 --- a/src/gui/base/widgets/radiobutton.hpp +++ b/src/gui/base/widgets/radiobutton.hpp @@ -93,7 +93,7 @@ namespace gcn /** * Constructor. */ - RadioButton(const Widget2 *const widget); + explicit RadioButton(const Widget2 *const widget); /** * Constructor. The radio button will be automatically resized diff --git a/src/gui/base/widgets/scrollarea.cpp b/src/gui/base/widgets/scrollarea.cpp index 68e1b72d3..0fc605fa3 100644 --- a/src/gui/base/widgets/scrollarea.cpp +++ b/src/gui/base/widgets/scrollarea.cpp @@ -67,9 +67,6 @@ #include "gui/base/widgets/scrollarea.hpp" - -#include "render/graphics.h" - #include "debug.h" namespace gcn diff --git a/src/gui/base/widgets/scrollarea.hpp b/src/gui/base/widgets/scrollarea.hpp index e2d8aada5..669ccfbdd 100644 --- a/src/gui/base/widgets/scrollarea.hpp +++ b/src/gui/base/widgets/scrollarea.hpp @@ -64,8 +64,6 @@ #ifndef GCN_SCROLLAREA_HPP #define GCN_SCROLLAREA_HPP -#include <string> - #include "gui/base/basiccontainer.hpp" #include "listeners/mouselistener.h" diff --git a/src/gui/base/widgets/slider.cpp b/src/gui/base/widgets/slider.cpp index e995ff55a..4e9df0341 100644 --- a/src/gui/base/widgets/slider.cpp +++ b/src/gui/base/widgets/slider.cpp @@ -67,11 +67,6 @@ #include "gui/base/widgets/slider.hpp" -#include "input/key.h" -#include "input/mouseinput.h" - -#include "render/graphics.h" - #include "debug.h" namespace gcn diff --git a/src/gui/base/widgets/textbox.cpp b/src/gui/base/widgets/textbox.cpp index 7a5b63a50..bb22a6f46 100644 --- a/src/gui/base/widgets/textbox.cpp +++ b/src/gui/base/widgets/textbox.cpp @@ -69,11 +69,6 @@ #include "gui/font.h" -#include "gui/base/basiccontainer.hpp" - -#include "input/key.h" -#include "input/mouseinput.h" - #include "render/graphics.h" #include "debug.h" diff --git a/src/gui/base/widgets/textbox.hpp b/src/gui/base/widgets/textbox.hpp index 0c96096ec..151af8c00 100644 --- a/src/gui/base/widgets/textbox.hpp +++ b/src/gui/base/widgets/textbox.hpp @@ -64,7 +64,6 @@ #ifndef GCN_TEXTBOX_HPP #define GCN_TEXTBOX_HPP -#include <ctime> #include <string> #include <vector> diff --git a/src/gui/base/widgets/textfield.cpp b/src/gui/base/widgets/textfield.cpp index 6ca37c4af..ddcbec1b4 100644 --- a/src/gui/base/widgets/textfield.cpp +++ b/src/gui/base/widgets/textfield.cpp @@ -69,11 +69,6 @@ #include "gui/font.h" -#include "input/key.h" -#include "input/mouseinput.h" - -#include "render/graphics.h" - #include "debug.h" namespace gcn diff --git a/src/gui/base/widgets/window.cpp b/src/gui/base/widgets/window.cpp index 0ead95bc1..401e3ab6d 100644 --- a/src/gui/base/widgets/window.cpp +++ b/src/gui/base/widgets/window.cpp @@ -67,10 +67,6 @@ #include "gui/base/widgets/window.hpp" -#include "gui/font.h" - -#include "input/mouseinput.h" - #include "render/graphics.h" #include "debug.h" diff --git a/src/gui/focushandler.cpp b/src/gui/focushandler.cpp index 22153c91f..0d45b6432 100644 --- a/src/gui/focushandler.cpp +++ b/src/gui/focushandler.cpp @@ -69,6 +69,8 @@ #include "gui/widgets/window.h" +#include "listeners/focuslistener.h" + #include "debug.h" FocusHandler::FocusHandler() : diff --git a/src/gui/font.cpp b/src/gui/font.cpp index a154d8c54..fcc8e8344 100644 --- a/src/gui/font.cpp +++ b/src/gui/font.cpp @@ -77,7 +77,6 @@ #include "resources/surfaceimagehelper.h" #include "utils/paths.h" -#include "utils/physfsrwops.h" #include "utils/sdlcheckutils.h" #include "utils/stringutils.h" #include "utils/timer.h" diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 243b3817e..fdaa299af 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -40,6 +40,8 @@ #include "events/keyevent.h" +#include "listeners/focuslistener.h" + #include "input/keydata.h" #include "input/keyinput.h" #include "input/mouseinput.h" diff --git a/src/gui/gui.h b/src/gui/gui.h index aacd33946..f6b4fbbf6 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -26,10 +26,9 @@ #include "gui/base/color.hpp" #include "gui/base/gui.hpp" -#include "listeners/focuslistener.h" - #include "localconsts.h" +class FocusListener; class Graphics; class GuiConfigListener; class ImageSet; diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp index 32aa11454..07d4b064a 100644 --- a/src/gui/popups/beingpopup.cpp +++ b/src/gui/popups/beingpopup.cpp @@ -25,6 +25,7 @@ #include "being/playerrelations.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/widgets/label.h" diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index d6ea5a48a..0a65ce3bc 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -28,6 +28,7 @@ #include "units.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/widgets/icon.h" #include "gui/widgets/label.h" diff --git a/src/gui/popups/itempopup.h b/src/gui/popups/itempopup.h index 714e0305c..f1cedf046 100644 --- a/src/gui/popups/itempopup.h +++ b/src/gui/popups/itempopup.h @@ -29,6 +29,7 @@ #include "resources/iteminfo.h" class Icon; +class Item; class Label; class TextBox; diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 450bd504f..a37994884 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -23,6 +23,7 @@ #include "gui/popups/popupmenu.h" #include "actormanager.h" +#include "commands.h" #include "commandhandler.h" #include "configuration.h" #include "dropshortcut.h" @@ -56,6 +57,7 @@ #include "gui/viewport.h" +#include "gui/widgets/button.h" #include "gui/widgets/browserbox.h" #include "gui/widgets/tabs/chattab.h" #include "gui/widgets/progressbar.h" diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h index 1ebb0dd89..70f8b7885 100644 --- a/src/gui/popups/popupmenu.h +++ b/src/gui/popups/popupmenu.h @@ -29,6 +29,7 @@ #include "being/actorsprite.h" #include "listeners/actionlistener.h" + #include "gui/base/listmodel.hpp" #include "localconsts.h" diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp index c74f3f5e6..9bb6157bc 100644 --- a/src/gui/popups/speechbubble.cpp +++ b/src/gui/popups/speechbubble.cpp @@ -24,11 +24,11 @@ #include "gui/popups/speechbubble.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/viewport.h" #include "gui/widgets/browserbox.h" #include "gui/widgets/label.h" -#include "gui/widgets/textbox.h" #include "debug.h" diff --git a/src/gui/popups/spellpopup.cpp b/src/gui/popups/spellpopup.cpp index 141879da4..8849a53cb 100644 --- a/src/gui/popups/spellpopup.cpp +++ b/src/gui/popups/spellpopup.cpp @@ -24,6 +24,7 @@ #include "gui/popups/spellpopup.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/widgets/label.h" diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index 8a9128920..29cb5ce1f 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -75,11 +75,10 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef GUI_INPUT_H -#define GUI_INPUT_H +#ifndef GUI_SDLINPUT_H +#define GUI_SDLINPUT_H #include "input/keyinput.h" -#include "input/mouseinput.h" #include <SDL_events.h> @@ -163,4 +162,4 @@ protected: bool mMouseInWindow; }; -#endif // GUI_INPUT_H +#endif // GUI_SDLINPUT_H diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index 23f221e63..1f09dd0b1 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -24,8 +24,6 @@ #ifndef GUI_WIDGETS_BROWSERBOX_H #define GUI_WIDGETS_BROWSERBOX_H -#include "gui/widgets/widget2.h" - #include "listeners/mouselistener.h" #include "gui/base/widget.hpp" diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index a9b621d90..d7871503e 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -29,9 +29,11 @@ #include "input/keydata.h" +#include "resources/image.h" #include "resources/imageset.h" #include "gui/font.h" +#include "gui/gui.h" #include "debug.h" diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index 73c0d70eb..4f2e9fd89 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_BUTTON_H #define GUI_WIDGETS_BUTTON_H -#include "gui/widgets/widget2.h" - #include "gui/base/widgets/button.hpp" #include "listeners/widgetlistener.h" diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp index bdd740874..7bfc938de 100644 --- a/src/gui/widgets/characterdisplay.cpp +++ b/src/gui/widgets/characterdisplay.cpp @@ -24,6 +24,8 @@ #include "units.h" +#include "gui/gui.h" + #include "gui/windows/charselectdialog.h" #include "gui/popups/textpopup.h" @@ -32,8 +34,7 @@ #include "gui/widgets/layouthelper.h" #include "utils/gettext.h" - -#include <SDL_mouse.h> +#include "utils/stringutils.h" #include "debug.h" diff --git a/src/gui/widgets/characterdisplay.h b/src/gui/widgets/characterdisplay.h index 8571363c3..8f9acf462 100644 --- a/src/gui/widgets/characterdisplay.h +++ b/src/gui/widgets/characterdisplay.h @@ -26,9 +26,6 @@ #include "gui/widgets/container.h" #include "gui/widgets/playerbox.h" -#include "net/charserverhandler.h" -#include "net/net.h" - #include "listeners/widgetlistener.h" #include "localconsts.h" @@ -37,6 +34,11 @@ class CharSelectDialog; class Label; class TextPopup; +namespace Net +{ + struct Character; +} + class CharacterDisplay final : public Container, public MouseListener, public WidgetListener diff --git a/src/gui/widgets/characterviewnormal.cpp b/src/gui/widgets/characterviewnormal.cpp index 75481268b..1df98d85e 100644 --- a/src/gui/widgets/characterviewnormal.cpp +++ b/src/gui/widgets/characterviewnormal.cpp @@ -23,7 +23,6 @@ #include "configuration.h" #include "gui/widgets/characterdisplay.h" -#include "gui/widgets/characterviewsmall.h" #include "debug.h" diff --git a/src/gui/widgets/characterviewsmall.cpp b/src/gui/widgets/characterviewsmall.cpp index eda1e4a71..4d2c93b48 100644 --- a/src/gui/widgets/characterviewsmall.cpp +++ b/src/gui/widgets/characterviewsmall.cpp @@ -24,6 +24,8 @@ #include "gui/widgets/characterdisplay.h" #include "gui/widgets/label.h" +#include "utils/stringutils.h" + #include "debug.h" CharacterViewSmall::CharacterViewSmall(CharSelectDialog *const widget, diff --git a/src/gui/widgets/characterviewsmall.h b/src/gui/widgets/characterviewsmall.h index 17a549718..a9f6d7f9b 100644 --- a/src/gui/widgets/characterviewsmall.h +++ b/src/gui/widgets/characterviewsmall.h @@ -25,6 +25,8 @@ #include "localconsts.h" +class Label; + class CharacterViewSmall final : public CharacterViewBase { public: diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index e500815c0..63e32a0f9 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -31,6 +31,7 @@ #include "resources/image.h" #include "gui/font.h" +#include "gui/gui.h" #include "debug.h" diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h index e05ab29d3..28eadb75c 100644 --- a/src/gui/widgets/checkbox.h +++ b/src/gui/widgets/checkbox.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_CHECKBOX_H #define GUI_WIDGETS_CHECKBOX_H -#include "gui/widgets/widget2.h" - #include "gui/base/widgets/checkbox.hpp" #include "localconsts.h" diff --git a/src/gui/widgets/container.cpp b/src/gui/widgets/container.cpp index 3c048d630..2d8aad965 100644 --- a/src/gui/widgets/container.cpp +++ b/src/gui/widgets/container.cpp @@ -22,6 +22,8 @@ #include "gui/widgets/container.h" +#include "gui/gui.h" + #include "debug.h" Container::Container(const Widget2 *const widget) : diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h index efddb1566..36d7cce86 100644 --- a/src/gui/widgets/container.h +++ b/src/gui/widgets/container.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_CONTAINER_H #define GUI_WIDGETS_CONTAINER_H -#include "gui/widgets/widget2.h" - #include "gui/base/widgets/container.hpp" /** diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 86170036c..6189af75e 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -34,6 +34,7 @@ #include "resources/image.h" #include "gui/font.h" +#include "gui/gui.h" #include <algorithm> diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index b638a2a05..a1908a3c6 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -26,7 +26,7 @@ #include "gui/widgets/widget2.h" #include "gui/base/basiccontainer.hpp" -#include "gui/base/listmodel.hpp" +//#include "gui/base/listmodel.hpp" #include "listeners/actionlistener.h" #include "listeners/focuslistener.h" @@ -43,6 +43,11 @@ class PopupList; class ScrollArea; class Skin; +namespace gcn +{ + class ListModel; +} + /** * A drop down box from which you can select different values. * diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h index dbaac1d9c..236415b32 100644 --- a/src/gui/widgets/dropshortcutcontainer.h +++ b/src/gui/widgets/dropshortcutcontainer.h @@ -38,7 +38,7 @@ class DropShortcutContainer final : public ShortcutContainer /** * Constructor. Initializes the graphic. */ - DropShortcutContainer(Widget2 *const widget); + explicit DropShortcutContainer(Widget2 *const widget); A_DELETE_COPY(DropShortcutContainer) diff --git a/src/gui/widgets/emotepage.h b/src/gui/widgets/emotepage.h index 8eb1e5f7b..8a508bd26 100644 --- a/src/gui/widgets/emotepage.h +++ b/src/gui/widgets/emotepage.h @@ -21,8 +21,6 @@ #ifndef GUI_WIDGETS_EMOTEPAGE_H #define GUI_WIDGETS_EMOTEPAGE_H -#include "gui/widgets/widget2.h" - #include "listeners/mouselistener.h" #include "listeners/widgetlistener.h" diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index 47c45c2dd..296f21126 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -34,6 +34,8 @@ #include "resources/image.h" +#include "resources/db/emotedb.h" + #include "debug.h" static const int MAX_ITEMS = 48; diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h index ec0e98675..a3061441f 100644 --- a/src/gui/widgets/emoteshortcutcontainer.h +++ b/src/gui/widgets/emoteshortcutcontainer.h @@ -24,12 +24,12 @@ #include "gui/widgets/shortcutcontainer.h" -#include "resources/db/emotedb.h" - #include <vector> class TextPopup; +struct EmoteSprite; + /** * An emote shortcut container. Used to quickly use emoticons. * @@ -41,7 +41,7 @@ class EmoteShortcutContainer final : public ShortcutContainer /** * Constructor. Initializes the graphic. */ - EmoteShortcutContainer(Widget2 *const widget); + explicit EmoteShortcutContainer(Widget2 *const widget); A_DELETE_COPY(EmoteShortcutContainer) diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index 84bc19e0e..324d4b23e 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -24,6 +24,8 @@ #include "client.h" +#include "gui/gui.h" + #include "events/keyevent.h" #include "input/keydata.h" @@ -32,8 +34,6 @@ #include "listeners/actionlistener.h" -#include "input/key.h" - #include "render/graphics.h" #include "debug.h" diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp index 73607c048..73c0db76c 100644 --- a/src/gui/widgets/icon.cpp +++ b/src/gui/widgets/icon.cpp @@ -22,6 +22,8 @@ #include "gui/widgets/icon.h" +#include "gui/gui.h" + #include "resources/image.h" #include "resources/resourcemanager.h" diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h index 9dc4827ac..dffdb8e8c 100644 --- a/src/gui/widgets/icon.h +++ b/src/gui/widgets/icon.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_ICON_H #define GUI_WIDGETS_ICON_H -#include "gui/widgets/widget2.h" - #include "gui/base/widget.hpp" #include "localconsts.h" diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 76dd51ef7..ab813b08f 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_ITEMCONTAINER_H #define GUI_WIDGETS_ITEMCONTAINER_H -#include "gui/widgets/widget2.h" - #include "listeners/keylistener.h" #include "listeners/mouselistener.h" #include "listeners/widgetlistener.h" diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp index 73e3bca64..0c19d03c3 100644 --- a/src/gui/widgets/label.cpp +++ b/src/gui/widgets/label.cpp @@ -22,6 +22,7 @@ #include "gui/widgets/label.h" #include "gui/font.h" +#include "gui/gui.h" #include "debug.h" diff --git a/src/gui/widgets/layout.cpp b/src/gui/widgets/layout.cpp index d9a818e0f..f16f40322 100644 --- a/src/gui/widgets/layout.cpp +++ b/src/gui/widgets/layout.cpp @@ -24,6 +24,8 @@ #include "logger.h" +#include "gui/base/widgets/container.hpp" + #include <cassert> #include "debug.h" diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h index 013963bfa..85998d8e7 100644 --- a/src/gui/widgets/layout.h +++ b/src/gui/widgets/layout.h @@ -25,12 +25,16 @@ #include "localconsts.h" -#include "gui/base/widgets/container.hpp" - #include <vector> class LayoutCell; +namespace gcn +{ + class Container; + class Widget; +} + /** * This class is a helper for adding widgets to nested tables in a window. */ diff --git a/src/gui/widgets/layouthelper.cpp b/src/gui/widgets/layouthelper.cpp index 066cabaf8..7b8a428a9 100644 --- a/src/gui/widgets/layouthelper.cpp +++ b/src/gui/widgets/layouthelper.cpp @@ -22,6 +22,8 @@ #include "gui/widgets/layouthelper.h" +#include "gui/base/widgets/container.hpp" + #include "debug.h" LayoutHelper::LayoutHelper(gcn::Container *const container) : diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h index cd20ea50a..f1ebee317 100644 --- a/src/gui/widgets/listbox.h +++ b/src/gui/widgets/listbox.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_LISTBOX_H #define GUI_WIDGETS_LISTBOX_H -#include "gui/widgets/widget2.h" - #include "gui/base/widgets/listbox.hpp" #include "localconsts.h" diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp index 976a1c8f9..7ef543511 100644 --- a/src/gui/widgets/playerbox.cpp +++ b/src/gui/widgets/playerbox.cpp @@ -26,6 +26,8 @@ #include "being/being.h" +#include "gui/gui.h" + #include "resources/image.h" #include "debug.h" diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h index 1d4d83687..a2c55e077 100644 --- a/src/gui/widgets/progressbar.h +++ b/src/gui/widgets/progressbar.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_PROGRESSBAR_H #define GUI_WIDGETS_PROGRESSBAR_H -#include "gui/widgets/widget2.h" - #include "gui/base/widget.hpp" #include "listeners/widgetlistener.h" diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp index 8d4cdd67c..f5b295ec8 100644 --- a/src/gui/widgets/progressindicator.cpp +++ b/src/gui/widgets/progressindicator.cpp @@ -23,6 +23,8 @@ #include "simpleanimation.h" +#include "gui/gui.h" + #include "resources/animation.h" #include "resources/imageset.h" diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h index 08526c7c2..e62e7ec90 100644 --- a/src/gui/widgets/progressindicator.h +++ b/src/gui/widgets/progressindicator.h @@ -22,8 +22,6 @@ #ifndef GUI_WIDGETS_PROGRESSINDICATOR_H #define GUI_WIDGETS_PROGRESSINDICATOR_H -#include "gui/widgets/widget2.h" - #include "gui/base/widget.hpp" #include "localconsts.h" @@ -37,7 +35,7 @@ class SimpleAnimation; class ProgressIndicator final : public gcn::Widget { public: - ProgressIndicator(Widget2 *const widget); + explicit ProgressIndicator(Widget2 *const widget); A_DELETE_COPY(ProgressIndicator) diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index d52295b57..7b5c5fa11 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -31,6 +31,7 @@ #include "resources/image.h" #include "gui/font.h" +#include "gui/gui.h" #include "debug.h" diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h index faff6bc0e..2deb9a772 100644 --- a/src/gui/widgets/radiobutton.h +++ b/src/gui/widgets/radiobutton.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_RADIOBUTTON_H #define GUI_WIDGETS_RADIOBUTTON_H -#include "gui/widgets/widget2.h" - #include "gui/base/widgets/radiobutton.hpp" #include "localconsts.h" diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 6dd2be526..0cadee888 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -25,6 +25,10 @@ #include "client.h" #include "graphicsvertexes.h" +#include "gui/gui.h" + +#include "resources/image.h" + #include "debug.h" int ScrollArea::instances = 0; diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h index bc652e296..39a7eea80 100644 --- a/src/gui/widgets/scrollarea.h +++ b/src/gui/widgets/scrollarea.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_SCROLLAREA_H #define GUI_WIDGETS_SCROLLAREA_H -#include "gui/widgets/widget2.h" - #include "gui/base/widgets/scrollarea.hpp" #include "listeners/widgetlistener.h" diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 649388d04..1f5d48d06 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -25,9 +25,11 @@ #include "soundmanager.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/windows/editdialog.h" +#include "gui/widgets/button.h" #include "gui/widgets/checkbox.h" #include "gui/widgets/dropdown.h" #include "gui/widgets/horizontcontainer.h" @@ -37,6 +39,8 @@ #include "gui/widgets/sliderlist.h" #include "gui/widgets/vertcontainer.h" +#include "gui/widgets/tabs/setuptabscroll.h" + #include "utils/base64.h" #include "utils/gettext.h" #include "utils/mathutils.h" diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index b5261e2f4..87b7c46f9 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -21,14 +21,17 @@ #ifndef GUI_WIDGETS_SETUPITEM_H #define GUI_WIDGETS_SETUPITEM_H -#include "gui/widgets/button.h" -#include "gui/widgets/tabs/setuptabscroll.h" +//#include "gui/widgets/button.h" +//#include "gui/widgets/tabs/setuptabscroll.h" + +#include "gui/widgets/widget2.h" #include "listeners/actionlistener.h" #include <list> #include <vector> +class Button; class CheckBox; class Configuration; class DropDown; @@ -36,6 +39,7 @@ class EditDialog; class HorizontContainer; class IntTextField; class Label; +class SetupTabScroll; class Slider; class SliderList; class TextField; diff --git a/src/gui/widgets/setuptouchitem.cpp b/src/gui/widgets/setuptouchitem.cpp index b080de428..f4c213b2f 100644 --- a/src/gui/widgets/setuptouchitem.cpp +++ b/src/gui/widgets/setuptouchitem.cpp @@ -27,6 +27,8 @@ #include "gui/widgets/label.h" #include "gui/widgets/vertcontainer.h" +#include "gui/widgets/tabs/setuptabscroll.h" + #include <algorithm> #include "debug.h" diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp index 5df0eafb0..0482281ed 100644 --- a/src/gui/widgets/shortcutcontainer.cpp +++ b/src/gui/widgets/shortcutcontainer.cpp @@ -24,6 +24,8 @@ #include "graphicsvertexes.h" +#include "gui/gui.h" + #include "debug.h" float ShortcutContainer::mAlpha = 1.0; diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index 610cfef1f..115298081 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_SHORTCUTCONTAINER_H #define GUI_WIDGETS_SHORTCUTCONTAINER_H -#include "gui/widgets/widget2.h" - #include "listeners/mouselistener.h" #include "gui/base/widget.hpp" #include "listeners/widgetlistener.h" diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp index 0c9b74202..c785f4016 100644 --- a/src/gui/widgets/slider.cpp +++ b/src/gui/widgets/slider.cpp @@ -29,6 +29,8 @@ #include "input/keydata.h" +#include "gui/gui.h" + #include "resources/image.h" #include "debug.h" diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h index d03799cae..2f21127d1 100644 --- a/src/gui/widgets/slider.h +++ b/src/gui/widgets/slider.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_SLIDER_H #define GUI_WIDGETS_SLIDER_H -#include "gui/widgets/widget2.h" - #include "gui/base/widgets/slider.hpp" #include "localconsts.h" diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp index 93a6934ba..c5791f1c2 100644 --- a/src/gui/widgets/sliderlist.cpp +++ b/src/gui/widgets/sliderlist.cpp @@ -23,6 +23,8 @@ #include "gui/font.h" #include "gui/gui.h" +#include "gui/base/listmodel.hpp" + #include "gui/widgets/button.h" #include "gui/widgets/label.h" diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h index 785ada74b..9adba8080 100644 --- a/src/gui/widgets/sliderlist.h +++ b/src/gui/widgets/sliderlist.h @@ -21,8 +21,6 @@ #ifndef GUI_WIDGETS_SLIDERLIST_H #define GUI_WIDGETS_SLIDERLIST_H -#include "gui/base/listmodel.hpp" - #include "listeners/actionlistener.h" #include "listeners/mouselistener.h" @@ -33,6 +31,11 @@ class Button; class Label; +namespace gcn +{ + class ListModel; +} + class SliderList final : public Container, public ActionListener, public MouseListener diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index 5441c4d8a..768206bdb 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -32,7 +32,6 @@ #include "gui/popups/spellpopup.h" -#include "gui/windows/inventorywindow.h" #include "gui/windows/shortcutwindow.h" #include "resources/image.h" diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index af5892845..879ac8ec0 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -69,6 +69,8 @@ #include "input/keydata.h" +#include "gui/gui.h" + #include "gui/widgets/button.h" #include "gui/widgets/scrollarea.h" #include "gui/widgets/tabs/tab.h" diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 1d0794c5c..a95438605 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -66,8 +66,6 @@ #ifndef GUI_WIDGETS_TABBEDAREA_H #define GUI_WIDGETS_TABBEDAREA_H -#include "gui/widgets/widget2.h" - #include "listeners/keylistener.h" #include "listeners/mouselistener.h" #include "listeners/widgetlistener.h" diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp index 283f1927e..b74dc53b8 100644 --- a/src/gui/widgets/tabs/chattab.cpp +++ b/src/gui/widgets/tabs/chattab.cpp @@ -24,6 +24,7 @@ #include "chatlogger.h" #include "client.h" +#include "commands.h" #include "commandhandler.h" #include "configuration.h" #include "soundconsts.h" diff --git a/src/gui/widgets/tabs/setup_audio.h b/src/gui/widgets/tabs/setup_audio.h index 839734b39..aaadebf32 100644 --- a/src/gui/widgets/tabs/setup_audio.h +++ b/src/gui/widgets/tabs/setup_audio.h @@ -25,6 +25,8 @@ #include "gui/widgets/setupitem.h" +#include "gui/widgets/tabs/setuptabscroll.h" + class Setup_Audio final : public SetupTabScroll { public: diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp index 2aaad6301..9e78133f5 100644 --- a/src/gui/widgets/tabs/setup_colors.cpp +++ b/src/gui/widgets/tabs/setup_colors.cpp @@ -22,6 +22,7 @@ #include "gui/widgets/tabs/setup_colors.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/userpalette.h" #include "gui/widgets/browserbox.h" diff --git a/src/gui/widgets/tabs/setup_colors.h b/src/gui/widgets/tabs/setup_colors.h index 8864db7db..ce491706c 100644 --- a/src/gui/widgets/tabs/setup_colors.h +++ b/src/gui/widgets/tabs/setup_colors.h @@ -26,8 +26,6 @@ #include "listeners/selectionlistener.h" -#include <string> - class BrowserBox; class Label; class ListBox; diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp index 72d05d966..03c8f31e3 100644 --- a/src/gui/widgets/tabs/setup_input.cpp +++ b/src/gui/widgets/tabs/setup_input.cpp @@ -28,6 +28,7 @@ #include "input/inputmanager.h" #include "input/keyboardconfig.h" +#include "gui/gui.h" #include "gui/setupactiondata.h" #include "gui/windows/okdialog.h" diff --git a/src/gui/widgets/tabs/setup_relations.h b/src/gui/widgets/tabs/setup_relations.h index 55da0bedc..e32889008 100644 --- a/src/gui/widgets/tabs/setup_relations.h +++ b/src/gui/widgets/tabs/setup_relations.h @@ -27,6 +27,8 @@ #include "gui/widgets/tabs/setuptab.h" +#include "listeners/playerrelationslistener.h" + class Button; class CheckBox; class DropDown; diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp index fd70b9158..d27a095d5 100644 --- a/src/gui/widgets/tabs/setup_theme.cpp +++ b/src/gui/widgets/tabs/setup_theme.cpp @@ -22,6 +22,8 @@ #include "gui/widgets/tabs/setup_theme.h" +#include "gui/gui.h" + #include "gui/windows/okdialog.h" #include "gui/widgets/button.h" diff --git a/src/gui/widgets/tabs/setup_touch.cpp b/src/gui/widgets/tabs/setup_touch.cpp index 5d995f914..2baae029e 100644 --- a/src/gui/widgets/tabs/setup_touch.cpp +++ b/src/gui/widgets/tabs/setup_touch.cpp @@ -21,6 +21,8 @@ #include "gui/widgets/tabs/setup_touch.h" #include "gui/widgets/layouthelper.h" +#include "gui/widgets/namesmodel.h" +#include "gui/widgets/setuptouchitem.h" #include "gui/widgets/scrollarea.h" #include "utils/gettext.h" diff --git a/src/gui/widgets/tabs/setup_touch.h b/src/gui/widgets/tabs/setup_touch.h index 9adc2d5cd..ef1afdda3 100644 --- a/src/gui/widgets/tabs/setup_touch.h +++ b/src/gui/widgets/tabs/setup_touch.h @@ -21,7 +21,10 @@ #ifndef GUI_WIDGETS_TABS_SETUP_TOUCH_H #define GUI_WIDGETS_TABS_SETUP_TOUCH_H -#include "gui/widgets/setuptouchitem.h" +#include "gui/widgets/tabs/setuptabscroll.h" + +class NamesModel; +class TouchActionsModel; class Setup_Touch final : public SetupTabScroll { diff --git a/src/gui/widgets/tabs/setup_visual.h b/src/gui/widgets/tabs/setup_visual.h index 2d40d3a08..1229757dd 100644 --- a/src/gui/widgets/tabs/setup_visual.h +++ b/src/gui/widgets/tabs/setup_visual.h @@ -24,6 +24,8 @@ #include "gui/widgets/setupitem.h" +#include "gui/widgets/tabs/setuptabscroll.h" + class NamesModel; class Setup_Visual final : public SetupTabScroll diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp index c1650e8a8..2d91129f2 100644 --- a/src/gui/widgets/tabs/tab.cpp +++ b/src/gui/widgets/tabs/tab.cpp @@ -68,9 +68,13 @@ #include "client.h" #include "graphicsvertexes.h" +#include "gui/gui.h" + #include "gui/widgets/label.h" #include "gui/widgets/tabbedarea.h" +#include "resources/image.h" + #include "debug.h" int Tab::mInstances = 0; diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h index 878663e36..463a6b668 100644 --- a/src/gui/widgets/tabs/tab.h +++ b/src/gui/widgets/tabs/tab.h @@ -66,8 +66,6 @@ #ifndef GUI_WIDGETS_TABS_TAB_H #define GUI_WIDGETS_TABS_TAB_H -#include "gui/widgets/widget2.h" - #include "gui/base/basiccontainer.hpp" #include "listeners/mouselistener.h" diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp index 729d40ead..ec0d09a26 100644 --- a/src/gui/widgets/textbox.cpp +++ b/src/gui/widgets/textbox.cpp @@ -27,6 +27,7 @@ #include "input/keydata.h" #include "gui/font.h" +#include "gui/gui.h" #include <sstream> diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h index fe719faf8..24dd57adb 100644 --- a/src/gui/widgets/textbox.h +++ b/src/gui/widgets/textbox.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_TEXTBOX_H #define GUI_WIDGETS_TEXTBOX_H -#include "gui/widgets/widget2.h" - #include "gui/base/widgets/textbox.hpp" #include "localconsts.h" diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index 226d9172c..c30045c02 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -29,7 +29,7 @@ #include "events/keyevent.h" #include "gui/font.h" -#include "gui/sdlinput.h" +#include "gui/gui.h" #include "gui/viewport.h" #include "gui/popups/popupmenu.h" diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h index 532175a82..31f64f545 100644 --- a/src/gui/widgets/textpreview.h +++ b/src/gui/widgets/textpreview.h @@ -23,8 +23,6 @@ #ifndef GUI_WIDGETS_TEXTPREVIEW_H #define GUI_WIDGETS_TEXTPREVIEW_H -#include "gui/widgets/widget2.h" - #include "gui/base/widget.hpp" #include "localconsts.h" diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h index a57ccbb41..c6317702f 100644 --- a/src/gui/widgets/widget2.h +++ b/src/gui/widgets/widget2.h @@ -21,7 +21,6 @@ #ifndef GUI_WIDGETS_WIDGET2_H #define GUI_WIDGETS_WIDGET2_H -#include "gui/gui.h" #include "gui/theme.h" #include "render/renderers.h" diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index 64963be3e..37a9900ee 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -25,8 +25,6 @@ #include "render/graphics.h" -#include "gui/widgets/widget2.h" - #include "listeners/widgetlistener.h" #include "gui/base/widgets/window.hpp" diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index 4417f18a6..27418b892 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -35,6 +35,8 @@ #include "gui/specialswindow.h" #endif +#include "gui/widgets/button.h" + #include "utils/dtor.h" #include "utils/gettext.h" diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h index 1f2d8adb2..a1ed66a7d 100644 --- a/src/gui/windowmenu.h +++ b/src/gui/windowmenu.h @@ -26,9 +26,9 @@ #include "listeners/configlistener.h" #include "gui/widgets/container.h" -#include "gui/widgets/button.h" #include "listeners/actionlistener.h" +#include "listeners/mouselistener.h" #include "listeners/selectionlistener.h" #include "localconsts.h" @@ -36,8 +36,8 @@ #include <map> #include <vector> +class Button; class TextPopup; -class Window; struct ButtonInfo final { diff --git a/src/gui/windows/buydialog.h b/src/gui/windows/buydialog.h index 500f378ef..aa163d5d0 100644 --- a/src/gui/windows/buydialog.h +++ b/src/gui/windows/buydialog.h @@ -35,7 +35,6 @@ class ShopListBox; class SortListModelBuy; class IntTextField; class Label; -class ListBox; class ScrollArea; class Slider; diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index d6b572d40..fb407b9cc 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -31,6 +31,7 @@ #include "gui/windows/okdialog.h" #include "gui/widgets/button.h" +#include "gui/windows/charselectdialog.h" #include "gui/widgets/label.h" #include "gui/widgets/playerbox.h" #include "gui/widgets/radiobutton.h" diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h index 123d826f2..12ddf7970 100644 --- a/src/gui/windows/charcreatedialog.h +++ b/src/gui/windows/charcreatedialog.h @@ -25,11 +25,13 @@ #include "being/being.h" -#include "gui/windows/charselectdialog.h" +#include "gui/widgets/window.h" #include "listeners/actionlistener.h" #include "listeners/keylistener.h" +class Button; +class CharSelectDialog; class Label; class PlayerBox; class RadioButton; diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 7c6e387a4..12a78ce10 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -44,6 +44,7 @@ #include "net/logindata.h" #include "net/loginhandler.h" +#include "net/net.h" #include "utils/gettext.h" diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h index 348811ee3..38c307f30 100644 --- a/src/gui/windows/charselectdialog.h +++ b/src/gui/windows/charselectdialog.h @@ -35,7 +35,6 @@ class Button; class CharacterDisplay; class CharacterViewBase; -class Label; class LoginData; class TextDialog; diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 45a76495b..565d3644a 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -40,8 +40,7 @@ #include "input/inputmanager.h" #include "gui/focushandler.h" -#include "gui/font.h" -#include "gui/sdlinput.h" +#include "gui/gui.h" #include "gui/viewport.h" #include "gui/windows/emotewindow.h" diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp index 95d657772..79ad4c208 100644 --- a/src/gui/windows/didyouknowwindow.cpp +++ b/src/gui/windows/didyouknowwindow.cpp @@ -24,7 +24,7 @@ #include "configuration.h" -#include "gui/font.h" +#include "gui/gui.h" #include "gui/windows/setupwindow.h" @@ -78,7 +78,8 @@ DidYouKnowWindow::DidYouKnowWindow() : Button *const okButton = new Button(this, _("Close"), "close", this); mBrowserBox->setLinkHandler(this); - mBrowserBox->setFont(gui->getHelpFont()); + if (gui) + mBrowserBox->setFont(gui->getHelpFont()); mBrowserBox->setProcessVersion(true); mBrowserBox->setEnableImages(true); mBrowserBox->setEnableKeys(true); diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp index 7457c7b1e..fa9963217 100644 --- a/src/gui/windows/helpwindow.cpp +++ b/src/gui/windows/helpwindow.cpp @@ -24,7 +24,7 @@ #include "configuration.h" -#include "gui/font.h" +#include "gui/gui.h" #include "gui/windows/didyouknowwindow.h" #include "gui/windows/setupwindow.h" @@ -73,7 +73,8 @@ HelpWindow::HelpWindow() : mBrowserBox->setOpaque(false); mBrowserBox->setLinkHandler(this); - mBrowserBox->setFont(gui->getHelpFont()); + if (gui) + mBrowserBox->setFont(gui->getHelpFont()); mBrowserBox->setProcessVersion(true); mBrowserBox->setEnableImages(true); mBrowserBox->setEnableKeys(true); diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index bc66f588c..603b1b26d 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -33,8 +33,11 @@ #include "input/inputmanager.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/viewport.h" +#include "gui/base/listmodel.hpp" + #include "gui/popups/textpopup.h" #include "gui/windows/equipmentwindow.h" diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h index 6a6999034..c81e83d77 100644 --- a/src/gui/windows/inventorywindow.h +++ b/src/gui/windows/inventorywindow.h @@ -37,7 +37,6 @@ class Button; class DropDown; class Item; class ItemContainer; -class Label; class LayoutCell; class ProgressBar; class SortListModelInv; diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 8e981ae96..c63157e27 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -33,6 +33,8 @@ #include "net/net.h" #include "gui/viewport.h" +#include "gui/base/listmodel.hpp" + #include "gui/popups/itempopup.h" #include "gui/windows/shopwindow.h" diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h index b7b036659..b9fa1aab8 100644 --- a/src/gui/windows/npcdialog.h +++ b/src/gui/windows/npcdialog.h @@ -45,7 +45,6 @@ class ItemContainer; class NpcDialog; class PlayerBox; class ScrollArea; -class TextBox; class TextField; typedef std::map<int, NpcDialog*> NpcDialogs; diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp index 1a8749899..d62ca36ad 100644 --- a/src/gui/windows/questswindow.cpp +++ b/src/gui/windows/questswindow.cpp @@ -27,6 +27,7 @@ #include "being/localplayer.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/widgets/browserbox.h" #include "gui/widgets/button.h" @@ -166,7 +167,7 @@ QuestsWindow::QuestsWindow() : mText->setLinkHandler(mItemLinkHandler); mTextScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mQuestsListBox->setWidth(500); - if (gui->getNpcFont()->getHeight() < 20) + if (gui && gui->getNpcFont()->getHeight() < 20) mQuestsListBox->setRowHeight(20); else mQuestsListBox->setRowHeight(gui->getNpcFont()->getHeight()); diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 6823c2649..a06257b10 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -32,7 +32,9 @@ #include "input/keydata.h" #include "gui/font.h" +#include "gui/gui.h" +#include "gui/widgets/checkbox.h" #include "gui/windows/editserverdialog.h" #include "gui/windows/logindialog.h" @@ -132,7 +134,7 @@ void ServersListModel::setVersionString(const int index, if (index < 0 || index >= static_cast<int>(mVersionStrings.size())) return; - if (version.empty()) + if (version.empty() || !gui) { mVersionStrings[index] = VersionString(0, ""); } diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h index 112c8001d..3f63562f7 100644 --- a/src/gui/windows/serverdialog.h +++ b/src/gui/windows/serverdialog.h @@ -24,7 +24,6 @@ #define GUI_WINDOWS_SERVERDIALOG_H #include "gui/widgets/window.h" -#include "gui/widgets/checkbox.h" #include "net/download.h" #include "net/serverinfo.h" @@ -41,6 +40,7 @@ #include <vector> class Button; +class CheckBox; class Label; class ListBox; class ServerDialog; diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp index a996d776b..9878807d9 100644 --- a/src/gui/windows/setupwindow.cpp +++ b/src/gui/windows/setupwindow.cpp @@ -44,6 +44,7 @@ #include "gui/widgets/tabs/setup_video.h" #include "gui/widgets/tabs/setup_visual.h" +#include "gui/widgets/button.h" #include "gui/widgets/label.h" #include "gui/widgets/tabbedarea.h" diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp index 98b9cae60..82d1c9ef6 100644 --- a/src/gui/windows/textcommandeditor.cpp +++ b/src/gui/windows/textcommandeditor.cpp @@ -27,6 +27,8 @@ #include "input/keyboardconfig.h" +#include "gui/base/listmodel.hpp" + #include "gui/widgets/button.h" #include "gui/widgets/dropdown.h" #include "gui/widgets/inttextfield.h" diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index 25d077d5d..7fe1a1e36 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -32,6 +32,7 @@ #include "being/playerrelations.h" #include "gui/font.h" +#include "gui/gui.h" #include "gui/windows/inventorywindow.h" #include "gui/windows/itemamountwindow.h" diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index d19130e7c..5d157f0fa 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -28,7 +28,6 @@ #include "input/keyboardconfig.h" #include "input/keyboarddata.h" #include "being/localplayer.h" -#include "being/playerinfo.h" #ifdef USE_SDL2 #include "input/multitouchmanager.h" #endif @@ -47,7 +46,6 @@ #include "gui/windows/setupwindow.h" #include "gui/windows/textdialog.h" #include "gui/windows/tradewindow.h" -#include "gui/windows/quitdialog.h" #include "utils/timer.h" @@ -59,6 +57,8 @@ InputManager inputManager; +class QuitDialog; + extern QuitDialog *quitDialog; static class KeyFunctor final diff --git a/src/input/key.h b/src/input/key.h index fa48d3583..97bc7113d 100644 --- a/src/input/key.h +++ b/src/input/key.h @@ -194,4 +194,4 @@ class Key final int mValue; }; -#endif // end GCN_KEY_HPP +#endif // INPUT_KEY_H diff --git a/src/input/mouseinput.h b/src/input/mouseinput.h index 5ece1f77a..a90a1366d 100644 --- a/src/input/mouseinput.h +++ b/src/input/mouseinput.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MOUSEINPUT_H -#define MOUSEINPUT_H +#ifndef INPUT_MOUSEINPUT_H +#define INPUT_MOUSEINPUT_H #include "input/mouseinput.h" @@ -213,4 +213,4 @@ class MouseInput final int mRealY; }; -#endif // MOUSEINPUT_H +#endif // INPUT_MOUSEINPUT_H diff --git a/src/input/multitouchmanager.h b/src/input/multitouchmanager.h index 076ccb3a8..82bfd0881 100644 --- a/src/input/multitouchmanager.h +++ b/src/input/multitouchmanager.h @@ -25,7 +25,9 @@ #include "localconsts.h" +#ifdef USE_SDL2 union SDL_Event; +#endif struct MultiTouchEvent { diff --git a/src/listeners/actionlistener.h b/src/listeners/actionlistener.h index b22e5abc6..895cc985d 100644 --- a/src/listeners/actionlistener.h +++ b/src/listeners/actionlistener.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LISTENERS_ACTIONLISTENER_HPP -#define LISTENERS_ACTIONLISTENER_HPP +#ifndef LISTENERS_ACTIONLISTENER_H +#define LISTENERS_ACTIONLISTENER_H #include <string> @@ -106,4 +106,4 @@ class ActionListener { } }; -#endif // end LISTENERS_ACTIONLISTENER_HPP +#endif // LISTENERS_ACTIONLISTENER_H diff --git a/src/listeners/deathlistener.h b/src/listeners/deathlistener.h index beefe1746..ddd7db910 100644 --- a/src/listeners/deathlistener.h +++ b/src/listeners/deathlistener.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LISTENERS_DEATHLISTENER_HPP -#define LISTENERS_DEATHLISTENER_HPP +#ifndef LISTENERS_DEATHLISTENER_H +#define LISTENERS_DEATHLISTENER_H #include <string> @@ -103,4 +103,4 @@ class DeathListener { } }; -#endif // LISTENERS_DEATHLISTENER_HPP +#endif // LISTENERS_DEATHLISTENER_H diff --git a/src/listeners/focuslistener.h b/src/listeners/focuslistener.h index c910f833e..10e4a2af0 100644 --- a/src/listeners/focuslistener.h +++ b/src/listeners/focuslistener.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LISTENERS_FOCUSLISTENER_HPP -#define LISTENERS_FOCUSLISTENER_HPP +#ifndef LISTENERS_FOCUSLISTENER_H +#define LISTENERS_FOCUSLISTENER_H #include <string> @@ -113,4 +113,4 @@ class FocusListener { } }; -#endif // LISTENERS_FOCUSLISTENER_HPP +#endif // LISTENERS_FOCUSLISTENER_H diff --git a/src/listeners/keylistener.h b/src/listeners/keylistener.h index 0873de835..efc387300 100644 --- a/src/listeners/keylistener.h +++ b/src/listeners/keylistener.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef GCN_KEYLISTENER_HPP -#define GCN_KEYLISTENER_HPP +#ifndef LISTENERS_KEYLISTENER_H +#define LISTENERS_KEYLISTENER_H #include "events/keyevent.h" @@ -113,4 +113,4 @@ class KeyListener { } }; -#endif // end GCN_KEYLISTENER_HPP +#endif // LISTENERS_KEYLISTENER_H diff --git a/src/listeners/mouselistener.h b/src/listeners/mouselistener.h index d294e4dd6..9a2a4ef04 100644 --- a/src/listeners/mouselistener.h +++ b/src/listeners/mouselistener.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef GCN_MOUSELISTENER_HPP -#define GCN_MOUSELISTENER_HPP +#ifndef LISTENERS_MOUSELISTENER_H +#define LISTENERS_MOUSELISTENER_H #include "events/mouseevent.h" @@ -190,4 +190,4 @@ class MouseListener { } }; -#endif // end GCN_MOUSELISTENER_HPP +#endif // LISTENERS_MOUSELISTENER_H diff --git a/src/listeners/playerrelationslistener.h b/src/listeners/playerrelationslistener.h index b95f18c33..6a8bf3b20 100644 --- a/src/listeners/playerrelationslistener.h +++ b/src/listeners/playerrelationslistener.h @@ -20,8 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LISTERNERS_PLAYERRELATIONSLISTENER_H -#define LISTERNERS_PLAYERRELATIONSLISTENER_H +#ifndef LISTENERS_PLAYERRELATIONSLISTENER_H +#define LISTENERS_PLAYERRELATIONSLISTENER_H #include <string> @@ -40,4 +40,4 @@ class PlayerRelationsListener { } }; -#endif // LISTERNERS_PLAYERRELATIONSLISTENER_H +#endif // LISTENERS_PLAYERRELATIONSLISTENER_H diff --git a/src/listeners/selectionlistener.h b/src/listeners/selectionlistener.h index d3be0f0eb..2efe0a67e 100644 --- a/src/listeners/selectionlistener.h +++ b/src/listeners/selectionlistener.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef GCN_SELECTIONLISTENER_HPP -#define GCN_SELECTIONLISTENER_HPP +#ifndef LISTENERS_SELECTIONLISTENER_H +#define LISTENERS_SELECTIONLISTENER_H #include <string> @@ -111,4 +111,4 @@ class SelectionListener { } }; -#endif // end GCN_SELECTIONLISTENER_HPP +#endif // LISTENERS_SELECTIONLISTENER_H diff --git a/src/listeners/widgetlistener.h b/src/listeners/widgetlistener.h index 16d9e1f15..48641cbaa 100644 --- a/src/listeners/widgetlistener.h +++ b/src/listeners/widgetlistener.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LISTENERS_WIDGETLISTENER_HPP -#define LISTENERS_WIDGETLISTENER_HPP +#ifndef LISTENERS_WIDGETLISTENER_H +#define LISTENERS_WIDGETLISTENER_H #include <string> @@ -137,4 +137,4 @@ class WidgetListener { } }; -#endif // LISTENERS_WIDGETLISTENER_HPP +#endif // LISTENERS_WIDGETLISTENER_H diff --git a/src/logger.cpp b/src/logger.cpp index c430aefec..21fea14d7 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -22,9 +22,10 @@ #include "logger.h" -#include <iostream> #include <sstream> +#include <iostream> + #ifdef WIN32 #include <windows.h> #elif defined __APPLE__ diff --git a/src/maplayer.cpp b/src/maplayer.cpp index 86a431cdf..b4fbc6da6 100644 --- a/src/maplayer.cpp +++ b/src/maplayer.cpp @@ -33,6 +33,7 @@ #include "render/graphics.h" +#include "resources/image.h" #include "resources/resourcemanager.h" #include "gui/font.h" diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index 0f592b123..d55a3cea6 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -39,8 +39,6 @@ #include "net/chathandler.h" #include "net/net.h" -#include "net/ea/eaprotocol.h" - #include "utils/timer.h" #include "debug.h" diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index a11c157fd..d541ce09b 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -33,6 +33,7 @@ #include "net/ea/gamehandler.h" #include "net/ea/network.h" +#include "net/messagein.h" #include "net/net.h" #include "utils/dtor.h" diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h index 5ffd714f2..af6aafa9b 100644 --- a/src/net/ea/charserverhandler.h +++ b/src/net/ea/charserverhandler.h @@ -24,8 +24,13 @@ #define NET_EA_CHARSERVERHANDLER_H #include "net/charserverhandler.h" -#include "net/messagein.h" -#include "net/serverinfo.h" + +class ServerInfo; + +namespace Net +{ + class MessageIn; +} namespace Ea { diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index 6654950f2..997e4bfc1 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -38,6 +38,8 @@ #include "gui/widgets/tabs/chattab.h" +#include "net/messagein.h" + #include <string> #include "debug.h" diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h index 1fabda09d..237abf10a 100644 --- a/src/net/ea/chathandler.h +++ b/src/net/ea/chathandler.h @@ -24,10 +24,14 @@ #define NET_EA_CHATHANDLER_H #include "net/chathandler.h" -#include "net/messagein.h" #include <queue> +namespace Net +{ + class MessageIn; +} + namespace Ea { diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp index 6e1982b6d..de1d6f151 100644 --- a/src/net/ea/gamehandler.cpp +++ b/src/net/ea/gamehandler.cpp @@ -31,6 +31,8 @@ #include "gui/windows/okdialog.h" +#include "net/messagein.h" + #include "debug.h" namespace Ea diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h index 8a31ee030..4a0624be0 100644 --- a/src/net/ea/gamehandler.h +++ b/src/net/ea/gamehandler.h @@ -24,7 +24,11 @@ #define NET_EA_GAMEHANDLER_H #include "net/gamehandler.h" -#include "net/messagein.h" + +namespace Net +{ + class MessageIn; +} namespace Ea { diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp index 46b1f1649..af8c3b8df 100644 --- a/src/net/ea/gui/guildtab.cpp +++ b/src/net/ea/gui/guildtab.cpp @@ -28,10 +28,9 @@ #include "soundconsts.h" #include "soundmanager.h" +#include "net/guildhandler.h" #include "net/net.h" -#include "net/ea/guildhandler.h" - #include "utils/gettext.h" #include "debug.h" diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp index 536c93263..1e56ac75b 100644 --- a/src/net/ea/guildhandler.cpp +++ b/src/net/ea/guildhandler.cpp @@ -30,6 +30,10 @@ #include "gui/windows/socialwindow.h" +#include "net/messagein.h" + +#include "net/ea/gui/guildtab.h" + #include "debug.h" namespace Ea diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h index 191d6fd44..e8bec6a09 100644 --- a/src/net/ea/guildhandler.h +++ b/src/net/ea/guildhandler.h @@ -23,12 +23,15 @@ #define NET_EA_GUILDHANDLER_H #include "net/guildhandler.h" -#include "net/messagein.h" -#include "net/ea/gui/guildtab.h" +namespace Net +{ + class MessageIn; +} namespace Ea { +class GuildTab; class GuildHandler : public Net::GuildHandler { diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 74f0a4ba7..3f4eb9228 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -29,6 +29,8 @@ #include "gui/windows/ministatuswindow.h" +#include "net/messagein.h" + #include "net/ea/eaprotocol.h" #include "debug.h" diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 6e8ecec38..494b9145a 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -33,11 +33,15 @@ #include "gui/windows/inventorywindow.h" #include "net/inventoryhandler.h" -#include "net/messagein.h" #include <vector> #include <queue> +namespace Net +{ + class MessageIn; +} + namespace Ea { diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp index 9ce85a59b..383ba2753 100644 --- a/src/net/ea/itemhandler.cpp +++ b/src/net/ea/itemhandler.cpp @@ -24,6 +24,8 @@ #include "actormanager.h" +#include "net/messagein.h" + #include "debug.h" namespace Ea diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h index 6bc23fb10..80c0a4dbf 100644 --- a/src/net/ea/itemhandler.h +++ b/src/net/ea/itemhandler.h @@ -25,6 +25,13 @@ #include "net/messagein.h" +#include "localconsts.h" + +namespace Net +{ + class MessageIn; +} + namespace Ea { diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 57edcefbf..62514b10b 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -32,6 +32,8 @@ #include "utils/gettext.h" #include "utils/paths.h" +#include "net/messagein.h" + #include "debug.h" namespace Ea diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h index 8fea9d49f..f539176f5 100644 --- a/src/net/ea/loginhandler.h +++ b/src/net/ea/loginhandler.h @@ -24,7 +24,6 @@ #define NET_EA_LOGINHANDLER_H #include "net/loginhandler.h" -#include "net/messagein.h" #include "net/ea/token.h" @@ -32,6 +31,11 @@ class LoginData; +namespace Net +{ + class MessageIn; +} + namespace Ea { diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp index 70c4ce08a..03def7298 100644 --- a/src/net/ea/npchandler.cpp +++ b/src/net/ea/npchandler.cpp @@ -24,6 +24,8 @@ #include "gui/windows/npcdialog.h" +#include "net/messagein.h" + #include "debug.h" namespace Ea diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h index b8a10bc18..07c281587 100644 --- a/src/net/ea/npchandler.h +++ b/src/net/ea/npchandler.h @@ -23,11 +23,17 @@ #ifndef NET_EA_NPCHANDLER_H #define NET_EA_NPCHANDLER_H -#include "net/messagein.h" #include "net/npchandler.h" +#include "localconsts.h" + class NpcDialog; +namespace Net +{ + class MessageIn; +} + namespace Ea { diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 98dec750a..7f29f277a 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -25,11 +25,16 @@ #include "configuration.h" #include "notifications.h" #include "notifymanager.h" +#include "party.h" #include "being/localplayer.h" #include "gui/windows/socialwindow.h" +#include "net/messagein.h" + +#include "net/ea/gui/partytab.h" + #include "debug.h" namespace Ea diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index e7ab8f8ef..29f242285 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -22,15 +22,18 @@ #ifndef NET_EA_PARTYHANDLER_H #define NET_EA_PARTYHANDLER_H -#include "net/messagein.h" #include "net/partyhandler.h" -#include "net/ea/gui/partytab.h" +class Party; -#include "party.h" +namespace Net +{ + class MessageIn; +} namespace Ea { +class PartyTab; class PartyHandler : public Net::PartyHandler { diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 28f16735c..de376cead 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -41,6 +41,7 @@ #include "resources/db/deaddb.h" +#include "net/messagein.h" #include "net/net.h" #include "net/ea/eaprotocol.h" diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index 589874e2e..087627f92 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -23,9 +23,13 @@ #ifndef NET_EA_PLAYERHANDLER_H #define NET_EA_PLAYERHANDLER_H -#include "net/messagein.h" #include "net/playerhandler.h" +namespace Net +{ + class MessageIn; +} + namespace Ea { diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp index 3a5a1ab75..fd10a6087 100644 --- a/src/net/ea/skillhandler.cpp +++ b/src/net/ea/skillhandler.cpp @@ -33,6 +33,8 @@ #include "utils/stringutils.h" +#include "net/messagein.h" + #include "debug.h" /** job dependend identifiers (?) */ diff --git a/src/net/ea/skillhandler.h b/src/net/ea/skillhandler.h index 8dc724e0a..484ca6878 100644 --- a/src/net/ea/skillhandler.h +++ b/src/net/ea/skillhandler.h @@ -23,9 +23,15 @@ #ifndef NET_EA_SKILLHANDLER_H #define NET_EA_SKILLHANDLER_H -#include "net/messagein.h" #include "net/skillhandler.h" +#include "localconsts.h" + +namespace Net +{ + class MessageIn; +} + namespace Ea { diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp index 4cb424fc9..19e597967 100644 --- a/src/net/ea/tradehandler.cpp +++ b/src/net/ea/tradehandler.cpp @@ -34,6 +34,7 @@ #include "gui/windows/confirmdialog.h" #include "gui/windows/tradewindow.h" +#include "net/messagein.h" #include "net/net.h" #include "net/ea/eaprotocol.h" diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h index 22a78e9e6..d4c9510b8 100644 --- a/src/net/ea/tradehandler.h +++ b/src/net/ea/tradehandler.h @@ -23,9 +23,13 @@ #ifndef NET_EA_TRADEHANDLER_H #define NET_EA_TRADEHANDLER_H -#include "net/messagein.h" #include "net/tradehandler.h" +namespace Net +{ + class MessageIn; +} + namespace Ea { diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 61e0a8404..a9d11f563 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -24,8 +24,7 @@ #include "being/localplayer.h" -#include "gui/widgets/tabs/chattab.h" - +#include "net/eathena/messageout.h" #include "net/eathena/protocol.h" #include <string> diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index 9c6b8ea0c..3efaf2d31 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -26,10 +26,10 @@ #include "net/ea/chathandler.h" #include "net/eathena/messagehandler.h" -#include "net/eathena/messageout.h" namespace EAthena { +class MessageOut; class ChatHandler final : public MessageHandler, public Ea::ChatHandler { diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index ebb5d46d7..3a18dede9 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -33,6 +33,7 @@ #include "net/ea/guildhandler.h" +#include "net/ea/gui/guildtab.h" #include "net/ea/gui/partytab.h" #include "net/eathena/adminhandler.h" diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 56d4f5aae..0162d82e8 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -24,6 +24,7 @@ #include "logger.h" +#include "net/eathena/messagehandler.h" #include "net/eathena/messagein.h" #include "net/eathena/protocol.h" diff --git a/src/net/eathena/network.h b/src/net/eathena/network.h index 4c9349f96..fae4f06d5 100644 --- a/src/net/eathena/network.h +++ b/src/net/eathena/network.h @@ -25,8 +25,6 @@ #include "net/ea/network.h" -#include "net/eathena/messagehandler.h" - /** * Protocol version, reported to the eAthena char and mapserver who can adjust * the protocol accordingly. @@ -35,6 +33,7 @@ namespace EAthena { +class MessageHandler; class Network final : public Ea::Network { diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index fcc650171..cfec2fe81 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -24,6 +24,7 @@ #include "actormanager.h" #include "notifications.h" #include "notifymanager.h" +#include "party.h" #include "being/localplayer.h" diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index af236f00b..d00f12dd3 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -24,8 +24,7 @@ #include "being/localplayer.h" -#include "gui/widgets/tabs/chattab.h" - +#include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" #include <string> diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h index a7226c52c..c4f51fec7 100644 --- a/src/net/tmwa/chathandler.h +++ b/src/net/tmwa/chathandler.h @@ -26,10 +26,10 @@ #include "net/ea/chathandler.h" #include "net/tmwa/messagehandler.h" -#include "net/tmwa/messageout.h" namespace TmwAthena { +class MessageOut; class ChatHandler final : public MessageHandler, public Ea::ChatHandler { diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 683eb0711..46d1d490f 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -33,6 +33,7 @@ #include "net/ea/guildhandler.h" +#include "net/ea/gui/guildtab.h" #include "net/ea/gui/partytab.h" #include "net/tmwa/adminhandler.h" diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index c91387898..cc94b6161 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -24,6 +24,7 @@ #include "logger.h" +#include "net/tmwa/messagehandler.h" #include "net/tmwa/messagein.h" #include "net/tmwa/protocol.h" diff --git a/src/net/tmwa/network.h b/src/net/tmwa/network.h index 6d05d0e48..bf9381227 100644 --- a/src/net/tmwa/network.h +++ b/src/net/tmwa/network.h @@ -25,8 +25,6 @@ #include "net/ea/network.h" -#include "net/tmwa/messagehandler.h" - /** * Protocol version, reported to the eAthena char and mapserver who can adjust * the protocol accordingly. @@ -36,6 +34,7 @@ namespace TmwAthena { +class MessageHandler; class Network final : public Ea::Network { diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index 78d56f669..ba18a9efa 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -24,6 +24,7 @@ #include "actormanager.h" #include "notifications.h" #include "notifymanager.h" +#include "party.h" #include "being/localplayer.h" diff --git a/src/net/tmwa/pethandler.cpp b/src/net/tmwa/pethandler.cpp index 6b9e5adb7..3293b7edd 100644 --- a/src/net/tmwa/pethandler.cpp +++ b/src/net/tmwa/pethandler.cpp @@ -24,8 +24,7 @@ #include "net/net.h" -#include "net/tmwa/chathandler.h" -#include "net/tmwa/protocol.h" +#include "net/chathandler.h" #include "debug.h" diff --git a/src/net/tradehandler.h b/src/net/tradehandler.h index 823352239..21ca65e97 100644 --- a/src/net/tradehandler.h +++ b/src/net/tradehandler.h @@ -29,6 +29,8 @@ #include "localconsts.h" +class Item; + namespace Net { class TradeHandler diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp index 7a15713be..2f4f6c0c2 100644 --- a/src/render/sdlgraphics.cpp +++ b/src/render/sdlgraphics.cpp @@ -33,6 +33,8 @@ #include "utils/sdlpixel.h" +#include "resources/image.h" + #include "debug.h" #if SDL_BYTEORDER == SDL_LIL_ENDIAN diff --git a/src/simpleanimation.cpp b/src/simpleanimation.cpp index 63f15c18f..1409146df 100644 --- a/src/simpleanimation.cpp +++ b/src/simpleanimation.cpp @@ -29,7 +29,6 @@ #include "resources/animation.h" #include "resources/dye.h" -#include "resources/image.h" #include "resources/imageset.h" #include "resources/resourcemanager.h" diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp index 049c010b3..647c6dd99 100644 --- a/src/statuseffect.cpp +++ b/src/statuseffect.cpp @@ -22,12 +22,15 @@ #include "statuseffect.h" +#include "animatedsprite.h" #include "configuration.h" #include "logger.h" #include "soundmanager.h" #include "gui/widgets/tabs/chattab.h" +#include "particle/particle.h" + #include "resources/beingcommon.h" #include <map> diff --git a/src/statuseffect.h b/src/statuseffect.h index 6dda71cfc..8bb164820 100644 --- a/src/statuseffect.h +++ b/src/statuseffect.h @@ -23,12 +23,13 @@ #ifndef STATUSEFFECT_H #define STATUSEFFECT_H -#include "animatedsprite.h" - -#include "particle/particle.h" +#include <string> #include "localconsts.h" +class AnimatedSprite; +class Particle; + class StatusEffect final { public: diff --git a/src/touchmanager.cpp b/src/touchmanager.cpp index 20c56b8d6..49a5a0d3d 100644 --- a/src/touchmanager.cpp +++ b/src/touchmanager.cpp @@ -35,6 +35,8 @@ #include "gui/theme.h" +#include "resources/image.h" + #include "debug.h" TouchManager touchManager; diff --git a/src/touchmanager.h b/src/touchmanager.h index 6419c4b17..09eaabad5 100644 --- a/src/touchmanager.h +++ b/src/touchmanager.h @@ -21,8 +21,6 @@ #ifndef TOUCHMANAGER_H #define TOUCHMANAGER_H -#include "resources/image.h" - #include "listeners/configlistener.h" #include "input/keydata.h" @@ -34,6 +32,7 @@ #include "localconsts.h" +class Image; class ImageCollection; class ImageRect; class MouseInput; diff --git a/src/utils/files.cpp b/src/utils/files.cpp index 24ec9366e..11ac222f5 100644 --- a/src/utils/files.cpp +++ b/src/utils/files.cpp @@ -24,7 +24,6 @@ #include "resources/resourcemanager.h" #endif -#include "utils/mkdir.h" #include "utils/physfstools.h" #include "localconsts.h" diff --git a/src/utils/paths.cpp b/src/utils/paths.cpp index a3f61bde3..96cd0ed29 100644 --- a/src/utils/paths.cpp +++ b/src/utils/paths.cpp @@ -28,7 +28,9 @@ #include "utils/physfstools.h" #include "utils/stringutils.h" +#ifdef USE_X11 #include "resources/resourcemanager.h" +#endif #ifdef __native_client__ #include <limits.h> diff --git a/src/utils/sdlpixel.h b/src/utils/sdlpixel.h index 2a26f28a1..692615688 100644 --- a/src/utils/sdlpixel.h +++ b/src/utils/sdlpixel.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef UTILS_SDLPIXEL_HPP -#define UTILS_SDLPIXEL_HPP +#ifndef UTILS_SDLPIXEL_H +#define UTILS_SDLPIXEL_H #include "SDL.h" #include "gui/base/color.hpp" @@ -229,4 +229,4 @@ inline void SDLputPixelAlpha(SDL_Surface* surface, int x, int y, SDL_UnlockSurface(surface); } -#endif // UTILS_SDLPIXEL_HPP +#endif // UTILS_SDLPIXEL_H diff --git a/src/utils/translation/poparser.cpp b/src/utils/translation/poparser.cpp index f0ab95005..c105bf0da 100644 --- a/src/utils/translation/poparser.cpp +++ b/src/utils/translation/poparser.cpp @@ -24,6 +24,8 @@ #include "utils/stringutils.h" +#include "utils/translation/podict.h" + #include "logger.h" #include "debug.h" diff --git a/src/utils/translation/poparser.h b/src/utils/translation/poparser.h index 08a6ac7b1..41598442b 100644 --- a/src/utils/translation/poparser.h +++ b/src/utils/translation/poparser.h @@ -21,13 +21,13 @@ #ifndef UTILS_TRANSLATION_POPARSER_H #define UTILS_TRANSLATION_POPARSER_H -#include "utils/translation/podict.h" - #include "localconsts.h" #include <sstream> #include <string> +class PoDict; + class PoParser final { public: diff --git a/src/utils/xml.h b/src/utils/xml.h index 48d60cda7..d8a281045 100644 --- a/src/utils/xml.h +++ b/src/utils/xml.h @@ -23,8 +23,8 @@ #ifndef UTILS_XML_H #define UTILS_XML_H -#include <libxml/xmlwriter.h> #include <libxml/tree.h> +#include <libxml/xmlwriter.h> #include <string> |