summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-19 22:50:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-19 22:50:16 +0300
commitc65cb0d97fbaa37f531d6fb47ce9d798b001b637 (patch)
treecce1030add4a837913b9e730a5550a67d03d236e /src
parent3d236906de18c846aa052f1d4cef1b0686a43854 (diff)
downloadplus-c65cb0d97fbaa37f531d6fb47ce9d798b001b637.tar.gz
plus-c65cb0d97fbaa37f531d6fb47ce9d798b001b637.tar.bz2
plus-c65cb0d97fbaa37f531d6fb47ce9d798b001b637.tar.xz
plus-c65cb0d97fbaa37f531d6fb47ce9d798b001b637.zip
fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/actormanager.cpp9
-rw-r--r--src/actormanager.h2
-rw-r--r--src/animatedsprite_unittest.cc1
-rw-r--r--src/being/actorsprite.h7
-rw-r--r--src/being/being.cpp12
-rw-r--r--src/being/localplayer.cpp1
-rw-r--r--src/commands.h1
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/events/mousebutton.h2
-rw-r--r--src/events/mouseeventtype.h2
-rw-r--r--src/gui/gui.cpp1
-rw-r--r--src/gui/popups/itempopup.cpp1
-rw-r--r--src/gui/popups/itempopup.h3
-rw-r--r--src/gui/skin.cpp3
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/widgets/avatarlistbox.cpp1
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/checkbox.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/guitable.cpp1
-rw-r--r--src/gui/widgets/inttextfield.cpp1
-rw-r--r--src/gui/widgets/itemcontainer.cpp1
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp2
-rw-r--r--src/gui/widgets/listbox.cpp1
-rw-r--r--src/gui/widgets/playerbox.h2
-rw-r--r--src/gui/widgets/progressbar.h2
-rw-r--r--src/gui/widgets/radiobutton.cpp2
-rw-r--r--src/gui/widgets/scrollarea.cpp1
-rw-r--r--src/gui/widgets/slider.cpp2
-rw-r--r--src/gui/widgets/tabbedarea.cpp1
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp3
-rw-r--r--src/gui/widgets/tabs/socialfriendsfunctor.h2
-rw-r--r--src/gui/widgets/tabs/tab.cpp1
-rw-r--r--src/gui/widgets/textbox.cpp1
-rw-r--r--src/gui/widgets/textfield.cpp1
-rw-r--r--src/gui/widgets/window.h2
-rw-r--r--src/gui/windows/charcreatedialog.cpp2
-rw-r--r--src/gui/windows/charselectdialog.cpp1
-rw-r--r--src/gui/windows/editserverdialog.cpp1
-rw-r--r--src/gui/windows/logindialog.cpp1
-rw-r--r--src/gui/windows/quitdialog.cpp1
-rw-r--r--src/gui/windows/registerdialog.cpp1
-rw-r--r--src/gui/windows/serverdialog.cpp1
-rw-r--r--src/gui/windows/updaterwindow.cpp1
-rw-r--r--src/gui/windows/worldselectdialog.cpp3
-rw-r--r--src/input/inputmanager.h3
-rw-r--r--src/input/keyboarddata.h1
-rw-r--r--src/itemsoundmanager.h2
-rw-r--r--src/net/eathena/generalhandler.cpp2
-rw-r--r--src/net/tmwa/generalhandler.cpp2
-rw-r--r--src/particle/particlecontainer.cpp2
-rw-r--r--src/particle/particlevector.cpp2
-rw-r--r--src/render/graphics.h5
-rw-r--r--src/render/mobileopenglgraphics.cpp1
-rw-r--r--src/render/normalopenglgraphics.cpp1
-rw-r--r--src/render/nullopenglgraphics.cpp1
-rw-r--r--src/render/safeopenglgraphics.cpp1
-rw-r--r--src/render/sdl2graphics.cpp1
-rw-r--r--src/render/sdl2softwaregraphics.cpp1
-rw-r--r--src/render/sdlgraphics.cpp1
-rw-r--r--src/render/surfacegraphics.cpp1
-rw-r--r--src/resources/action.cpp3
-rw-r--r--src/resources/action.h2
-rw-r--r--src/resources/animation.h2
-rw-r--r--src/resources/beinginfo.cpp2
-rw-r--r--src/resources/beinginfo.h8
-rw-r--r--src/resources/db/emotedb.h5
-rw-r--r--src/resources/db/itemdb.cpp3
-rw-r--r--src/resources/db/itemdb.h7
-rw-r--r--src/resources/dye.cpp3
-rw-r--r--src/resources/dye.h3
-rw-r--r--src/resources/dye_unittest.cc2
-rw-r--r--src/resources/dyepalette.cpp1
-rw-r--r--src/resources/imagehelper.h2
-rw-r--r--src/resources/iteminfo.cpp11
-rw-r--r--src/resources/iteminfo.h1
-rw-r--r--src/resources/itemslot.h2
-rw-r--r--src/resources/itemsoundevent.h2
-rw-r--r--src/resources/map/map.cpp2
-rw-r--r--src/resources/map/map.h2
-rw-r--r--src/resources/mapreader.cpp6
-rw-r--r--src/resources/openglimagehelper.cpp1
-rw-r--r--src/resources/spriteaction.h2
-rw-r--r--src/resources/spritedef.cpp3
-rw-r--r--src/resources/spritedef.h2
-rw-r--r--src/resources/spritedirection.h2
-rw-r--r--src/resources/textureatlas.h2
-rw-r--r--src/text.cpp1
-rw-r--r--src/touchmanager.cpp2
-rw-r--r--src/touchmanager.h1
90 files changed, 113 insertions, 92 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 518a65553..56a04fe55 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -317,7 +317,8 @@ Being *ActorManager::findBeingByPixel(const int x, const int y,
return nullptr;
const bool targetDead = mTargetDeadPlayers;
- const bool modActive = inputManager.isActionActive(InputAction::STOP_ATTACK);
+ const bool modActive = inputManager.isActionActive(
+ InputAction::STOP_ATTACK);
if (mExtMouseTargeting)
{
@@ -427,7 +428,8 @@ void ActorManager::findBeingsByPixel(std::vector<ActorSprite*> &beings,
const int xtol = mapTileSize / 2;
const int uptol = mapTileSize;
- const bool modActive = inputManager.isActionActive(InputAction::STOP_ATTACK);
+ const bool modActive = inputManager.isActionActive(
+ InputAction::STOP_ATTACK);
for_actors
{
@@ -875,7 +877,8 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing,
const bool filtered = config.getBoolValue("enableAttackFilter")
&& type == ActorType::MONSTER;
- const bool modActive = inputManager.isActionActive(InputAction::STOP_ATTACK);
+ const bool modActive = inputManager.isActionActive(
+ InputAction::STOP_ATTACK);
bool ignoreDefault = false;
if (filtered)
diff --git a/src/actormanager.h b/src/actormanager.h
index a44e3fc79..5c089b377 100644
--- a/src/actormanager.h
+++ b/src/actormanager.h
@@ -27,6 +27,8 @@
#include "listeners/configlistener.h"
+#include "utils/stringvector.h"
+
#include "localconsts.h"
class Being;
diff --git a/src/animatedsprite_unittest.cc b/src/animatedsprite_unittest.cc
index 9fc927efd..3e1695d10 100644
--- a/src/animatedsprite_unittest.cc
+++ b/src/animatedsprite_unittest.cc
@@ -27,6 +27,7 @@
#include "resources/animation.h"
#include "resources/resourcemanager.h"
#include "resources/sdlimagehelper.h"
+#include "resources/spriteaction.h"
#include "gtest/gtest.h"
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h
index a89d605bd..7447675a1 100644
--- a/src/being/actorsprite.h
+++ b/src/being/actorsprite.h
@@ -22,10 +22,6 @@
#ifndef BEING_ACTORSPRITE_H
#define BEING_ACTORSPRITE_H
-#include "localconsts.h"
-
-#include "resources/spritedisplay.h"
-
#include "resources/map/blocktype.h"
#include "resources/map/mapconsts.h"
@@ -35,7 +31,6 @@
#include "being/targetcursorsize.h"
#include "being/targetcursortype.h"
-#include "particle/particlecontainer.h"
#include "particle/particlelist.h"
#include "particle/particlevector.h"
@@ -48,6 +43,8 @@ class AnimatedSprite;
class StatusEffect;
class ActorSpriteListener;
+struct SpriteDisplay;
+
class ActorSprite : public CompoundSprite, public Actor
{
public:
diff --git a/src/being/being.cpp b/src/being/being.cpp
index e4205a727..2fd83c7b5 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -756,8 +756,11 @@ void Being::handleAttack(Being *const victim, const int damage,
if (!weaponId)
weaponId = -100 - mSubType;
const ItemInfo &info = ItemDB::get(weaponId);
- playSfx(info.getSound((damage > 0) ?
- ItemSoundEvent::HIT : ItemSoundEvent::MISS), victim, true, mX, mY);
+ playSfx(info.getSound(
+ (damage > 0) ? ItemSoundEvent::HIT : ItemSoundEvent::MISS),
+ victim,
+ true,
+ mX, mY);
}
}
else
@@ -1209,7 +1212,10 @@ void Being::setAction(const BeingAction::Action &action, const int attackId)
currentAction = getDeadAction();
if (mInfo)
{
- playSfx(mInfo->getSound(ItemSoundEvent::DIE), this, false, mX, mY);
+ playSfx(mInfo->getSound(ItemSoundEvent::DIE),
+ this,
+ false,
+ mX, mY);
if (mType == ActorType::MONSTER || mType == ActorType::NPC)
mYDiff = mInfo->getDeadSortOffsetY();
}
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 4e6b7615e..73c3f40ec 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -78,7 +78,6 @@
#include "resources/map/speciallayer.h"
#include "listeners/awaylistener.h"
-#include "listeners/updatestatuslistener.h"
#include "utils/delete2.h"
#include "utils/gettext.h"
diff --git a/src/commands.h b/src/commands.h
index 807f0ef06..2526995f8 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -24,7 +24,6 @@
#define COMMANDS_H
#include "input/inputaction.h"
-#include "input/keydata.h"
#include <string>
diff --git a/src/defaults.cpp b/src/defaults.cpp
index c39c3abd0..f34220c0b 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -27,7 +27,6 @@
#include "being/beingspeech.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "render/graphics.h"
diff --git a/src/events/mousebutton.h b/src/events/mousebutton.h
index af79c4279..dfbad9647 100644
--- a/src/events/mousebutton.h
+++ b/src/events/mousebutton.h
@@ -77,6 +77,6 @@ namespace MouseButton
RIGHT,
MIDDLE
};
-}
+} // namespace MouseButton
#endif // EVENTS_MOUSEBUTTON_H
diff --git a/src/events/mouseeventtype.h b/src/events/mouseeventtype.h
index b16c80c49..4804097ee 100644
--- a/src/events/mouseeventtype.h
+++ b/src/events/mouseeventtype.h
@@ -82,6 +82,6 @@ namespace MouseEventType
DRAGGED,
RELEASED2 = 100
};
-} // namespace
+} // namespace MouseEventType
#endif // EVENTS_MOUSEEVENTTYPE_H
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 441f59d95..c7d7fd8a1 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -88,7 +88,6 @@
#include "listeners/mouselistener.h"
#include "input/inputmanager.h"
-#include "input/keydata.h"
#include "input/keyinput.h"
#include "input/mouseinput.h"
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index c07f99367..99418881f 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -38,6 +38,7 @@
#include "utils/gettext.h"
#include "resources/image.h"
+#include "resources/iteminfo.h"
#include "resources/resourcemanager.h"
#include "debug.h"
diff --git a/src/gui/popups/itempopup.h b/src/gui/popups/itempopup.h
index 7f65f23da..aa40181f4 100644
--- a/src/gui/popups/itempopup.h
+++ b/src/gui/popups/itempopup.h
@@ -26,10 +26,11 @@
#include "gui/widgets/popup.h"
-#include "resources/iteminfo.h"
+#include "resources/itemtype.h"
class Icon;
class Item;
+class ItemInfo;
class Label;
class TextBox;
diff --git a/src/gui/skin.cpp b/src/gui/skin.cpp
index 5f7ed2be2..28a1ea558 100644
--- a/src/gui/skin.cpp
+++ b/src/gui/skin.cpp
@@ -27,8 +27,7 @@
#include "client.h"
#include "resources/image.h"
-
-#include "render/graphics.h"
+#include "resources/imagerect.h"
#include "utils/delete2.h"
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 5e1c6e4c8..eb7973bbb 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -30,9 +30,9 @@
#include "gui/skin.h"
#include "gui/themeinfo.h"
-#include "resources/dye.h"
#include "resources/dyepalette.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "resources/resourcemanager.h"
#include "utils/dtor.h"
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 41a190daa..9a7ed36dc 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -41,7 +41,6 @@
#include "resources/mapitemtype.h"
#include "resources/map/map.h"
-#include "resources/map/mapitem.h"
#include "debug.h"
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 661dfc66d..f9ea17516 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -71,10 +71,10 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "resources/image.h"
#include "resources/imageset.h"
+#include "resources/imagerect.h"
#include "gui/gui.h"
#include "gui/skin.h"
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index 48f603532..86ebefd60 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -68,9 +68,9 @@
#include "client.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "gui/gui.h"
#include "gui/skin.h"
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 71e546faa..dec4e88c6 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -27,7 +27,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/gui.h"
#include "gui/skin.h"
@@ -39,6 +38,7 @@
#include "gui/widgets/popuplist.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include <algorithm>
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index ba2c36713..5374e8a7c 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -29,7 +29,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "listeners/guitableactionlistener.h"
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index fcec92a39..c2d84c66a 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -29,7 +29,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "utils/stringutils.h"
#include "debug.h"
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 1be268d56..ef00913e7 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -48,6 +48,7 @@
#include "utils/gettext.h"
#include "resources/image.h"
+#include "resources/iteminfo.h"
#include "listeners/selectionlistener.h"
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index 54078a172..e5c6c06b3 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -37,8 +37,6 @@
#include "listeners/openurllistener.h"
-#include "input/mouseinput.h"
-
#include <string>
#include "debug.h"
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index ab5e8dccb..87a9f43cc 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -68,7 +68,6 @@
#include "client.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "listeners/selectionlistener.h"
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index 398ebb7b9..0ffddeeac 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -27,6 +27,8 @@
#include "listeners/mouselistener.h"
+#include "resources/imagerect.h"
+
#include "localconsts.h"
class Being;
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index e45bc4abb..5f425d004 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -27,6 +27,8 @@
#include "listeners/widgetlistener.h"
+#include "resources/imagerect.h"
+
#include <string>
#include "localconsts.h"
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 87621e945..d2d12f1c6 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -68,9 +68,9 @@
#include "client.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "gui/gui.h"
#include "gui/skin.h"
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 52d3df152..ca29c09fa 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -72,6 +72,7 @@
#include "gui/skin.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "utils/delete2.h"
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 848027c94..c660648d8 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -71,11 +71,11 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/gui.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "utils/delete2.h"
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 81cf34dd2..36e3aa093 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -68,7 +68,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/gui.h"
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 97aa7421f..9aaed0aef 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -215,7 +215,8 @@ void Setup_Input::action(const ActionEvent &event)
inputManager.setNewKeyIndex(ik);
refreshAssignedKey(mKeyList->getSelected());
inputManager.unassignKey();
- inputManager.setNewKeyIndex(static_cast<int>(InputAction::NO_VALUE));
+ inputManager.setNewKeyIndex(static_cast<int>(
+ InputAction::NO_VALUE));
}
mAssignKeyButton->setEnabled(true);
}
diff --git a/src/gui/widgets/tabs/socialfriendsfunctor.h b/src/gui/widgets/tabs/socialfriendsfunctor.h
index 1ad209adb..f8d110ed9 100644
--- a/src/gui/widgets/tabs/socialfriendsfunctor.h
+++ b/src/gui/widgets/tabs/socialfriendsfunctor.h
@@ -23,6 +23,8 @@
#include "avatar.h"
+#include "utils/stringutils.h"
+
#include "localconsts.h"
class SortFriendsFunctor final
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index c88a47033..2ad0e8ac8 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -75,6 +75,7 @@
#include "gui/widgets/tabbedarea.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "utils/delete2.h"
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 23fa63a07..d85f07b5d 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -66,7 +66,6 @@
#include "gui/widgets/textbox.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/gui.h"
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 14faad2f0..72ff8ea87 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -78,6 +78,7 @@
#include "gui/popups/popupmenu.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "utils/copynpaste.h"
#include "utils/delete2.h"
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index a14f960cd..fea0883cf 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -73,6 +73,8 @@
#include "gui/widgets/basiccontainer2.h"
+#include "resources/imagerect.h"
+
#include "localconsts.h"
class ContainerPlacer;
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index e8f92e343..90b966259 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -27,7 +27,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/windows/okdialog.h"
@@ -44,6 +43,7 @@
#include "resources/iteminfo.h"
#include "resources/db/chardb.h"
+#include "resources/db/colordb.h"
#include "resources/db/itemdb.h"
#include "utils/gettext.h"
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 73ebb90b6..4ed5075a6 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -29,7 +29,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "being/attributes.h"
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index da0de7026..9cc6d863f 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -24,7 +24,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/models/typelistmodel.h"
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index f03507320..101f547f0 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -28,7 +28,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "listeners/openurllistener.h"
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index c34801c8e..0a9a222cd 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -31,7 +31,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/viewport.h"
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 3a906b00e..b396f591f 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -27,7 +27,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "listeners/wrongdatanoticelistener.h"
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 5a0bf0478..cc0a4f184 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -30,7 +30,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/gui.h"
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 475144f61..2735f85dc 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -28,7 +28,6 @@
#include "events/keyevent.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/widgets/browserbox.h"
#include "gui/widgets/button.h"
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index f81f14399..6a3dfb7a1 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -24,10 +24,7 @@
#include "client.h"
-#include "events/keyevent.h"
-
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/widgets/button.h"
#include "gui/widgets/layout.h"
diff --git a/src/input/inputmanager.h b/src/input/inputmanager.h
index 6b0634a96..ee5f101a8 100644
--- a/src/input/inputmanager.h
+++ b/src/input/inputmanager.h
@@ -23,7 +23,8 @@
#include "input/inputaction.h"
#include "input/keyfunction.h"
-#include "input/keydata.h"
+
+#include "events/inputevent.h"
#include <string>
#include <map>
diff --git a/src/input/keyboarddata.h b/src/input/keyboarddata.h
index 5d02e1dab..636aa9268 100644
--- a/src/input/keyboarddata.h
+++ b/src/input/keyboarddata.h
@@ -30,6 +30,7 @@
#include "input/inputcondition.h"
#include "input/inputmanager.h"
#include "input/inputtype.h"
+#include "input/keydata.h"
#include "utils/gettext.h"
diff --git a/src/itemsoundmanager.h b/src/itemsoundmanager.h
index 4cc738724..28037ca07 100644
--- a/src/itemsoundmanager.h
+++ b/src/itemsoundmanager.h
@@ -21,7 +21,7 @@
#ifndef ITEMSOUNDMANAGER_H
#define ITEMSOUNDMANAGER_H
-#include "resources/soundinfo.h"
+#include "resources/itemsoundevent.h"
#include "localconsts.h"
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 8a96bde05..7768a1571 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -56,6 +56,8 @@
#include "net/eathena/tradehandler.h"
#include "net/eathena/skillhandler.h"
+#include "resources/db/itemdbstat.h"
+
#include "utils/gettext.h"
#include "debug.h"
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 9fd4eb78e..32f6c37ed 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -58,6 +58,8 @@
#include "net/tmwa/skillhandler.h"
#include "net/tmwa/questhandler.h"
+#include "resources/db/itemdbstat.h"
+
#include "utils/gettext.h"
#include "debug.h"
diff --git a/src/particle/particlecontainer.cpp b/src/particle/particlecontainer.cpp
index c537a163b..a2b0f29a9 100644
--- a/src/particle/particlecontainer.cpp
+++ b/src/particle/particlecontainer.cpp
@@ -22,8 +22,6 @@
#include "particle/particlecontainer.h"
-#include "particle/particle.h"
-
#include "utils/delete2.h"
#include "debug.h"
diff --git a/src/particle/particlevector.cpp b/src/particle/particlevector.cpp
index 3a0b7f3f6..99217996a 100644
--- a/src/particle/particlevector.cpp
+++ b/src/particle/particlevector.cpp
@@ -23,8 +23,6 @@
#include "particle/particle.h"
#include "particle/particlevector.h"
-#include "utils/delete2.h"
-
#include "debug.h"
ParticleVector::ParticleVector(ParticleContainer *const parent,
diff --git a/src/render/graphics.h b/src/render/graphics.h
index d7cebec09..d26f8a770 100644
--- a/src/render/graphics.h
+++ b/src/render/graphics.h
@@ -72,11 +72,9 @@
#include "gui/color.h"
-#include "render/renderers.h"
-
#include "gui/cliprect.h"
-#include "resources/imagerect.h"
+#include "render/rendertype.h"
#ifdef USE_SDL2
#include <SDL_render.h>
@@ -97,6 +95,7 @@
class Image;
class ImageCollection;
+class ImageRect;
class ImageVertexes;
struct SDL_Window;
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index dcb34ffd5..58760ce60 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -34,6 +34,7 @@
#include "render/mgl.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "resources/openglimagehelper.h"
#include "utils/sdlcheckutils.h"
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index 7130e2914..c8fe89c89 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -33,6 +33,7 @@
#include "render/mgl.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "resources/openglimagehelper.h"
#include "utils/sdlcheckutils.h"
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp
index 866eb14a3..40a952db8 100644
--- a/src/render/nullopenglgraphics.cpp
+++ b/src/render/nullopenglgraphics.cpp
@@ -29,6 +29,7 @@
#include "graphicsvertexes.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "resources/openglimagehelper.h"
#include "debug.h"
diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp
index fcf4a7e68..58ab99923 100644
--- a/src/render/safeopenglgraphics.cpp
+++ b/src/render/safeopenglgraphics.cpp
@@ -31,6 +31,7 @@
#include "render/mgl.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "resources/openglimagehelper.h"
#include "utils/sdlcheckutils.h"
diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp
index 25a689ddf..38ddfe8d5 100644
--- a/src/render/sdl2graphics.cpp
+++ b/src/render/sdl2graphics.cpp
@@ -76,6 +76,7 @@
#include "resources/image.h"
#include "resources/imagehelper.h"
+#include "resources/imagerect.h"
#include "resources/sdl2imagehelper.h"
#include "utils/sdlcheckutils.h"
diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp
index e5943f7c7..2efc5772e 100644
--- a/src/render/sdl2softwaregraphics.cpp
+++ b/src/render/sdl2softwaregraphics.cpp
@@ -33,6 +33,7 @@
#include "resources/image.h"
#include "resources/imagehelper.h"
+#include "resources/imagerect.h"
#include "resources/sdl2softwareimagehelper.h"
#include "utils/sdlcheckutils.h"
diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp
index 8720b4dc9..3581a526d 100644
--- a/src/render/sdlgraphics.cpp
+++ b/src/render/sdlgraphics.cpp
@@ -34,6 +34,7 @@
#include "utils/sdlpixel.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "debug.h"
diff --git a/src/render/surfacegraphics.cpp b/src/render/surfacegraphics.cpp
index e6aee752f..2bd59889f 100644
--- a/src/render/surfacegraphics.cpp
+++ b/src/render/surfacegraphics.cpp
@@ -25,6 +25,7 @@
#include "main.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "resources/surfaceimagehelper.h"
#include "debug.h"
diff --git a/src/resources/action.cpp b/src/resources/action.cpp
index 8576ffab8..c7ae94984 100644
--- a/src/resources/action.cpp
+++ b/src/resources/action.cpp
@@ -46,7 +46,8 @@ const Animation *Action::getAnimation(SpriteDirection::Type direction)
if (i == mAnimations.end())
{
- if (direction == SpriteDirection::UPLEFT || direction == SpriteDirection::UPRIGHT)
+ if (direction == SpriteDirection::UPLEFT
+ || direction == SpriteDirection::UPRIGHT)
{
direction = SpriteDirection::UP;
}
diff --git a/src/resources/action.h b/src/resources/action.h
index 2571508d3..86a3740d1 100644
--- a/src/resources/action.h
+++ b/src/resources/action.h
@@ -23,7 +23,7 @@
#ifndef RESOURCES_ACTION_H
#define RESOURCES_ACTION_H
-#include "resources/spritedef.h"
+#include "resources/spritedirection.h"
#include <map>
diff --git a/src/resources/animation.h b/src/resources/animation.h
index 964bcc23f..39154f4f5 100644
--- a/src/resources/animation.h
+++ b/src/resources/animation.h
@@ -32,8 +32,6 @@
class Image;
-struct Frame;
-
/**
* An animation consists of several frames, each with their own delay and
* offset.
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index a35cb5805..757de8238 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -29,6 +29,8 @@
#include "resources/spriteaction.h"
#include "resources/spritereference.h"
+#include "resources/db/colordb.h"
+
#include "resources/map/blockmask.h"
#include "utils/delete2.h"
diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h
index a5ea837ff..efac5cc3a 100644
--- a/src/resources/beinginfo.h
+++ b/src/resources/beinginfo.h
@@ -28,17 +28,19 @@
#include "being/targetcursorsize.h"
#include "resources/soundinfo.h"
-#include "resources/spritedef.h"
#include "resources/spritedisplay.h"
-#include "resources/db/colordb.h"
-
#include "resources/map/blocktype.h"
#include <map>
struct Attack;
+namespace ColorDB
+{
+ class ItemColor;
+}
+
typedef std::map<int, Attack*> Attacks;
/**
diff --git a/src/resources/db/emotedb.h b/src/resources/db/emotedb.h
index 699ea7732..cc769801b 100644
--- a/src/resources/db/emotedb.h
+++ b/src/resources/db/emotedb.h
@@ -22,15 +22,10 @@
#ifndef RESOURCES_DB_EMOTEDB_H
#define RESOURCES_DB_EMOTEDB_H
-#include "utils/stringvector.h"
-
-#include <list>
#include <map>
#include "localconsts.h"
-class AnimatedSprite;
-
struct EmoteInfo;
struct EmoteSprite;
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index f20db0c76..4987fb5ae 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -29,8 +29,11 @@
#include "resources/beingcommon.h"
#include "resources/iteminfo.h"
+#include "resources/spritedef.h"
#include "resources/spritereference.h"
+#include "resources/db/itemdbstat.h"
+
#include "utils/delete2.h"
#include "utils/dtor.h"
#include "utils/gettext.h"
diff --git a/src/resources/db/itemdb.h b/src/resources/db/itemdb.h
index 5328ecc59..5491e3ad4 100644
--- a/src/resources/db/itemdb.h
+++ b/src/resources/db/itemdb.h
@@ -25,14 +25,17 @@
#include "utils/stringvector.h"
-#include "resources/db/itemdbstat.h"
-
#include <map>
#include "localconsts.h"
class ItemInfo;
+namespace ItemDB
+{
+ struct Stat;
+}
+
/**
* Item information database.
*/
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp
index 3f6929c5c..ea66b2b6b 100644
--- a/src/resources/dye.cpp
+++ b/src/resources/dye.cpp
@@ -26,11 +26,8 @@
#include "resources/dyepalette.h"
-#include "resources/db/palettedb.h"
-
#include "utils/delete2.h"
-#include <cmath>
#include <sstream>
#include <SDL_endian.h>
diff --git a/src/resources/dye.h b/src/resources/dye.h
index ad2253ea3..63b1d0352 100644
--- a/src/resources/dye.h
+++ b/src/resources/dye.h
@@ -23,10 +23,7 @@
#ifndef RESOURCES_DYE_H
#define RESOURCES_DYE_H
-#include "resources/dyecolor.h"
-
#include <string>
-#include <vector>
#include "localconsts.h"
diff --git a/src/resources/dye_unittest.cc b/src/resources/dye_unittest.cc
index 6581298d3..2dfac7c52 100644
--- a/src/resources/dye_unittest.cc
+++ b/src/resources/dye_unittest.cc
@@ -20,6 +20,8 @@
#include "resources/dye.h"
+#include "resources/dyepalette.h"
+
#include "gtest/gtest.h"
#include "debug.h"
diff --git a/src/resources/dyepalette.cpp b/src/resources/dyepalette.cpp
index ab1e2c2f2..f20af9086 100644
--- a/src/resources/dyepalette.cpp
+++ b/src/resources/dyepalette.cpp
@@ -27,7 +27,6 @@
#include "resources/db/palettedb.h"
#include <cmath>
-#include <sstream>
#include <SDL_endian.h>
diff --git a/src/resources/imagehelper.h b/src/resources/imagehelper.h
index f68d8c147..f87c17ef2 100644
--- a/src/resources/imagehelper.h
+++ b/src/resources/imagehelper.h
@@ -25,7 +25,7 @@
#include "localconsts.h"
-#include "render/renderers.h"
+#include "render/rendertype.h"
#include "resources/resource.h"
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index 6dbb90d2a..ca5d122b7 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -23,6 +23,7 @@
#include "resources/iteminfo.h"
#include "resources/spriteaction.h"
+#include "resources/spritedef.h"
#include "resources/map/mapconsts.h"
@@ -249,11 +250,17 @@ const SpriteToItemMap *ItemInfo::getSpriteToItemReplaceMap(const int direction)
SpriteToItemMap *const spMap = mSpriteToItemReplaceMap[direction];
if (spMap)
return spMap;
- if (direction == SpriteDirection::UPLEFT || direction == SpriteDirection::UPRIGHT)
+ if (direction == SpriteDirection::UPLEFT
+ || direction == SpriteDirection::UPRIGHT)
+ {
return mSpriteToItemReplaceMap[SpriteDirection::UP];
+ }
- if (direction == SpriteDirection::DOWNLEFT || direction == SpriteDirection::DOWNRIGHT)
+ if (direction == SpriteDirection::DOWNLEFT
+ || direction == SpriteDirection::DOWNRIGHT)
+ {
return mSpriteToItemReplaceMap[SpriteDirection::DOWN];
+ }
return nullptr;
}
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 233ef0dfa..eb22b10d5 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -28,7 +28,6 @@
#include "resources/cursor.h"
#include "resources/itemtype.h"
#include "resources/soundinfo.h"
-#include "resources/spritedef.h"
#include "resources/spritedisplay.h"
#include <map>
diff --git a/src/resources/itemslot.h b/src/resources/itemslot.h
index 187eb139f..f1333197a 100644
--- a/src/resources/itemslot.h
+++ b/src/resources/itemslot.h
@@ -54,6 +54,6 @@ namespace ItemSlot
// indicates the chosen projectile.
PROJECTILE_SLOT = 10
};
-}
+} // namespace ItemSlot
#endif // RESOURCES_ITEMSLOT_H
diff --git a/src/resources/itemsoundevent.h b/src/resources/itemsoundevent.h
index a33caa076..4c3a64f59 100644
--- a/src/resources/itemsoundevent.h
+++ b/src/resources/itemsoundevent.h
@@ -41,6 +41,6 @@ namespace ItemSoundEvent
UNEQUIP,
USE
};
-}
+} // namespace ItemSoundEvent
#endif // RESOURCES_ITEMSOUNDEVENT_H
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index d6fc7db8e..829c6b3cf 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -51,6 +51,8 @@
#include "resources/map/mapobjectlist.h"
#include "resources/map/tileanimation.h"
+#include "render/renderers.h"
+
#include "utils/delete2.h"
#include "utils/dtor.h"
#include "utils/mkdir.h"
diff --git a/src/resources/map/map.h b/src/resources/map/map.h
index 095f97bdf..82783e4bc 100644
--- a/src/resources/map/map.h
+++ b/src/resources/map/map.h
@@ -33,7 +33,7 @@
#include "listeners/configlistener.h"
-#include "render/renderers.h"
+#include "render/rendertype.h"
#include <string>
#include <vector>
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index cc8b14a30..3a9a384bd 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -41,7 +41,6 @@
#include "resources/db/mapdb.h"
-#include "resources/map/mapitem.h"
#include "resources/map/tileanimation.h"
#include "utils/base64.h"
@@ -428,8 +427,9 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
}
else if (objType == "SPAWN")
{
-// map->addPortal(_("Spawn: ") + objName, MapItemType::PORTAL,
-// objX, objY, objW, objH);
+// map->addPortal(_("Spawn: ") + objName,
+// MapItemType::PORTAL,
+// objX, objY, objW, objH);
}
else if (objType == "MUSIC")
{
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index 33330c568..7c4e08501 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -30,7 +30,6 @@
#include "render/mgl.h"
#include "render/mobileopenglgraphics.h"
#include "render/normalopenglgraphics.h"
-#include "render/renderers.h"
#include "render/safeopenglgraphics.h"
#include "resources/dye.h"
diff --git a/src/resources/spriteaction.h b/src/resources/spriteaction.h
index 3009f4661..31ee4c0b4 100644
--- a/src/resources/spriteaction.h
+++ b/src/resources/spriteaction.h
@@ -23,6 +23,8 @@
#ifndef RESOURCES_SPRITEACTION_H
#define RESOURCES_SPRITEACTION_H
+#include <string>
+
/*
* Remember those are the main action.
* Action subtypes, e.g.: "attack_bow" are to be passed by items.xml after
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index e7a751feb..74ac376b5 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -281,7 +281,8 @@ void SpriteDef::loadAnimation(const XmlNodePtr animationNode,
const std::string directionName =
XML::getProperty(animationNode, "direction", "");
- const SpriteDirection::Type directionType = makeSpriteDirection(directionName);
+ const SpriteDirection::Type directionType
+ = makeSpriteDirection(directionName);
if (directionType == SpriteDirection::INVALID)
{
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index 7e31fe1da..5bbfe81bd 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -27,10 +27,8 @@
#include "resources/spritedirection.h"
-#include "utils/stringvector.h"
#include "utils/xml.h"
-#include <list>
#include <map>
#include <set>
diff --git a/src/resources/spritedirection.h b/src/resources/spritedirection.h
index 17fd6e980..0d002efb8 100644
--- a/src/resources/spritedirection.h
+++ b/src/resources/spritedirection.h
@@ -38,6 +38,6 @@ namespace SpriteDirection
DOWNRIGHT = 8,
INVALID
};
-}
+} // namespace SpriteDirection
#endif // RESOURCES_SPRITEDIRECTION_H
diff --git a/src/resources/textureatlas.h b/src/resources/textureatlas.h
index 457cc5e39..11a45a5d3 100644
--- a/src/resources/textureatlas.h
+++ b/src/resources/textureatlas.h
@@ -29,6 +29,8 @@
#include <SDL.h>
+#include "localconsts.h"
+
class AtlasResource;
class Image;
class Resource;
diff --git a/src/text.cpp b/src/text.cpp
index bae0bd6dc..51424f8ec 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -32,6 +32,7 @@
#include "gui/fonts/font.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "utils/delete2.h"
diff --git a/src/touchmanager.cpp b/src/touchmanager.cpp
index aa5871057..adf1e4809 100644
--- a/src/touchmanager.cpp
+++ b/src/touchmanager.cpp
@@ -34,10 +34,12 @@
#include "input/inputmanager.h"
#include "render/graphics.h"
+#include "render/renderers.h"
#include "gui/theme.h"
#include "resources/image.h"
+#include "resources/imagerect.h"
#include "utils/delete2.h"
diff --git a/src/touchmanager.h b/src/touchmanager.h
index 6033dc951..4073b7e61 100644
--- a/src/touchmanager.h
+++ b/src/touchmanager.h
@@ -24,7 +24,6 @@
#include "listeners/configlistener.h"
#include "input/inputaction.h"
-#include "input/keydata.h"
#include "gui/rect.h"