summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions/chat.cpp2
-rw-r--r--src/actormanager.cpp1
-rw-r--r--src/being/being.cpp7
-rw-r--r--src/being/being.h1
-rw-r--r--src/client.cpp1
-rw-r--r--src/client.h1
-rw-r--r--src/dirs.cpp4
-rw-r--r--src/dyetool/gui/viewport.cpp4
-rw-r--r--src/enums/resources/imageposition.h8
-rw-r--r--src/enums/resources/questtype.h6
-rw-r--r--src/eventsmanager.cpp2
-rw-r--r--src/gui/popups/popupmenu.cpp3
-rw-r--r--src/gui/popups/textboxpopup.cpp2
-rw-r--r--src/gui/theme.h8
-rw-r--r--src/gui/themecolorsidoperators.h6
-rw-r--r--src/gui/viewport.cpp2
-rw-r--r--src/gui/widgets/basiccontainer.cpp2
-rw-r--r--src/gui/widgets/basiccontainer2.cpp2
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/button.h2
-rw-r--r--src/gui/widgets/checkbox.cpp8
-rw-r--r--src/gui/widgets/colorpage.cpp6
-rw-r--r--src/gui/widgets/desktop.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/emotepage.cpp2
-rw-r--r--src/gui/widgets/emotepage.h2
-rw-r--r--src/gui/widgets/extendedlistbox.cpp2
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/icon.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.h1
-rw-r--r--src/gui/widgets/label.h2
-rw-r--r--src/gui/widgets/listbox.cpp6
-rw-r--r--src/gui/widgets/playerbox.cpp2
-rw-r--r--src/gui/widgets/popup.cpp2
-rw-r--r--src/gui/widgets/popuplist.cpp2
-rw-r--r--src/gui/widgets/progressbar.cpp2
-rw-r--r--src/gui/widgets/radiobutton.cpp8
-rw-r--r--src/gui/widgets/scrollarea.cpp8
-rw-r--r--src/gui/widgets/shoplistbox.cpp2
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/slider.cpp4
-rw-r--r--src/gui/widgets/textbox.cpp2
-rw-r--r--src/gui/widgets/textfield.cpp16
-rw-r--r--src/gui/widgets/textpreview.cpp2
-rw-r--r--src/gui/widgets/window.h8
-rw-r--r--src/gui/windowmanager.cpp2
-rw-r--r--src/gui/windows/charcreatedialog.cpp2
-rw-r--r--src/input/touch/touchmanager.cpp14
-rw-r--r--src/net/charserverhandler.h7
-rw-r--r--src/net/ea/beingrecv.h2
-rw-r--r--src/net/ea/chatrecv.h2
-rw-r--r--src/net/ea/guildrecv.h2
-rw-r--r--src/net/ea/inventoryrecv.cpp2
-rw-r--r--src/net/ea/inventoryrecv.h2
-rw-r--r--src/net/ea/loginrecv.h2
-rw-r--r--src/net/ea/network.cpp2
-rw-r--r--src/net/ea/npcrecv.h2
-rw-r--r--src/net/ea/partyrecv.h2
-rw-r--r--src/net/ea/playerhandler.cpp13
-rw-r--r--src/net/ea/playerhandler.h5
-rw-r--r--src/net/ea/playerrecv.h3
-rw-r--r--src/net/eathena/battlegroundrecv.h2
-rw-r--r--src/net/eathena/beingrecv.h2
-rw-r--r--src/net/eathena/buyingstorerecv.h2
-rw-r--r--src/net/eathena/charserverrecv.h2
-rw-r--r--src/net/eathena/chatrecv.h2
-rw-r--r--src/net/eathena/inventoryrecv.cpp4
-rw-r--r--src/net/eathena/inventoryrecv.h2
-rw-r--r--src/net/eathena/mailrecv.h2
-rw-r--r--src/net/eathena/npcrecv.h2
-rw-r--r--src/net/eathena/partyrecv.h2
-rw-r--r--src/net/eathena/playerrecv.h2
-rw-r--r--src/net/eathena/skillrecv.h2
-rw-r--r--src/net/eathena/sp.h2
-rw-r--r--src/net/eathena/traderecv.h2
-rw-r--r--src/net/eathena/vendingrecv.h2
-rw-r--r--src/net/tmwa/beingrecv.h2
-rw-r--r--src/net/tmwa/charserverhandler.cpp2
-rw-r--r--src/net/tmwa/chatrecv.h2
-rw-r--r--src/net/tmwa/inventoryrecv.cpp2
-rw-r--r--src/net/tmwa/inventoryrecv.h2
-rw-r--r--src/net/tmwa/loginhandler.cpp2
-rw-r--r--src/net/tmwa/traderecv.h2
-rw-r--r--src/particle/textparticle.cpp2
-rw-r--r--src/render/graphics.h3
-rw-r--r--src/render/modernopenglgraphics.cpp1
-rw-r--r--src/resources/atlas/atlasmanager.h1
-rw-r--r--src/resources/beingcommon.cpp2
-rw-r--r--src/resources/db/npcdialogdb.cpp2
-rw-r--r--src/resources/mapreader.h1
-rw-r--r--src/resources/resourcemanager.h4
-rw-r--r--src/test/testlauncher.cpp2
-rw-r--r--src/test/testmain.cpp1
-rw-r--r--src/test/testmain.h7
-rw-r--r--src/utils/cpu.h2
-rw-r--r--src/utils/physfstools.cpp2
96 files changed, 180 insertions, 125 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index 62213c5cc..25ddb4e92 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -26,6 +26,8 @@
#include "const/gui/chat.h"
+#include "being/localplayer.h"
+
#include "gui/windows/chatwindow.h"
#include "net/charserverhandler.h"
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 5feb04a59..cf7884a9f 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -26,6 +26,7 @@
#include "configuration.h"
#include "settings.h"
+#include "being/localplayer.h"
#include "being/playerinfo.h"
#include "being/playerrelations.h"
diff --git a/src/being/being.cpp b/src/being/being.cpp
index c058380c1..f1617e64e 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -35,6 +35,7 @@
#include "being/beingcacheentry.h"
#include "being/beingflag.h"
#include "being/beingspeech.h"
+#include "being/localplayer.h"
#include "being/playerinfo.h"
#include "being/playerrelations.h"
@@ -187,7 +188,7 @@ Being::Being(const BeingId id,
mType(type),
mSpeechBubble(nullptr),
mWalkSpeed(playerHandler ? playerHandler->getDefaultWalkSpeed() : 1),
- mSpeed(playerHandler ? playerHandler->getDefaultWalkSpeed() : 0),
+ mSpeed(playerHandler ? playerHandler->getDefaultWalkSpeed() : 1),
mIp(),
mSpriteRemap(new int[20]),
mSpriteHide(new int[20]),
@@ -2164,12 +2165,12 @@ int Being::getOffset(const signed char pos,
const signed char neg) const restrict2
{
// Check whether we're walking in the requested direction
- if (mAction != BeingAction::MOVE || !(mDirection & (pos | neg)))
+ if (mAction != BeingAction::MOVE || !(mDirection & (pos | neg)))
return 0;
int offset = 0;
- if (mMap)
+ if (mMap && mSpeed)
{
const int time = get_elapsed_time(mActionTime);
offset = (pos == BeingDirection::LEFT &&
diff --git a/src/being/being.h b/src/being/being.h
index efac91bd4..585b59a43 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -1121,6 +1121,7 @@ class Being notfinal : public ActorSprite,
int mX; // position in tiles
int mY; // position in tiles
int mSortOffsetY; // caculated offset in pixels based on mOffsetY
+ // +++ need change name for fix conflict with CompoundSprite::mOffsetY
int mOffsetY; // tile height offset in pixels
// calculated between tiles
int mFixedOffsetY; // fixed tile height offset in pixels for tile
diff --git a/src/client.cpp b/src/client.cpp
index e9869e804..201700038 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -35,6 +35,7 @@
#include "statuseffect.h"
#include "units.h"
+#include "being/localplayer.h"
#include "being/playerinfo.h"
#include "being/playerrelations.h"
diff --git a/src/client.h b/src/client.h
index ab168140c..725cd724c 100644
--- a/src/client.h
+++ b/src/client.h
@@ -44,7 +44,6 @@
#include "localconsts.h"
class Button;
-class Desktop;
class Game;
class LoginData;
class Skin;
diff --git a/src/dirs.cpp b/src/dirs.cpp
index 5f99ebd0e..79ed197bf 100644
--- a/src/dirs.cpp
+++ b/src/dirs.cpp
@@ -195,7 +195,9 @@ void Dirs::mountDataDir()
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
char path[PATH_MAX];
- if (!CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (uint8_t*)path,
+ if (!CFURLGetFileSystemRepresentation(resourcesURL,
+ TRUE,
+ reinterpret_cast<uint8_t*>(path),
PATH_MAX))
{
fprintf(stderr, "Can't find Resources directory\n");
diff --git a/src/dyetool/gui/viewport.cpp b/src/dyetool/gui/viewport.cpp
index 48c79609c..d61d33998 100644
--- a/src/dyetool/gui/viewport.cpp
+++ b/src/dyetool/gui/viewport.cpp
@@ -20,7 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "gui/viewport.h"
+#include "dyetool/gui/viewport.h"
#include "configuration.h"
#include "sdlshared.h"
@@ -28,6 +28,8 @@
#include "gui/gui.h"
#include "gui/popupmanager.h"
+#include "render/graphics.h"
+
#include "debug.h"
Viewport *viewport = nullptr;
diff --git a/src/enums/resources/imageposition.h b/src/enums/resources/imageposition.h
index b06176947..ddff71fb4 100644
--- a/src/enums/resources/imageposition.h
+++ b/src/enums/resources/imageposition.h
@@ -20,8 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef ENUMS_RESOURCES_IMAGEPOSIITON_H
-#define ENUMS_RESOURCES_IMAGEPOSIITON_H
+#ifndef ENUMS_RESOURCES_IMAGEPOSITION_H
+#define ENUMS_RESOURCES_IMAGEPOSITION_H
#include "localconsts.h"
@@ -56,6 +56,6 @@ namespace ImagePosition
LOWER_CENTER = 7,
LOWER_RIGHT = 8
};
-} // namespace imagePosition
+} // namespace ImagePosition
-#endif // ENUMS_RESOURCES_IMAGEPOSIITON_H
+#endif // ENUMS_RESOURCES_IMAGEPOSITION_H
diff --git a/src/enums/resources/questtype.h b/src/enums/resources/questtype.h
index bfc85314c..f75ca3c53 100644
--- a/src/enums/resources/questtype.h
+++ b/src/enums/resources/questtype.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef RESOURCES_QUESTTYPE_H
-#define RESOURCES_QUESTTYPE_H
+#ifndef ENUMS_RESOURCES_QUESTTYPE_H
+#define ENUMS_RESOURCES_QUESTTYPE_H
#include "enums/simpletypes/enumdefines.h"
@@ -34,4 +34,4 @@ enumStart(QuestType)
}
enumEnd(QuestType);
-#endif // RESOURCES_QUESTTYPE_H
+#endif // ENUMS_RESOURCES_QUESTTYPE_H
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp
index a8d3ea582..919c8bdbf 100644
--- a/src/eventsmanager.cpp
+++ b/src/eventsmanager.cpp
@@ -66,7 +66,7 @@ void EventsManager::init()
void EventsManager::shutdown()
{
- config.removeListeners(this);
+ config.removeListeners(this);
}
bool EventsManager::handleCommonEvents(const SDL_Event &event) const
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 8c43d1a20..2405743c5 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -31,9 +31,6 @@
#include "being/playerinfo.h"
#include "being/playerrelation.h"
#include "being/playerrelations.h"
-#ifdef EATHENA_SUPPORT
-#include "being/homunculusinfo.h"
-#endif
#include "const/spells.h"
diff --git a/src/gui/popups/textboxpopup.cpp b/src/gui/popups/textboxpopup.cpp
index 8fb07ef4e..a03fd9497 100644
--- a/src/gui/popups/textboxpopup.cpp
+++ b/src/gui/popups/textboxpopup.cpp
@@ -27,6 +27,8 @@
#include "gui/fonts/font.h"
+#include "render/graphics.h"
+
#include "debug.h"
TextBoxPopup *textBoxPopup = nullptr;
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 545700c20..9d7be649a 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -25,14 +25,17 @@
#ifndef GUI_THEME_H
#define GUI_THEME_H
+#include "logger.h"
+
#include "enums/gui/progresscolorid.h"
#include "enums/gui/themecolorid.h"
-#include "listeners/configlistener.h"
+#include "enums/render/rendertype.h"
-#include "render/graphics.h"
+#include "listeners/configlistener.h"
#include "gui/palette.h"
+#include "gui/rect.h"
#include "utils/stringvector.h"
@@ -40,6 +43,7 @@
class DyePalette;
class Image;
+class ImageRect;
class ImageSet;
class Skin;
class Theme;
diff --git a/src/gui/themecolorsidoperators.h b/src/gui/themecolorsidoperators.h
index fae6d5018..ed7202ba7 100644
--- a/src/gui/themecolorsidoperators.h
+++ b/src/gui/themecolorsidoperators.h
@@ -18,11 +18,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GUI_THEMECOLORIDOPERATORS_H
-#define GUI_THEMECOLORIDOPERATORS_H
+#ifndef GUI_THEMECOLORSIDOPERATORS_H
+#define GUI_THEMECOLORSIDOPERATORS_H
#include "enums/gui/themecolorid.h"
ThemeColorIdT operator+(const ThemeColorIdT &id, const int& i);
-#endif // GUI_THEMECOLORIDOPERATORS_H
+#endif // GUI_THEMECOLORSIDOPERATORS_H
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 7dddb4414..815aa82a8 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -49,6 +49,8 @@
#include "input/inputmanager.h"
+#include "render/graphics.h"
+
#include "resources/map/map.h"
#include "resources/map/mapitem.h"
#include "resources/map/speciallayer.h"
diff --git a/src/gui/widgets/basiccontainer.cpp b/src/gui/widgets/basiccontainer.cpp
index 8a4d3162a..c11d03b02 100644
--- a/src/gui/widgets/basiccontainer.cpp
+++ b/src/gui/widgets/basiccontainer.cpp
@@ -63,6 +63,8 @@
#include "gui/widgets/basiccontainer.h"
+#include "render/graphics.h"
+
#include <algorithm>
#include "debug.h"
diff --git a/src/gui/widgets/basiccontainer2.cpp b/src/gui/widgets/basiccontainer2.cpp
index 862fa641c..8ce16487b 100644
--- a/src/gui/widgets/basiccontainer2.cpp
+++ b/src/gui/widgets/basiccontainer2.cpp
@@ -67,6 +67,8 @@
#include "gui/widgets/basiccontainer2.h"
+#include "render/graphics.h"
+
#include "debug.h"
BasicContainer2::BasicContainer2(const Widget2 *const widget) :
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 2c936ac96..d58953ab7 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -37,6 +37,8 @@
#include "gui/widgets/linkhandler.h"
+#include "render/graphics.h"
+
#include "resources/image.h"
#include "resources/imageset.h"
#include "resources/iteminfo.h"
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index f994f413b..2e20be616 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -75,6 +75,8 @@
#include "listeners/mouselistener.h"
#include "listeners/widgetlistener.h"
+#include "render/graphics.h"
+
#include "localconsts.h"
class Image;
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index fd0ca8fb3..b0679e1d8 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -67,14 +67,16 @@
#include "settings.h"
-#include "resources/image.h"
-#include "resources/imagerect.h"
-
#include "gui/gui.h"
#include "gui/skin.h"
#include "gui/fonts/font.h"
+#include "render/graphics.h"
+
+#include "resources/image.h"
+#include "resources/imagerect.h"
+
#include "debug.h"
int CheckBox::instances = 0;
diff --git a/src/gui/widgets/colorpage.cpp b/src/gui/widgets/colorpage.cpp
index 82ed92b69..4ef560d61 100644
--- a/src/gui/widgets/colorpage.cpp
+++ b/src/gui/widgets/colorpage.cpp
@@ -20,12 +20,14 @@
#include "gui/widgets/colorpage.h"
-#include "gui/models/colormodel.h"
-
#include "gui/skin.h"
#include "gui/fonts/font.h"
+#include "gui/models/colormodel.h"
+
+#include "render/graphics.h"
+
#include "debug.h"
ColorPage::ColorPage(const Widget2 *const widget,
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index aab966f9c..134889ee2 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -36,6 +36,8 @@
#include "resources/resourcemanager.h"
#include "resources/wallpaper.h"
+#include "render/graphics.h"
+
#include "debug.h"
Desktop *desktop = nullptr;
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index c4c15a303..05ca7124f 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -34,6 +34,8 @@
#include "gui/widgets/createwidget.h"
#include "gui/widgets/popuplist.h"
+#include "render/graphics.h"
+
#include "resources/imagerect.h"
#include "debug.h"
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index d6903d49d..a14bfe96a 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -22,6 +22,8 @@
#include "graphicsvertexes.h"
+#include "render/graphics.h"
+
#include "resources/imageset.h"
#include "resources/resourcemanager.h"
diff --git a/src/gui/widgets/emotepage.h b/src/gui/widgets/emotepage.h
index a12bc5f1a..7caa19b44 100644
--- a/src/gui/widgets/emotepage.h
+++ b/src/gui/widgets/emotepage.h
@@ -28,6 +28,8 @@
#include "localconsts.h"
+class ImageCollection;
+
class EmotePage final : public Widget,
public MouseListener,
public WidgetListener
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp
index 927b2132b..dd8c511f4 100644
--- a/src/gui/widgets/extendedlistbox.cpp
+++ b/src/gui/widgets/extendedlistbox.cpp
@@ -26,6 +26,8 @@
#include "gui/fonts/font.h"
+#include "render/graphics.h"
+
#include "debug.h"
ExtendedListBox::ExtendedListBox(const Widget2 *const widget,
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index c6acc33da..7ab9674c5 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -30,6 +30,8 @@
#include "listeners/guitableactionlistener.h"
+#include "render/graphics.h"
+
#include "utils/delete2.h"
#include "utils/dtor.h"
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 855ea7a20..9df53b1d1 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -24,6 +24,8 @@
#include "gui/gui.h"
+#include "render/graphics.h"
+
#include "resources/image.h"
#include "resources/resourcemanager.h"
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index b4fa698d7..006644425 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -35,6 +35,7 @@
#include "localconsts.h"
class Image;
+class ImageCollection;
class Inventory;
class Item;
class SelectionListener;
diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h
index 3d9e5f941..98c7cc6ac 100644
--- a/src/gui/widgets/label.h
+++ b/src/gui/widgets/label.h
@@ -72,6 +72,8 @@
#include "listeners/tooltiplistener.h"
#include "listeners/widgetlistener.h"
+#include "render/graphics.h"
+
#include "localconsts.h"
class Skin;
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 180a0e877..9ad3787f9 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -67,8 +67,6 @@
#include "settings.h"
-#include "listeners/selectionlistener.h"
-
#include "gui/focushandler.h"
#include "gui/gui.h"
#include "gui/skin.h"
@@ -77,6 +75,10 @@
#include "gui/models/listmodel.h"
+#include "listeners/selectionlistener.h"
+
+#include "render/graphics.h"
+
#include "debug.h"
float ListBox::mAlpha = 1.0;
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index d796458da..62d4b6bf9 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -29,6 +29,8 @@
#include "gui/gui.h"
#include "gui/skin.h"
+#include "render/graphics.h"
+
#include "resources/image.h"
#include "debug.h"
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 9a15bd6de..3de1bbed9 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -32,6 +32,8 @@
#include "utils/delete2.h"
+#include "render/graphics.h"
+
#include "debug.h"
Popup::Popup(const std::string &name,
diff --git a/src/gui/widgets/popuplist.cpp b/src/gui/widgets/popuplist.cpp
index 3d876b4cf..3477ef653 100644
--- a/src/gui/widgets/popuplist.cpp
+++ b/src/gui/widgets/popuplist.cpp
@@ -27,6 +27,8 @@
#include "gui/widgets/extendedlistbox.h"
#include "gui/widgets/scrollarea.h"
+#include "render/graphics.h"
+
#include "debug.h"
PopupList::PopupList(DropDown *const widget,
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index bb0824aaa..15a3996ed 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -32,6 +32,8 @@
#include "utils/delete2.h"
+#include "render/graphics.h"
+
#include "debug.h"
int ProgressBar::mInstances = 0;
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index d0583a7c8..6cd6b75e0 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -67,14 +67,16 @@
#include "settings.h"
-#include "resources/image.h"
-#include "resources/imagerect.h"
-
#include "gui/gui.h"
#include "gui/skin.h"
#include "gui/fonts/font.h"
+#include "render/graphics.h"
+
+#include "resources/image.h"
+#include "resources/imagerect.h"
+
#include "debug.h"
int RadioButton::instances = 0;
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 11a9905d4..ff198fa65 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -71,12 +71,14 @@
#include "gui/gui.h"
#include "gui/skin.h"
-#include "resources/image.h"
-#include "resources/imagerect.h"
-
#include "utils/delete2.h"
#include "utils/stringutils.h"
+#include "render/graphics.h"
+
+#include "resources/image.h"
+#include "resources/imagerect.h"
+
#include "debug.h"
int ScrollArea::instances = 0;
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index 2a515b2e9..fe720e387 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -35,6 +35,8 @@
#include "gui/models/shopitems.h"
+#include "render/graphics.h"
+
#include "resources/image.h"
#include "resources/item/shopitem.h"
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index c173dc97e..7ff7da55a 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -27,9 +27,11 @@
#include "gui/gui.h"
+#include "utils/delete2.h"
+
#include "resources/image.h"
-#include "utils/delete2.h"
+#include "render/graphics.h"
#include "debug.h"
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index f885b5e7d..88b385be9 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -70,10 +70,12 @@
#include "gui/gui.h"
+#include "utils/delete2.h"
+
#include "resources/image.h"
#include "resources/imagerect.h"
-#include "utils/delete2.h"
+#include "render/graphics.h"
#include "debug.h"
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 13cb07da9..91218d41a 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -69,6 +69,8 @@
#include "gui/fonts/font.h"
+#include "render/graphics.h"
+
#include <sstream>
#include "debug.h"
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 4060f8d1a..d02cd2541 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -67,7 +67,9 @@
#include "settings.h"
-#include "input/inputmanager.h"
+#ifdef USE_SDL2
+#include "enums/input/keyvalue.h"
+#endif
#include "gui/gui.h"
#include "gui/skin.h"
@@ -79,17 +81,17 @@
#include "gui/popups/popupmenu.h"
-#ifdef USE_SDL2
-#include "enums/input/keyvalue.h"
-#endif
-
-#include "resources/image.h"
-#include "resources/imagerect.h"
+#include "input/inputmanager.h"
#include "utils/copynpaste.h"
#include "utils/stringutils.h"
#include "utils/timer.h"
+#include "render/graphics.h"
+
+#include "resources/image.h"
+#include "resources/imagerect.h"
+
#undef DELETE // Win32 compatibility hack
#include "debug.h"
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 63b26e444..12992fab5 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -29,6 +29,8 @@
#include "gui/fonts/font.h"
+#include "render/graphics.h"
+
#include "debug.h"
int TextPreview::instances = 0;
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index c5bcb2215..75f4b81fb 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -70,13 +70,15 @@
#include "enums/resources/imageposition.h"
-#include "listeners/mouselistener.h"
-#include "listeners/widgetlistener.h"
-
#include "gui/fonts/textchunk.h"
#include "gui/widgets/basiccontainer2.h"
+#include "listeners/mouselistener.h"
+#include "listeners/widgetlistener.h"
+
+#include "render/graphics.h"
+
#include "localconsts.h"
class ContainerPlacer;
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp
index 4748fd713..e8c7f2425 100644
--- a/src/gui/windowmanager.cpp
+++ b/src/gui/windowmanager.cpp
@@ -61,6 +61,8 @@
#include "utils/naclmessages.h"
#endif // __native_client__
+#include "render/graphics.h"
+
#ifdef ANDROID
#ifndef USE_SDL2
#include <SDL_screenkeyboard.h>
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 91e1c16cc..028e8cbab 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -26,6 +26,8 @@
#include "enums/being/beingdirection.h"
+#include "being/being.h"
+
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
diff --git a/src/input/touch/touchmanager.cpp b/src/input/touch/touchmanager.cpp
index f9e4ebb8f..cbf442027 100644
--- a/src/input/touch/touchmanager.cpp
+++ b/src/input/touch/touchmanager.cpp
@@ -23,24 +23,24 @@
#include "configuration.h"
#include "graphicsvertexes.h"
-#include "input/mouseinput.h"
-
-#include "input/touch/touchactions.h"
-
#include "gui/gui.h"
#include "gui/skin.h"
+#include "gui/theme.h"
#include "gui/fonts/font.h"
#include "input/inputmanager.h"
+#include "input/mouseinput.h"
-#include "gui/theme.h"
+#include "input/touch/touchactions.h"
+
+#include "utils/delete2.h"
+
+#include "render/graphics.h"
#include "resources/image.h"
#include "resources/imagerect.h"
-#include "utils/delete2.h"
-
#include "debug.h"
TouchManager touchManager;
diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h
index 26bfb4ba3..e212ea432 100644
--- a/src/net/charserverhandler.h
+++ b/src/net/charserverhandler.h
@@ -23,10 +23,15 @@
#ifndef NET_CHARSERVERHANDLER_H
#define NET_CHARSERVERHANDLER_H
-#include "being/localplayer.h"
+#include "enums/being/gender.h"
+
+#include "enums/simpletypes/beingid.h"
#include "net/characters.h"
+#include <string>
+#include <vector>
+
class CharCreateDialog;
class CharSelectDialog;
diff --git a/src/net/ea/beingrecv.h b/src/net/ea/beingrecv.h
index 753191b8d..d3b6a642d 100644
--- a/src/net/ea/beingrecv.h
+++ b/src/net/ea/beingrecv.h
@@ -31,7 +31,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
class Being;
diff --git a/src/net/ea/chatrecv.h b/src/net/ea/chatrecv.h
index d34a54a2a..eced8fd0e 100644
--- a/src/net/ea/chatrecv.h
+++ b/src/net/ea/chatrecv.h
@@ -39,7 +39,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace Ea
{
diff --git a/src/net/ea/guildrecv.h b/src/net/ea/guildrecv.h
index 1815db58a..330787bb8 100644
--- a/src/net/ea/guildrecv.h
+++ b/src/net/ea/guildrecv.h
@@ -27,7 +27,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
class Guild;
diff --git a/src/net/ea/inventoryrecv.cpp b/src/net/ea/inventoryrecv.cpp
index 830675a44..3910011d4 100644
--- a/src/net/ea/inventoryrecv.cpp
+++ b/src/net/ea/inventoryrecv.cpp
@@ -28,8 +28,6 @@
#include "const/net/inventory.h"
-#include "enums/equipslot.h"
-
#include "enums/resources/notifytypes.h"
#include "gui/widgets/createwidget.h"
diff --git a/src/net/ea/inventoryrecv.h b/src/net/ea/inventoryrecv.h
index 472dc8362..731e01b85 100644
--- a/src/net/ea/inventoryrecv.h
+++ b/src/net/ea/inventoryrecv.h
@@ -34,7 +34,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
class Inventory;
diff --git a/src/net/ea/loginrecv.h b/src/net/ea/loginrecv.h
index 33d58eb1e..b134bc7b3 100644
--- a/src/net/ea/loginrecv.h
+++ b/src/net/ea/loginrecv.h
@@ -30,7 +30,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace Ea
{
diff --git a/src/net/ea/network.cpp b/src/net/ea/network.cpp
index 9efc807c7..bee70d46f 100644
--- a/src/net/ea/network.cpp
+++ b/src/net/ea/network.cpp
@@ -29,8 +29,6 @@
#include "utils/gettext.h"
#include "utils/sdlhelper.h"
-#include "net/packetinfo.h"
-
#include <sstream>
#include "debug.h"
diff --git a/src/net/ea/npcrecv.h b/src/net/ea/npcrecv.h
index 1c26f5521..645b36fd1 100644
--- a/src/net/ea/npcrecv.h
+++ b/src/net/ea/npcrecv.h
@@ -30,7 +30,7 @@ class NpcDialog;
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace Ea
{
diff --git a/src/net/ea/partyrecv.h b/src/net/ea/partyrecv.h
index 4c56a0617..c65388716 100644
--- a/src/net/ea/partyrecv.h
+++ b/src/net/ea/partyrecv.h
@@ -29,7 +29,7 @@ class Party;
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace Ea
{
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index aeec03c7b..0c57ab0ef 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -22,21 +22,8 @@
#include "net/ea/playerhandler.h"
-#include "party.h"
-#include "notifymanager.h"
-#include "units.h"
-
-#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/resources/notifytypes.h"
-
-#include "gui/windows/skilldialog.h"
-#include "gui/windows/statuswindow.h"
-
-#include "net/ea/eaprotocol.h"
-#include "net/ea/playerrecv.h"
-
#include "debug.h"
namespace Ea
diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h
index d19fdd28a..6b3b85073 100644
--- a/src/net/ea/playerhandler.h
+++ b/src/net/ea/playerhandler.h
@@ -27,11 +27,6 @@
#include <climits>
-namespace Net
-{
- class MessageIn;
-}
-
namespace Ea
{
diff --git a/src/net/ea/playerrecv.h b/src/net/ea/playerrecv.h
index 715c8e16f..4c800d13b 100644
--- a/src/net/ea/playerrecv.h
+++ b/src/net/ea/playerrecv.h
@@ -28,7 +28,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace Ea
{
@@ -44,7 +44,6 @@ namespace Ea
void processMapMusic(Net::MessageIn &msg);
void processMapMask(Net::MessageIn &msg);
} // namespace PlayerRecv
-
} // namespace Ea
#endif // NET_EA_PLAYERRECV_H
diff --git a/src/net/eathena/battlegroundrecv.h b/src/net/eathena/battlegroundrecv.h
index 084061831..4349c532c 100644
--- a/src/net/eathena/battlegroundrecv.h
+++ b/src/net/eathena/battlegroundrecv.h
@@ -26,7 +26,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/beingrecv.h b/src/net/eathena/beingrecv.h
index d2d0a749e..416d7c894 100644
--- a/src/net/eathena/beingrecv.h
+++ b/src/net/eathena/beingrecv.h
@@ -42,7 +42,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
class Being;
diff --git a/src/net/eathena/buyingstorerecv.h b/src/net/eathena/buyingstorerecv.h
index 88a8ef7b7..ea0f76b00 100644
--- a/src/net/eathena/buyingstorerecv.h
+++ b/src/net/eathena/buyingstorerecv.h
@@ -26,7 +26,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/charserverrecv.h b/src/net/eathena/charserverrecv.h
index 1935a888b..13b791d86 100644
--- a/src/net/eathena/charserverrecv.h
+++ b/src/net/eathena/charserverrecv.h
@@ -32,7 +32,7 @@ namespace Net
class MessageIn;
struct Character;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/chatrecv.h b/src/net/eathena/chatrecv.h
index d1845b0d3..d469bcbda 100644
--- a/src/net/eathena/chatrecv.h
+++ b/src/net/eathena/chatrecv.h
@@ -30,7 +30,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp
index f1d17a6ca..cc639e6e3 100644
--- a/src/net/eathena/inventoryrecv.cpp
+++ b/src/net/eathena/inventoryrecv.cpp
@@ -44,8 +44,6 @@
#include "listeners/arrowslistener.h"
#include "net/inventoryhandler.h"
-
-#include "net/inventoryhandler.h"
#include "net/messagein.h"
#include "net/eathena/itemflags.h"
@@ -97,7 +95,7 @@ namespace InventoryRecv
};
Ea::InventoryItems mCartItems;
-}
+} // namespace InventoryRecv
void InventoryRecv::processPlayerEquipment(Net::MessageIn &msg)
{
diff --git a/src/net/eathena/inventoryrecv.h b/src/net/eathena/inventoryrecv.h
index 2050f2338..d024c8362 100644
--- a/src/net/eathena/inventoryrecv.h
+++ b/src/net/eathena/inventoryrecv.h
@@ -28,7 +28,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/mailrecv.h b/src/net/eathena/mailrecv.h
index 7ef41e8dd..3eabf7042 100644
--- a/src/net/eathena/mailrecv.h
+++ b/src/net/eathena/mailrecv.h
@@ -24,7 +24,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/npcrecv.h b/src/net/eathena/npcrecv.h
index 84f28b574..876d0f7dc 100644
--- a/src/net/eathena/npcrecv.h
+++ b/src/net/eathena/npcrecv.h
@@ -24,7 +24,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/partyrecv.h b/src/net/eathena/partyrecv.h
index ef188b9ff..9d7711ad8 100644
--- a/src/net/eathena/partyrecv.h
+++ b/src/net/eathena/partyrecv.h
@@ -25,7 +25,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/playerrecv.h b/src/net/eathena/playerrecv.h
index 8dfab5944..e6ef1f776 100644
--- a/src/net/eathena/playerrecv.h
+++ b/src/net/eathena/playerrecv.h
@@ -26,7 +26,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/skillrecv.h b/src/net/eathena/skillrecv.h
index c40e858e2..d40477ab5 100644
--- a/src/net/eathena/skillrecv.h
+++ b/src/net/eathena/skillrecv.h
@@ -26,7 +26,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/sp.h b/src/net/eathena/sp.h
index f3f1c7e1d..7a5e08181 100644
--- a/src/net/eathena/sp.h
+++ b/src/net/eathena/sp.h
@@ -268,4 +268,4 @@ namespace Sp
};
} // namespace Sp
-#endif // NET_EATHENA_H
+#endif // NET_EATHENA_SP_H
diff --git a/src/net/eathena/traderecv.h b/src/net/eathena/traderecv.h
index 3e70b392d..39e8327bc 100644
--- a/src/net/eathena/traderecv.h
+++ b/src/net/eathena/traderecv.h
@@ -26,7 +26,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/eathena/vendingrecv.h b/src/net/eathena/vendingrecv.h
index af7ddd382..edff20856 100644
--- a/src/net/eathena/vendingrecv.h
+++ b/src/net/eathena/vendingrecv.h
@@ -26,7 +26,7 @@ class BuyDialog;
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace EAthena
{
diff --git a/src/net/tmwa/beingrecv.h b/src/net/tmwa/beingrecv.h
index afb8e484b..0d7dd93ff 100644
--- a/src/net/tmwa/beingrecv.h
+++ b/src/net/tmwa/beingrecv.h
@@ -38,7 +38,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
class Being;
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 9fc0478c2..e9a7924b9 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -22,8 +22,6 @@
#include "net/tmwa/charserverhandler.h"
-#include "client.h"
-
#include "gui/windows/charcreatedialog.h"
#include "net/character.h"
diff --git a/src/net/tmwa/chatrecv.h b/src/net/tmwa/chatrecv.h
index a46c0b8df..44758bbb2 100644
--- a/src/net/tmwa/chatrecv.h
+++ b/src/net/tmwa/chatrecv.h
@@ -28,7 +28,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace TmwAthena
{
diff --git a/src/net/tmwa/inventoryrecv.cpp b/src/net/tmwa/inventoryrecv.cpp
index 1586c5aa7..1bc89676a 100644
--- a/src/net/tmwa/inventoryrecv.cpp
+++ b/src/net/tmwa/inventoryrecv.cpp
@@ -72,7 +72,7 @@ namespace InventoryRecv
EquipSlot::SHADOW_ACCESSORY2_SLOT, // Shadow Accessory 2
EquipSlot::SHADOW_ACCESSORY1_SLOT, // Shadow Accessory 1
};
-}
+} // namespace InventoryRecv
void InventoryRecv::processPlayerEquipment(Net::MessageIn &msg)
{
diff --git a/src/net/tmwa/inventoryrecv.h b/src/net/tmwa/inventoryrecv.h
index 4408e00d3..102a6a871 100644
--- a/src/net/tmwa/inventoryrecv.h
+++ b/src/net/tmwa/inventoryrecv.h
@@ -28,7 +28,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace TmwAthena
{
diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp
index ad6ad5dce..d48c5123f 100644
--- a/src/net/tmwa/loginhandler.cpp
+++ b/src/net/tmwa/loginhandler.cpp
@@ -22,8 +22,6 @@
#include "net/tmwa/loginhandler.h"
-#include "client.h"
-
#include "net/serverfeatures.h"
#include "net/ea/loginrecv.h"
diff --git a/src/net/tmwa/traderecv.h b/src/net/tmwa/traderecv.h
index 761164bf2..f8cd97609 100644
--- a/src/net/tmwa/traderecv.h
+++ b/src/net/tmwa/traderecv.h
@@ -26,7 +26,7 @@
namespace Net
{
class MessageIn;
-}
+} // namespace Net
namespace TmwAthena
{
diff --git a/src/particle/textparticle.cpp b/src/particle/textparticle.cpp
index 399e00a01..274ba39cc 100644
--- a/src/particle/textparticle.cpp
+++ b/src/particle/textparticle.cpp
@@ -26,6 +26,8 @@
#include "gui/fonts/font.h"
+#include "render/graphics.h"
+
#include "debug.h"
TextParticle::TextParticle(const std::string &restrict text,
diff --git a/src/render/graphics.h b/src/render/graphics.h
index 4e28a34dc..7123bd9fc 100644
--- a/src/render/graphics.h
+++ b/src/render/graphics.h
@@ -211,7 +211,8 @@ class Graphics notfinal
virtual void calcTileVertexes(ImageVertexes *restrict const vert,
const Image *restrict const image,
int x,
- int y) const restrict2 A_NONNULL(2, 3) = 0;
+ int y) const restrict2 A_NONNULL(2, 3)
+ = 0;
virtual void calcTileSDL(ImageVertexes *restrict const vert A_UNUSED,
int x A_UNUSED,
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index 9c6da180d..b5d97b80a 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -24,7 +24,6 @@
#include "render/modernopenglgraphics.h"
-#include "configuration.h"
#include "graphicsmanager.h"
#include "graphicsvertexes.h"
#include "logger.h"
diff --git a/src/resources/atlas/atlasmanager.h b/src/resources/atlas/atlasmanager.h
index 998b5d177..b824a3c9d 100644
--- a/src/resources/atlas/atlasmanager.h
+++ b/src/resources/atlas/atlasmanager.h
@@ -30,7 +30,6 @@
#include <SDL.h>
class AtlasResource;
-class Resource;
struct AtlasItem;
struct TextureAtlas;
diff --git a/src/resources/beingcommon.cpp b/src/resources/beingcommon.cpp
index af1f8e138..a64f33593 100644
--- a/src/resources/beingcommon.cpp
+++ b/src/resources/beingcommon.cpp
@@ -60,7 +60,7 @@ void BeingCommon::readBasicAttributes(BeingInfo *const info,
BlockMask::AIR;
StringVect tokens;
splitToStringVector(tokens, walkStr, ',');
- FOR_EACH(StringVectCIter, it, tokens)
+ FOR_EACH (StringVectCIter, it, tokens)
{
if (walkStr == "walk" || walkStr == "ground")
block |= BlockMask::GROUND;
diff --git a/src/resources/db/npcdialogdb.cpp b/src/resources/db/npcdialogdb.cpp
index 8b2e19d48..526561935 100644
--- a/src/resources/db/npcdialogdb.cpp
+++ b/src/resources/db/npcdialogdb.cpp
@@ -203,7 +203,7 @@ void NpcDialogDB::unload()
{
logger->log1("Unloading npcdialog database...");
- FOR_EACH(DialogsIter, it, mDialogs)
+ FOR_EACH (DialogsIter, it, mDialogs)
{
NpcDialogInfo *dialog = (*it).second;
delete_all(dialog->menu.buttons);
diff --git a/src/resources/mapreader.h b/src/resources/mapreader.h
index 27fc44271..781a52cca 100644
--- a/src/resources/mapreader.h
+++ b/src/resources/mapreader.h
@@ -29,7 +29,6 @@
class Map;
class MapHeights;
-class MapLayer;
class Properties;
class Tileset;
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index 350c9b97f..e518883fa 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -52,8 +52,8 @@ class ResourceManager final
friend class Resource;
public:
- typedef Resource *(*loader)(SDL_RWops *);
- typedef Resource *(&generator)(const void *const);
+ typedef Resource *(*loader)(SDL_RWops *rw);
+ typedef Resource *(&generator)(const void *const data);
ResourceManager();
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index f761c7981..2b86a3eca 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -37,6 +37,8 @@
#include "utils/physfscheckutils.h"
#include "utils/physfsrwops.h"
+#include "render/graphics.h"
+
#include "resources/image.h"
#include "resources/imagewriter.h"
#include "resources/mstack.h"
diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp
index 81621fb06..50723a0a8 100644
--- a/src/test/testmain.cpp
+++ b/src/test/testmain.cpp
@@ -23,6 +23,7 @@
#ifdef USE_OPENGL
+#include "logger.h"
#include "settings.h"
#include "utils/delete2.h"
diff --git a/src/test/testmain.h b/src/test/testmain.h
index 0875cfc06..02b5fd2a5 100644
--- a/src/test/testmain.h
+++ b/src/test/testmain.h
@@ -21,15 +21,16 @@
#ifndef TEST_TESTMAIN_H
#define TEST_TESTMAIN_H
+#ifdef USE_OPENGL
+
#include "configuration.h"
-#include "logger.h"
#include "render/renderers.h"
-#ifdef USE_OPENGL
-
#include <string>
+class Logger;
+
class TestMain final
{
public:
diff --git a/src/utils/cpu.h b/src/utils/cpu.h
index afad20e5b..4a249c2fb 100644
--- a/src/utils/cpu.h
+++ b/src/utils/cpu.h
@@ -39,6 +39,6 @@ namespace Cpu
void detect();
void printFlags();
-} // namespace CPU
+} // namespace Cpu
#endif // UTILS_CPU_H
diff --git a/src/utils/physfstools.cpp b/src/utils/physfstools.cpp
index 8ee72f7b9..6f4345c36 100644
--- a/src/utils/physfstools.cpp
+++ b/src/utils/physfstools.cpp
@@ -36,7 +36,7 @@ const char *dirSeparator = nullptr;
namespace PhysFs
{
#if defined(__native_client__)
- void init(const char *const name)
+ void init(const char *const name A_UNUSED)
{
if (!PHYSFS_init("/fakebinary"))
#elif defined(ANDROID)