summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-23 20:05:05 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-23 20:05:05 +0300
commit70e9b4d7aaf0e93dc715a201b1cca12900c72b37 (patch)
tree3bf4e7f35b9c59cdda4fe54686bebbca7e41ef03 /src
parentcf1a1df92c0b6993df420456fce2654263e3dbc8 (diff)
downloadmanaverse-70e9b4d7aaf0e93dc715a201b1cca12900c72b37.tar.gz
manaverse-70e9b4d7aaf0e93dc715a201b1cca12900c72b37.tar.bz2
manaverse-70e9b4d7aaf0e93dc715a201b1cca12900c72b37.tar.xz
manaverse-70e9b4d7aaf0e93dc715a201b1cca12900c72b37.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/being/actorsprite.cpp2
-rw-r--r--src/being/being.cpp2
-rw-r--r--src/being/being.h2
-rw-r--r--src/maingui.cpp1
-rw-r--r--src/net/eathena/maprecv.cpp4
-rw-r--r--src/resources/db/horsedb.cpp12
-rw-r--r--src/resources/horseinfo.h4
-rw-r--r--src/resources/map/maplayer.cpp7
8 files changed, 19 insertions, 15 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 9b76ac328..fa5301664 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -213,7 +213,7 @@ void ActorSprite::setStatusEffectBlock(const int offset,
const std::string str = strprintf(
"Error: unknown effect by block-index. "
"Offset: %d, effect int: %d, i: %u",
- offset, (int)newEffects, i);
+ offset, static_cast<int>(newEffects), i);
logger->log(str);
DebugMessageListener::distributeEvent(str);
}
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 49d3ae4c7..4913d1b10 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -197,6 +197,8 @@ Being::Being(const BeingId id,
#ifdef EATHENA_SUPPORT
mChat(nullptr),
mHorseInfo(nullptr),
+ mDownHorseSprites(),
+ mUpHorseSprites(),
#endif
mX(0),
mY(0),
diff --git a/src/being/being.h b/src/being/being.h
index 9b6f3f6f7..d533570ca 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -1090,9 +1090,9 @@ class Being notfinal : public ActorSprite,
#ifdef EATHENA_SUPPORT
ChatObject *mChat;
HorseInfo *mHorseInfo;
-#endif
std::vector<AnimatedSprite*> mDownHorseSprites;
std::vector<AnimatedSprite*> mUpHorseSprites;
+#endif
int mX; // position in tiles
int mY; // position in tiles
diff --git a/src/maingui.cpp b/src/maingui.cpp
index d3b7fe6c0..b87ae7a15 100644
--- a/src/maingui.cpp
+++ b/src/maingui.cpp
@@ -42,7 +42,6 @@
#include <windows.h>
#endif
-#include <getopt.h>
#include <iostream>
#include <unistd.h>
diff --git a/src/net/eathena/maprecv.cpp b/src/net/eathena/maprecv.cpp
index e40077af8..0143b33d0 100644
--- a/src/net/eathena/maprecv.cpp
+++ b/src/net/eathena/maprecv.cpp
@@ -20,10 +20,6 @@
#include "net/eathena/maprecv.h"
-#include "logger.h"
-
-#include "enums/resources/map/blocktype.h"
-
#include "gui/viewport.h"
#include "net/messagein.h"
diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp
index db8aa7dc3..f4c5bf8c0 100644
--- a/src/resources/db/horsedb.cpp
+++ b/src/resources/db/horsedb.cpp
@@ -131,10 +131,14 @@ void HorseDB::loadXmlFile(const std::string &fileName)
continue;
const int offsetX = XML::getProperty(horseNode, "offsetX", 0);
const int offsetY = XML::getProperty(horseNode, "offsetY", 0);
- currentInfo->upOffsetX = XML::getProperty(horseNode, "upOffsetX", offsetX);
- currentInfo->upOffsetY = XML::getProperty(horseNode, "upOffsetY", offsetY);
- currentInfo->downOffsetX = XML::getProperty(horseNode, "downOffsetX", offsetX);
- currentInfo->downOffsetY = XML::getProperty(horseNode, "downOffsetY", offsetY);
+ currentInfo->upOffsetX = XML::getProperty(horseNode,
+ "upOffsetX", offsetX);
+ currentInfo->upOffsetY = XML::getProperty(horseNode,
+ "upOffsetY", offsetY);
+ currentInfo->downOffsetX = XML::getProperty(horseNode,
+ "downOffsetX", offsetX);
+ currentInfo->downOffsetY = XML::getProperty(horseNode,
+ "downOffsetY", offsetY);
for_each_xml_child_node(spriteNode, horseNode)
{
diff --git a/src/resources/horseinfo.h b/src/resources/horseinfo.h
index 8a96902d8..11cca4c8f 100644
--- a/src/resources/horseinfo.h
+++ b/src/resources/horseinfo.h
@@ -24,13 +24,13 @@
#include "resources/spritereference.h"
-#include <vector>
-
#include "localconsts.h"
struct HorseInfo final
{
HorseInfo() :
+ downSprites(),
+ upSprites(),
downOffsetX(0),
downOffsetY(0),
upOffsetX(0),
diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp
index 23e347483..89629ea65 100644
--- a/src/resources/map/maplayer.cpp
+++ b/src/resources/map/maplayer.cpp
@@ -597,7 +597,9 @@ void MapLayer::drawFringe(Graphics *const graphics,
{
int width = 0;
// here need not draw over player position
- const int c = getTileDrawWidth(tilePtr, endX - x, width);
+ const int c = getTileDrawWidth(tilePtr,
+ endX - x,
+ width);
if (!c)
{
@@ -710,7 +712,8 @@ void MapLayer::updateConditionTiles(MetaTile *const metaTiles,
for (int x = mX; x < width1; x ++, metaPtr ++, tilePtr ++)
{
if (metaPtr->blockmask & mTileCondition ||
- (metaPtr->blockmask == 0 && mTileCondition == BlockMask::GROUND))
+ (metaPtr->blockmask == 0 &&
+ mTileCondition == BlockMask::GROUND))
{
tilePtr->isEnabled = true;
}