diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-19 22:50:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-19 22:50:16 +0300 |
commit | c65cb0d97fbaa37f531d6fb47ce9d798b001b637 (patch) | |
tree | cce1030add4a837913b9e730a5550a67d03d236e /src/resources | |
parent | 3d236906de18c846aa052f1d4cef1b0686a43854 (diff) | |
download | manaverse-c65cb0d97fbaa37f531d6fb47ce9d798b001b637.tar.gz manaverse-c65cb0d97fbaa37f531d6fb47ce9d798b001b637.tar.bz2 manaverse-c65cb0d97fbaa37f531d6fb47ce9d798b001b637.tar.xz manaverse-c65cb0d97fbaa37f531d6fb47ce9d798b001b637.zip |
fix code style.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/action.cpp | 3 | ||||
-rw-r--r-- | src/resources/action.h | 2 | ||||
-rw-r--r-- | src/resources/animation.h | 2 | ||||
-rw-r--r-- | src/resources/beinginfo.cpp | 2 | ||||
-rw-r--r-- | src/resources/beinginfo.h | 8 | ||||
-rw-r--r-- | src/resources/db/emotedb.h | 5 | ||||
-rw-r--r-- | src/resources/db/itemdb.cpp | 3 | ||||
-rw-r--r-- | src/resources/db/itemdb.h | 7 | ||||
-rw-r--r-- | src/resources/dye.cpp | 3 | ||||
-rw-r--r-- | src/resources/dye.h | 3 | ||||
-rw-r--r-- | src/resources/dye_unittest.cc | 2 | ||||
-rw-r--r-- | src/resources/dyepalette.cpp | 1 | ||||
-rw-r--r-- | src/resources/imagehelper.h | 2 | ||||
-rw-r--r-- | src/resources/iteminfo.cpp | 11 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 1 | ||||
-rw-r--r-- | src/resources/itemslot.h | 2 | ||||
-rw-r--r-- | src/resources/itemsoundevent.h | 2 | ||||
-rw-r--r-- | src/resources/map/map.cpp | 2 | ||||
-rw-r--r-- | src/resources/map/map.h | 2 | ||||
-rw-r--r-- | src/resources/mapreader.cpp | 6 | ||||
-rw-r--r-- | src/resources/openglimagehelper.cpp | 1 | ||||
-rw-r--r-- | src/resources/spriteaction.h | 2 | ||||
-rw-r--r-- | src/resources/spritedef.cpp | 3 | ||||
-rw-r--r-- | src/resources/spritedef.h | 2 | ||||
-rw-r--r-- | src/resources/spritedirection.h | 2 | ||||
-rw-r--r-- | src/resources/textureatlas.h | 2 |
26 files changed, 45 insertions, 36 deletions
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; |