summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-01 16:49:00 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-01 16:49:00 +0300
commit331468dbfb8de05723c62149036cb8a51e769baf (patch)
treeac481eb2ef64dc718d134e2c8134919e49017943 /src
parent69ed7e5ae640b0a2cd95d66b42b4c369fe522433 (diff)
downloadmanaplus-331468dbfb8de05723c62149036cb8a51e769baf.tar.gz
manaplus-331468dbfb8de05723c62149036cb8a51e769baf.tar.bz2
manaplus-331468dbfb8de05723c62149036cb8a51e769baf.tar.xz
manaplus-331468dbfb8de05723c62149036cb8a51e769baf.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/actions/commands.cpp1
-rw-r--r--src/actormanager.h11
-rw-r--r--src/enums/resources/imageposition.h6
-rw-r--r--src/gui/popups/popupmenu.cpp1
-rw-r--r--src/gui/viewport.cpp15
-rw-r--r--src/gui/widgets/window.h2
-rw-r--r--src/input/inputactiondata.h1
-rw-r--r--src/input/inputactionmap.h1
-rw-r--r--src/navigationmanager.cpp2
-rw-r--r--src/navigationmanager.h2
-rw-r--r--src/net/ea/itemrecv.cpp2
-rw-r--r--src/render/mobileopengl2graphics.cpp3
-rw-r--r--src/resources/map/map.h6
-rw-r--r--src/resources/sprite/animatedsprite.cpp3
-rw-r--r--src/resources/sprite/animatedsprite.h12
15 files changed, 44 insertions, 24 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index ba793f866..4de3f6bf2 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -28,6 +28,7 @@
#include "actions/actiondef.h"
+#include "being/flooritem.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
#include "being/playerrelations.h"
diff --git a/src/actormanager.h b/src/actormanager.h
index 9d9675bca..3b7edf29d 100644
--- a/src/actormanager.h
+++ b/src/actormanager.h
@@ -23,11 +23,15 @@
#ifndef ACTORMANAGER_H
#define ACTORMANAGER_H
-#include "being/flooritem.h"
+#include "enums/being/actortype.h"
#include "enums/simpletypes/allowsort.h"
#include "enums/simpletypes/allplayers.h"
+#include "enums/simpletypes/beingid.h"
#include "enums/simpletypes/beingtypeid.h"
+#include "enums/simpletypes/damaged.h"
+#include "enums/simpletypes/identified.h"
+#include "enums/simpletypes/itemcolor.h"
#include "enums/simpletypes/npcnames.h"
#include "listeners/configlistener.h"
@@ -35,9 +39,14 @@
#include "utils/stringmap.h"
#include "utils/stringvector.h"
+#include <list>
+#include <set>
+
#include "localconsts.h"
+class ActorSprite;
class Being;
+class FloorItem;
class LocalPlayer;
class Map;
diff --git a/src/enums/resources/imageposition.h b/src/enums/resources/imageposition.h
index 0ba90f316..0714367c4 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_IMAGERECT_H
-#define ENUMS_RESOURCES_IMAGERECT_H
+#ifndef ENUMS_RESOURCES_IMAGEPOSIITON_H
+#define ENUMS_RESOURCES_IMAGEPOSIITON_H
#include "localconsts.h"
@@ -58,4 +58,4 @@ namespace ImagePosition
};
} // namespace imagePosition
-#endif // ENUMS_RESOURCES_IMAGERECT_H
+#endif // ENUMS_RESOURCES_IMAGEPOSIITON_H
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index b14e3f32c..f4acc9268 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -27,6 +27,7 @@
#include "gamemodifiers.h"
#include "party.h"
+#include "being/flooritem.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
#include "being/playerrelation.h"
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 630696e72..ff0e24210 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -29,16 +29,11 @@
#include "sdlshared.h"
#include "textmanager.h"
-#include "enums/resources/map/mapitemtype.h"
-
-#include "resources/map/map.h"
-#include "resources/map/mapitem.h"
-#include "resources/map/speciallayer.h"
-
+#include "being/flooritem.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "input/inputmanager.h"
+#include "enums/resources/map/mapitemtype.h"
#include "gui/gui.h"
#include "gui/popupmanager.h"
@@ -52,6 +47,12 @@
#include "gui/windows/ministatuswindow.h"
+#include "input/inputmanager.h"
+
+#include "resources/map/map.h"
+#include "resources/map/mapitem.h"
+#include "resources/map/speciallayer.h"
+
#include "debug.h"
Viewport *viewport = nullptr;
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 0e6e9c026..54479512c 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -77,8 +77,6 @@
#include "gui/widgets/basiccontainer2.h"
-#include "resources/imagerect.h"
-
#include "localconsts.h"
class ContainerPlacer;
diff --git a/src/input/inputactiondata.h b/src/input/inputactiondata.h
index 3456ace0e..2289f15ec 100644
--- a/src/input/inputactiondata.h
+++ b/src/input/inputactiondata.h
@@ -25,7 +25,6 @@
#include "actions/actionfuncptr.h"
-#include "enums/input/inputgroup.h"
#include "enums/input/inputtype.h"
#include "enums/simpletypes/useargs.h"
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index f76265d98..b84b0dde6 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -36,6 +36,7 @@
#include "actions/windows.h"
#include "enums/input/inputcondition.h"
+#include "enums/input/inputgroup.h"
#include "input/inputactiondata.h"
#include "input/inputmanager.h"
diff --git a/src/navigationmanager.cpp b/src/navigationmanager.cpp
index 4de840dde..d9a00e0de 100644
--- a/src/navigationmanager.cpp
+++ b/src/navigationmanager.cpp
@@ -146,7 +146,6 @@ void NavigationManager::fillNum(int x, int y,
}
}
}
-#endif
bool NavigationManager::findWalkableTile(int &x1, int &y1,
const int width,
@@ -170,3 +169,4 @@ bool NavigationManager::findWalkableTile(int &x1, int &y1,
}
return false;
}
+#endif
diff --git a/src/navigationmanager.h b/src/navigationmanager.h
index 3c907bb6f..589d529d5 100644
--- a/src/navigationmanager.h
+++ b/src/navigationmanager.h
@@ -42,13 +42,13 @@ class NavigationManager final
#endif
private:
+#ifndef DYECMD
static bool findWalkableTile(int &x1, int &y1,
const int width,
const int height,
const MetaTile *const tiles,
const int *const data) A_NONNULL(5, 6);
-#ifndef DYECMD
static void fillNum(int x, int y,
const int width,
const int height,
diff --git a/src/net/ea/itemrecv.cpp b/src/net/ea/itemrecv.cpp
index c2702bdc7..be3926bc0 100644
--- a/src/net/ea/itemrecv.cpp
+++ b/src/net/ea/itemrecv.cpp
@@ -24,6 +24,8 @@
#include "actormanager.h"
+#include "being/flooritem.h"
+
#include "net/messagein.h"
#include "debug.h"
diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp
index a7d978d0d..a0bbcadf8 100644
--- a/src/render/mobileopengl2graphics.cpp
+++ b/src/render/mobileopengl2graphics.cpp
@@ -723,7 +723,8 @@ void MobileOpenGL2Graphics::drawTileCollection(const ImageCollection
}
}
-void MobileOpenGL2Graphics::calcPattern(ImageCollection *restrict const vertCol,
+void MobileOpenGL2Graphics::calcPattern(ImageCollection *restrict const
+ vertCol,
const Image *restrict const image,
const int x,
const int y,
diff --git a/src/resources/map/map.h b/src/resources/map/map.h
index b4495d11d..4a3d2ed9c 100644
--- a/src/resources/map/map.h
+++ b/src/resources/map/map.h
@@ -299,8 +299,10 @@ class Map final : public Properties, public ConfigListener
const ObjectsLayer* getObjectsLayer() const restrict2 A_WARN_UNUSED
{ return mObjects; }
- std::string getObjectData(const unsigned x, const unsigned y,
- const int type) const restrict2 A_WARN_UNUSED;
+ std::string getObjectData(const unsigned x,
+ const unsigned y,
+ const int type) const
+ restrict2 A_WARN_UNUSED;
void indexTilesets() restrict2;
diff --git a/src/resources/sprite/animatedsprite.cpp b/src/resources/sprite/animatedsprite.cpp
index 43c11497a..242559e6d 100644
--- a/src/resources/sprite/animatedsprite.cpp
+++ b/src/resources/sprite/animatedsprite.cpp
@@ -244,7 +244,8 @@ bool AnimatedSprite::updateCurrentAnimation(const unsigned int time) restrict2
{
for (size_t i = 0; i < mAnimation->getLength(); i ++)
{
- const Frame *restrict const frame = &mAnimation->mFrames[i];
+ const Frame *restrict const frame =
+ &mAnimation->mFrames[i];
if (frame->type == Frame::LABEL &&
mFrame->nextAction == frame->nextAction)
{
diff --git a/src/resources/sprite/animatedsprite.h b/src/resources/sprite/animatedsprite.h
index 752e66eee..722c5b715 100644
--- a/src/resources/sprite/animatedsprite.h
+++ b/src/resources/sprite/animatedsprite.h
@@ -155,10 +155,14 @@ class AnimatedSprite final : public Sprite
unsigned int mFrameIndex; /**< The index of the current frame. */
unsigned int mFrameTime; /**< The time since start of frame. */
- SpriteDef *restrict mSprite; /**< The sprite definition. */
- const Action *restrict mAction; /**< The currently active action. */
- const Animation *restrict mAnimation; /**< The currently active animation. */
- const Frame *restrict mFrame; /**< The currently active frame. */
+ /**< The sprite definition. */
+ SpriteDef *restrict mSprite;
+ /**< The currently active action. */
+ const Action *restrict mAction;
+ /**< The currently active animation. */
+ const Animation *restrict mAnimation;
+ /**< The currently active frame. */
+ const Frame *restrict mFrame;
unsigned mNumber;
unsigned mNumber1;
AnimationDelayLoad *mDelayLoad;