diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-26 00:10:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-26 13:53:30 +0300 |
commit | 35d6f9c1086d84a479bab84f07f8c9dae266f4ca (patch) | |
tree | 632b84779ac9b9ce20b60f99272f4a4c241b0b74 /src | |
parent | 6e71645ebfd4cf07d86bd913b0002a3a1a33c1a9 (diff) | |
download | manaverse-35d6f9c1086d84a479bab84f07f8c9dae266f4ca.tar.gz manaverse-35d6f9c1086d84a479bab84f07f8c9dae266f4ca.tar.bz2 manaverse-35d6f9c1086d84a479bab84f07f8c9dae266f4ca.tar.xz manaverse-35d6f9c1086d84a479bab84f07f8c9dae266f4ca.zip |
Fix code style.
Diffstat (limited to 'src')
33 files changed, 29 insertions, 74 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index 7004743c1..ec5d7b6a2 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -33,7 +33,7 @@ #include "listeners/debugmessagelistener.h" -#include "particle/particle.h" +#include "particle/particleengine.h" #include "resources/resourcemanager.h" diff --git a/src/being/being.cpp b/src/being/being.cpp index b24f10ecd..57529b734 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1837,7 +1837,8 @@ void Being::logic() restrict2 mNeedPosUpdate = false; const int halfTile = mapTileSize / 2; - const float offset2 = static_cast<float>(mPixelOffsetY * abs(offset)) / 2; + const float offset2 = static_cast<float>( + mPixelOffsetY * abs(offset)) / 2; // mSortOffsetY = (mOldHeight - mFixedOffsetY + mPixelOffsetY) // * halfTile - offset2; mSortOffsetY = 0; @@ -3136,7 +3137,6 @@ void Being::drawMonsterSpriteAt(Graphics *restrict const graphics, 2 * 50, 4); } - } void Being::drawPortalSpriteAt(Graphics *restrict const graphics, diff --git a/src/being/being.h b/src/being/being.h index 23c7fd7e0..606db0a35 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -1170,7 +1170,7 @@ class Being notfinal : public ActorSprite, int mX; // position in tiles int mY; // position in tiles - int mSortOffsetY; // caculated offset in pixels based on mPixelOffsetY + int mSortOffsetY; // caculated offset in pixels based on mPixelOffsetY int mPixelOffsetY; // tile height offset in pixels // calculated between tiles int mFixedOffsetY; // fixed tile height offset in pixels for tile diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index bd03cbf96..17aa4e2e3 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -42,7 +42,7 @@ #include "enums/resources/map/mapitemtype.h" -#include "particle/particle.h" +#include "particle/particleengine.h" #include "input/keyboardconfig.h" diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index 2d8f21056..68b3ee8e1 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -30,8 +30,6 @@ #include "being/homunculusinfo.h" #include "being/mercenaryinfo.h" #include "being/petinfo.h" - -#include "enums/resources/itemdbtype.h" #endif #include "gui/windows/inventorywindow.h" diff --git a/src/client.cpp b/src/client.cpp index 0f451702e..f1c77f728 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -96,7 +96,7 @@ #include "net/tmwa/guildmanager.h" #endif -#include "particle/particle.h" +#include "particle/particleengine.h" #include "resources/imagehelper.h" #include "resources/resourcemanager.h" diff --git a/src/enums/resources/itemdbtype.h b/src/enums/resources/itemdbtype.h index 67c634837..31b53c1ad 100644 --- a/src/enums/resources/itemdbtype.h +++ b/src/enums/resources/itemdbtype.h @@ -20,8 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RESOURCES_ITEMDBTYPE_H -#define RESOURCES_ITEMDBTYPE_H +#ifndef ENUMS_RESOURCES_ITEMDBTYPE_H +#define ENUMS_RESOURCES_ITEMDBTYPE_H #include "enums/simpletypes/enumdefines.h" @@ -47,4 +47,4 @@ enumStart(ItemDbType) } enumEnd(ItemDbType); -#endif // RESOURCES_ITEMDBTYPE_H +#endif // ENUMS_RESOURCES_ITEMDBTYPE_H diff --git a/src/enums/resources/itemtype.h b/src/enums/resources/itemtype.h index 83a25f522..c56f03532 100644 --- a/src/enums/resources/itemtype.h +++ b/src/enums/resources/itemtype.h @@ -18,8 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RESOURCES_ITEMTYPE_H -#define RESOURCES_ITEMTYPE_H +#ifndef ENUMS_RESOURCES_ITEMTYPE_H +#define ENUMS_RESOURCES_ITEMTYPE_H #include "enums/simpletypes/enumdefines.h" @@ -41,4 +41,4 @@ enumStart(ItemType) } enumEnd(ItemType); -#endif // RESOURCES_ITEMTYPE_H +#endif // ENUMS_RESOURCES_ITEMTYPE_H diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp index fe70d9ad7..0dba7dca6 100644 --- a/src/gui/popups/beingpopup.cpp +++ b/src/gui/popups/beingpopup.cpp @@ -21,8 +21,6 @@ #include "gui/popups/beingpopup.h" -#include "statuseffect.h" - #include "being/being.h" #include "being/homunculusinfo.h" #include "being/petinfo.h" @@ -37,8 +35,6 @@ #include "resources/chatobject.h" -#include "resources/db/statuseffectdb.h" - #include "utils/gettext.h" #include "utils/stringutils.h" diff --git a/src/gui/theme.h b/src/gui/theme.h index 9d7be649a..43d0c3308 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -30,12 +30,9 @@ #include "enums/gui/progresscolorid.h" #include "enums/gui/themecolorid.h" -#include "enums/render/rendertype.h" - #include "listeners/configlistener.h" #include "gui/palette.h" -#include "gui/rect.h" #include "utils/stringvector.h" diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 9c4eaf713..8b63c6096 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -49,8 +49,6 @@ #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/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index 80559b130..86d0a5eec 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -22,8 +22,6 @@ #include "gui/widgets/itemlinkhandler.h" -#include "logger.h" - #include "itemcolormanager.h" #include "gui/viewport.h" diff --git a/src/gui/widgets/tabs/debugwindowtabs.cpp b/src/gui/widgets/tabs/debugwindowtabs.cpp index 6cf3540ab..bda8af76e 100644 --- a/src/gui/widgets/tabs/debugwindowtabs.cpp +++ b/src/gui/widgets/tabs/debugwindowtabs.cpp @@ -26,7 +26,7 @@ #include "being/localplayer.h" -#include "particle/particle.h" +#include "particle/particleengine.h" #include "gui/viewport.h" diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h index ed11955e5..d4b85e4b8 100644 --- a/src/gui/widgets/widget.h +++ b/src/gui/widgets/widget.h @@ -66,6 +66,8 @@ #include "enums/simpletypes/visible.h" +#include "gui/rect.h" + #include "gui/widgets/widget2.h" #include <list> diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h index 32e51d7c3..3367d8924 100644 --- a/src/gui/widgets/widget2.h +++ b/src/gui/widgets/widget2.h @@ -23,6 +23,8 @@ #include "const/gui/theme.h" +#include "enums/render/rendertype.h" + #include "gui/themecolorsidoperators.h" #include "gui/theme.h" diff --git a/src/integrity_unittest.cc b/src/integrity_unittest.cc index cc8a79c1d..432163214 100644 --- a/src/integrity_unittest.cc +++ b/src/integrity_unittest.cc @@ -31,8 +31,6 @@ #include "resources/resourcemanager.h" #include "resources/sdlimagehelper.h" -#include "resources/animation/animation.h" - #include "utils/env.h" #include "utils/physfstools.h" diff --git a/src/logger.cpp b/src/logger.cpp index 89077b021..f61cd2464 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -407,7 +407,7 @@ void Logger::unimplimented(const int id, void Logger::unimplimented(const uint32_t id, const uint32_t id2, - const uint32_t id3) + const uint32_t id3) const { if (!mReportUnimplimented) return; diff --git a/src/logger.h b/src/logger.h index 19cf69ddb..cdac1ffc5 100644 --- a/src/logger.h +++ b/src/logger.h @@ -185,7 +185,7 @@ class Logger final void unimplimented(const uint32_t id, const uint32_t id2, - const uint32_t id3); + const uint32_t id3) const; private: std::ofstream mLogFile; diff --git a/src/net/ea/npcrecv.h b/src/net/ea/npcrecv.h index 645b36fd1..b0c1f2ad8 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 Net namespace Ea { diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index b2738a263..156c81d8f 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -35,7 +35,7 @@ #include "enums/resources/notifytypes.h" -#include "particle/particle.h" +#include "particle/particleengine.h" #include "input/keyboardconfig.h" diff --git a/src/net/eathena/familyrecv.cpp b/src/net/eathena/familyrecv.cpp index 07b1f343a..59a28099a 100644 --- a/src/net/eathena/familyrecv.cpp +++ b/src/net/eathena/familyrecv.cpp @@ -20,7 +20,6 @@ #include "net/eathena/familyrecv.h" -#include "logger.h" #include "notifymanager.h" #include "party.h" @@ -30,8 +29,6 @@ #include "gui/widgets/createwidget.h" -#include "gui/windows/confirmdialog.h" - #include "utils/gettext.h" #include "utils/stringutils.h" diff --git a/src/net/eathena/itemrecv.cpp b/src/net/eathena/itemrecv.cpp index 4a744dccb..526168e49 100644 --- a/src/net/eathena/itemrecv.cpp +++ b/src/net/eathena/itemrecv.cpp @@ -28,8 +28,6 @@ #include "const/resources/item/cards.h" -#include "enums/resources/itemtype.h" - #include "net/messagein.h" #include "debug.h" diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp index c9b29d224..d02e18393 100644 --- a/src/net/tmwa/beingrecv.cpp +++ b/src/net/tmwa/beingrecv.cpp @@ -29,7 +29,7 @@ #include "being/localplayer.h" -#include "particle/particle.h" +#include "particle/particleengine.h" #include "input/keyboardconfig.h" diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index eb2456306..de85d2a59 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -22,15 +22,11 @@ #include "particle/particle.h" -#include "configuration.h" #include "logger.h" -#include "gui/viewport.h" - #include "particle/animationparticle.h" #include "particle/particleemitter.h" #include "particle/rotationalparticle.h" -#include "particle/textparticle.h" #include "resources/image.h" #include "resources/resourcemanager.h" @@ -51,7 +47,6 @@ static const double PI = M_PI; static const float PI2 = 2 * M_PI; class Graphics; -class Image; Particle::Particle() : Actor(), diff --git a/src/particle/particle.h b/src/particle/particle.h index c0e149c97..d73de5dcc 100644 --- a/src/particle/particle.h +++ b/src/particle/particle.h @@ -32,10 +32,7 @@ #include "localconsts.h" -class Color; -class Font; class Image; -class Particle; class ParticleEmitter; class SimpleAnimation; diff --git a/src/particle/particleengine.cpp b/src/particle/particleengine.cpp index d03d7c512..2f82e7704 100644 --- a/src/particle/particleengine.cpp +++ b/src/particle/particleengine.cpp @@ -20,10 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "particle/particle.h" - #include "configuration.h" -#include "logger.h" #include "gui/viewport.h" @@ -37,13 +34,11 @@ #include "resources/dye/dye.h" #include "utils/dtor.h" -#include "utils/mathutils.h" #include "debug.h" ParticleEngine *particleEngine = nullptr; -class Graphics; class Image; int ParticleEngine::particleCount = 0; @@ -72,7 +67,8 @@ void ParticleEngine::setupEngine() restrict2 { ParticleEngine::maxCount = config.getIntValue("particleMaxCount"); ParticleEngine::fastPhysics = config.getIntValue("particleFastPhysics"); - ParticleEngine::emitterSkip = config.getIntValue("particleEmitterSkip") + 1; + ParticleEngine::emitterSkip = + config.getIntValue("particleEmitterSkip") + 1; if (!ParticleEngine::emitterSkip) ParticleEngine::emitterSkip = 1; ParticleEngine::enabled = config.getBoolValue("particleeffects"); @@ -306,7 +302,8 @@ Particle *ParticleEngine::addTextRiseFadeOutEffect(const std::string &restrict const Color *restrict const color, Font *restrict const font, - const bool outline) restrict2 + const bool outline) + restrict2 { Particle *const newParticle = new TextParticle( text, diff --git a/src/particle/particleengine.h b/src/particle/particleengine.h index 59c20e7e5..55c224414 100644 --- a/src/particle/particleengine.h +++ b/src/particle/particleengine.h @@ -23,8 +23,6 @@ #ifndef PARTICLE_PARTICLEENGINE_H #define PARTICLE_PARTICLEENGINE_H -#include "enums/particle/alivestatus.h" - #include <list> #include <string> diff --git a/src/render/graphics.h b/src/render/graphics.h index 7123bd9fc..8334d315d 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -271,7 +271,7 @@ class Graphics notfinal const int x2, const int y2, const int width, const int height) restrict2; - ClipRect &getTopClip() restrict2 A_WARN_UNUSED + ClipRect &getTopClip() const restrict2 A_WARN_UNUSED { return mClipStack.top(); } void setRedraw(const bool n) restrict2 noexcept diff --git a/src/resources/db/statuseffectdb.cpp b/src/resources/db/statuseffectdb.cpp index fb670f694..0649497dc 100644 --- a/src/resources/db/statuseffectdb.cpp +++ b/src/resources/db/statuseffectdb.cpp @@ -23,22 +23,14 @@ #include "resources/db/statuseffectdb.h" #include "configuration.h" +#include "logger.h" #include "settings.h" -#include "soundmanager.h" #include "statuseffect.h" -#include "const/resources/spriteaction.h" - -#include "gui/widgets/tabs/chat/chattab.h" - -#include "particle/particle.h" - #include "listeners/debugmessagelistener.h" #include "resources/beingcommon.h" -#include "resources/sprite/animatedsprite.h" - #include "debug.h" namespace diff --git a/src/resources/map/map.h b/src/resources/map/map.h index 1f92f5951..4a0f71e82 100644 --- a/src/resources/map/map.h +++ b/src/resources/map/map.h @@ -44,7 +44,6 @@ class MapHeights; class MapItem; class MapLayer; class ObjectsLayer; -class Particle; class Resource; class SpecialLayer; class Tileset; diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp index 88bfc07a1..54465e96f 100644 --- a/src/statuseffect.cpp +++ b/src/statuseffect.cpp @@ -29,11 +29,7 @@ #include "gui/widgets/tabs/chat/chattab.h" -#include "particle/particle.h" - -#include "listeners/debugmessagelistener.h" - -#include "resources/beingcommon.h" +#include "particle/particleengine.h" #include "resources/sprite/animatedsprite.h" diff --git a/src/statuseffect.h b/src/statuseffect.h index 3e35860b1..1a77536a2 100644 --- a/src/statuseffect.h +++ b/src/statuseffect.h @@ -23,8 +23,6 @@ #ifndef STATUSEFFECT_H #define STATUSEFFECT_H -#include "enums/simpletypes/enable.h" - #include <string> #include "localconsts.h" diff --git a/src/utils/xml_unittest.cc b/src/utils/xml_unittest.cc index e228392a5..7c4f12222 100644 --- a/src/utils/xml_unittest.cc +++ b/src/utils/xml_unittest.cc @@ -24,7 +24,6 @@ #include "utils/physfstools.h" #include "utils/xml.h" -#include "utils/xmlwriter.h" #include "resources/resourcemanager.h" |