summaryrefslogtreecommitdiff
path: root/src/being/compoundsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-04 21:39:15 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-04 21:39:15 +0300
commit1a31d0573e3e714664631ac40686c0d61b4bccc9 (patch)
treef8cd5bb7265820d29cfda5c83a2094a793f5a795 /src/being/compoundsprite.cpp
parent2521a791d764920c194e8fe299110e98dc2e5ab3 (diff)
downloadmv-1a31d0573e3e714664631ac40686c0d61b4bccc9.tar.gz
mv-1a31d0573e3e714664631ac40686c0d61b4bccc9.tar.bz2
mv-1a31d0573e3e714664631ac40686c0d61b4bccc9.tar.xz
mv-1a31d0573e3e714664631ac40686c0d61b4bccc9.zip
Remove getter size from compoundsprite.
Diffstat (limited to 'src/being/compoundsprite.cpp')
-rw-r--r--src/being/compoundsprite.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/being/compoundsprite.cpp b/src/being/compoundsprite.cpp
index 220cadea8..0ec252961 100644
--- a/src/being/compoundsprite.cpp
+++ b/src/being/compoundsprite.cpp
@@ -235,7 +235,7 @@ int CompoundSprite::getNumberOfLayers() const
if (mImage || mAlphaImage)
return 1;
else
- return CAST_S32(size());
+ return CAST_S32(mSprites.size());
}
unsigned int CompoundSprite::getCurrentFrame() const
@@ -423,12 +423,11 @@ void CompoundSprite::setAlpha(float alpha)
{
if (alpha != mAlpha)
{
+ if (mEnableAlphaFix &&
#ifdef USE_OPENGL
- if (mEnableAlphaFix && imageHelper->useOpenGL() == RENDER_SOFTWARE
- && size() > 3)
-#else
- if (mEnableAlphaFix && size() > 3)
+ imageHelper->useOpenGL() == RENDER_SOFTWARE &&
#endif
+ mSprites.size() > 3U)
{
FOR_EACH (SpriteConstIterator, it, mSprites)
{
@@ -458,7 +457,7 @@ void CompoundSprite::updateImages() const
if (!mDisableBeingCaching)
{
- if (size() <= 3)
+ if (mSprites.size() <= 3U)
return;
if (!mDisableAdvBeingCaching)
@@ -503,7 +502,7 @@ bool CompoundSprite::updateFromCache() const
// logger->log("cache size: %d, hit %d, miss %d",
// (int)imagesCache.size(), hits, miss);
- const size_t sz = size();
+ const size_t sz = mSprites.size();
FOR_EACH (ImagesCache::iterator, it, imagesCache)
{
CompoundItem *const ic = *it;