summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-20 16:39:35 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-20 16:39:35 +0300
commit9753cdbb33468148e1f690d67cb631d661e62027 (patch)
tree96c073cc948e9d8483676171a2fe1cb274fed0a4 /src/resources
parentab9405f511303d490a8f966d1c1abe7f94bf0633 (diff)
downloadmanaverse-9753cdbb33468148e1f690d67cb631d661e62027.tar.gz
manaverse-9753cdbb33468148e1f690d67cb631d661e62027.tar.bz2
manaverse-9753cdbb33468148e1f690d67cb631d661e62027.tar.xz
manaverse-9753cdbb33468148e1f690d67cb631d661e62027.zip
fix style in resources directory.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/action.cpp1
-rw-r--r--src/resources/animation.cpp3
-rw-r--r--src/resources/atlasmanager.h8
-rw-r--r--src/resources/beinginfo.cpp3
-rw-r--r--src/resources/dye.cpp4
-rw-r--r--src/resources/emotedb.h7
-rw-r--r--src/resources/image.cpp4
-rw-r--r--src/resources/imageset.cpp1
-rw-r--r--src/resources/iteminfo.cpp19
-rw-r--r--src/resources/mapdb.h6
-rw-r--r--src/resources/mapreader.cpp3
-rw-r--r--src/resources/mapreader.h1
-rw-r--r--src/resources/resource.h2
-rw-r--r--src/resources/resourcemanager.cpp8
-rw-r--r--src/resources/spritedef.h13
-rw-r--r--src/resources/subimage.cpp2
-rw-r--r--src/resources/wallpaper.cpp6
17 files changed, 72 insertions, 19 deletions
diff --git a/src/resources/action.cpp b/src/resources/action.cpp
index 362fa0370..b4426daae 100644
--- a/src/resources/action.cpp
+++ b/src/resources/action.cpp
@@ -30,6 +30,7 @@
#include "debug.h"
Action::Action() :
+ mAnimations(),
mNumber(100)
{
}
diff --git a/src/resources/animation.cpp b/src/resources/animation.cpp
index 379a0e9f2..972dc15a2 100644
--- a/src/resources/animation.cpp
+++ b/src/resources/animation.cpp
@@ -28,7 +28,8 @@
#include "debug.h"
-Animation::Animation():
+Animation::Animation() :
+ mFrames(),
mDuration(0)
{
}
diff --git a/src/resources/atlasmanager.h b/src/resources/atlasmanager.h
index ce5f20d52..caa9b57eb 100644
--- a/src/resources/atlasmanager.h
+++ b/src/resources/atlasmanager.h
@@ -35,6 +35,7 @@ struct AtlasItem final
{
explicit AtlasItem(Image *const image0) :
image(image0),
+ name(),
x(0),
y(0),
width(image0->mBounds.w),
@@ -55,10 +56,12 @@ struct AtlasItem final
struct TextureAtlas final
{
TextureAtlas() :
+ name(),
atlasImage(nullptr),
surface(nullptr),
width(0),
- height(0)
+ height(0),
+ items()
{
}
@@ -75,7 +78,8 @@ struct TextureAtlas final
class AtlasResource final : public Resource
{
public:
- AtlasResource()
+ AtlasResource() :
+ atlases()
{ }
A_DELETE_COPY(AtlasResource)
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index 99ce2ff6f..760d2667b 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -35,9 +35,12 @@ Attack *BeingInfo::empty = new Attack(SpriteAction::ATTACK,
-1, -1, -1, -1, std::string());
BeingInfo::BeingInfo() :
+ mDisplay(),
mName(_("unnamed")),
mTargetCursorSize(ActorSprite::TC_MEDIUM),
mHoverCursor(Cursor::CURSOR_POINTER),
+ mSounds(),
+ mAttacks(),
mWalkMask(Map::BLOCKMASK_WALL | Map::BLOCKMASK_CHARACTER
| Map::BLOCKMASK_MONSTER | Map::BLOCKMASK_AIR
| Map::BLOCKMASK_WATER),
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp
index bfe9145bc..960ac36ae 100644
--- a/src/resources/dye.cpp
+++ b/src/resources/dye.cpp
@@ -29,7 +29,9 @@
#include "debug.h"
-DyePalette::DyePalette(const std::string &description, const int8_t blockSize)
+DyePalette::DyePalette(const std::string &description,
+ const int8_t blockSize) :
+ mColors()
{
const int size = static_cast<int>(description.length());
if (size == 0)
diff --git a/src/resources/emotedb.h b/src/resources/emotedb.h
index b8f163adb..6a6463dfb 100644
--- a/src/resources/emotedb.h
+++ b/src/resources/emotedb.h
@@ -34,7 +34,8 @@ class AnimatedSprite;
struct EmoteSprite final
{
EmoteSprite() :
- sprite(nullptr)
+ sprite(nullptr),
+ name()
{ }
A_DELETE_COPY(EmoteSprite)
@@ -45,7 +46,9 @@ struct EmoteSprite final
struct EmoteInfo final
{
- EmoteInfo()
+ EmoteInfo() :
+ sprites(),
+ particles()
{ }
A_DELETE_COPY(EmoteInfo)
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 21c492845..88360c870 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -52,11 +52,13 @@ Image::Image(SDL_Surface *const image, const bool hasAlphaChannel0,
mTexWidth(0),
mTexHeight(0),
#endif
+ mBounds(),
mLoaded(false),
mAlpha(1.0f),
mHasAlphaChannel(hasAlphaChannel0),
mSDLSurface(image),
mAlphaChannel(alphaChannel),
+ mAlphaCache(),
mUseAlphaCache(SDLImageHelper::mEnableAlphaCache),
mIsAlphaVisible(hasAlphaChannel0),
mIsAlphaCalculated(false)
@@ -87,11 +89,13 @@ Image::Image(const GLuint glimage, const int width, const int height,
mGLImage(glimage),
mTexWidth(texWidth),
mTexHeight(texHeight),
+ mBounds(),
mLoaded(false),
mAlpha(1.0f),
mHasAlphaChannel(true),
mSDLSurface(nullptr),
mAlphaChannel(nullptr),
+ mAlphaCache(),
mUseAlphaCache(false),
mIsAlphaVisible(true),
mIsAlphaCalculated(false)
diff --git a/src/resources/imageset.cpp b/src/resources/imageset.cpp
index a8c9af5ef..164e682a4 100644
--- a/src/resources/imageset.cpp
+++ b/src/resources/imageset.cpp
@@ -33,6 +33,7 @@
ImageSet::ImageSet(Image *const img, const int width, const int height,
const int margin, const int spacing) :
Resource(),
+ mImages(),
mWidth(width),
mHeight(height),
mOffsetX(0),
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index a6372ca93..3a2b3e836 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -36,21 +36,26 @@
extern int serverVersion;
ItemInfo::ItemInfo() :
- mMissileParticleFile(""),
- mName(""),
- mDescription(""),
- mEffect(""),
+ mMissileParticleFile(),
+ mDisplay(),
+ mName(),
+ mDescription(),
+ mEffect(),
mType(ITEM_UNUSABLE),
- mParticle(""),
+ mParticle(),
mWeight(0),
mView(0),
mId(0),
mIsRemoveSprites(false),
+ mSpriteToItemReplaceList(),
mAttackAction(SpriteAction::INVALID),
mAttackRange(0),
- mMissileParticle(""),
+ mMissileParticle(),
+ mAnimationFiles(),
+ mSounds(),
+ mTags(),
mColors(nullptr),
- mColorList(""),
+ mColorList(),
mHitEffectId(-1),
mCriticalHitEffectId(-1),
mMissEffectId(-1),
diff --git a/src/resources/mapdb.h b/src/resources/mapdb.h
index 1f54a17f0..9889c4dc8 100644
--- a/src/resources/mapdb.h
+++ b/src/resources/mapdb.h
@@ -35,6 +35,12 @@ namespace MapDB
{
struct MapInfo
{
+ MapInfo() :
+ atlas(),
+ files(nullptr)
+ {
+ }
+
std::string atlas;
const StringVect *files;
};
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 567ea0673..75238e828 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -572,7 +572,6 @@ bool MapReader::readBase64Layer(const XmlNodePtr childNode, Map *const map,
bool MapReader::readCsvLayer(const XmlNodePtr childNode, Map *const map,
MapLayer *const layer,
- const std::string &compression,
int &x, int &y, const int w, const int h)
{
XmlNodePtr dataChild = childNode->xmlChildrenNode;
@@ -682,7 +681,7 @@ void MapReader::readLayer(const XmlNodePtr node, Map *const map)
}
else if (encoding == "csv")
{
- if (readCsvLayer(childNode, map, layer, compression, x, y, w, h))
+ if (readCsvLayer(childNode, map, layer, x, y, w, h))
continue;
else
return;
diff --git a/src/resources/mapreader.h b/src/resources/mapreader.h
index 3b3e10023..fa7254b51 100644
--- a/src/resources/mapreader.h
+++ b/src/resources/mapreader.h
@@ -79,7 +79,6 @@ class MapReader final
static bool readCsvLayer(const XmlNodePtr childNode, Map *const map,
MapLayer *const layer,
- const std::string &compression,
int &x, int &y, const int w, const int h);
/**
diff --git a/src/resources/resource.h b/src/resources/resource.h
index 2bbc03200..884e58dc6 100644
--- a/src/resources/resource.h
+++ b/src/resources/resource.h
@@ -42,6 +42,8 @@ class Resource
* Constructor
*/
Resource() :
+ mIdPath(),
+ mSource(),
mTimeStamp(0),
mProtected(false),
#ifdef DEBUG_DUMP_LEAKS
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 1cf6cee71..23f96368e 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -60,9 +60,13 @@ ResourceManager *ResourceManager::instance = nullptr;
DelayedAnim ResourceManager::mDelayedAnimations;
ResourceManager::ResourceManager() :
+ deletedSurfaces(),
+ mResources(),
+ mOrphanedResources(),
+ mDeletedResources(),
mOldestOrphan(0),
- mSelectedSkin(""),
- mSkinName(""),
+ mSelectedSkin(),
+ mSkinName(),
mDestruction(0),
mUseLongLiveSprites(config.getBoolValue("uselonglivesprites"))
{
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index 08cb0d2b9..2da538baf 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -57,6 +57,14 @@ struct SpriteReference final
struct SpriteDisplay final
{
+ SpriteDisplay() :
+ image(),
+ floor(),
+ sprites(),
+ particles()
+ {
+ }
+
std::string image;
std::string floor;
std::vector<SpriteReference*> sprites;
@@ -150,7 +158,10 @@ class SpriteDef final : public Resource
* Constructor.
*/
SpriteDef() :
- Resource()
+ Resource(),
+ mImageSets(),
+ mActions(),
+ mProcessedFiles()
{ }
/**
diff --git a/src/resources/subimage.cpp b/src/resources/subimage.cpp
index f1cec9aaf..cad476f2f 100644
--- a/src/resources/subimage.cpp
+++ b/src/resources/subimage.cpp
@@ -36,6 +36,7 @@ SubImage::SubImage(Image *const parent, SDL_Surface *const image,
const int x, const int y,
const int width, const int height) :
Image(image),
+ mInternalBounds(),
mParent(parent)
{
if (mParent)
@@ -84,6 +85,7 @@ SubImage::SubImage(Image *const parent, const GLuint image,
const int x, const int y, const int width, const int height,
const int texWidth, const int texHeight):
Image(image, width, height, texWidth, texHeight),
+ mInternalBounds(),
mParent(parent)
{
if (mParent)
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index 62d275628..6f81e99aa 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -38,6 +38,12 @@
struct WallpaperData
{
+ WallpaperData() :
+ filename(),
+ width(0),
+ height(0)
+ {
+ }
std::string filename;
int width;
int height;