diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-31 21:25:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-31 21:51:44 +0300 |
commit | 1dfc22f53967ad7e39d42ba8aabe0afa7445476e (patch) | |
tree | d6a2bda66d2e50646162a15220063a360730ff5b /src/being/compoundsprite.cpp | |
parent | d6f42c15612b9d40d0a496b2b34efe66df0b74f9 (diff) | |
download | plus-1dfc22f53967ad7e39d42ba8aabe0afa7445476e.tar.gz plus-1dfc22f53967ad7e39d42ba8aabe0afa7445476e.tar.bz2 plus-1dfc22f53967ad7e39d42ba8aabe0afa7445476e.tar.xz plus-1dfc22f53967ad7e39d42ba8aabe0afa7445476e.zip |
Improve drawing player sprites performance.
Diffstat (limited to 'src/being/compoundsprite.cpp')
-rw-r--r-- | src/being/compoundsprite.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/being/compoundsprite.cpp b/src/being/compoundsprite.cpp index af2e60d55..184823011 100644 --- a/src/being/compoundsprite.cpp +++ b/src/being/compoundsprite.cpp @@ -263,6 +263,7 @@ void CompoundSprite::addSprite(Sprite *const sprite) { mSprites.push_back(sprite); mNeedsRedraw = true; + updateDrawSprites(); } void CompoundSprite::setSprite(const size_t layer, Sprite *const sprite) @@ -274,6 +275,7 @@ void CompoundSprite::setSprite(const size_t layer, Sprite *const sprite) delete mSprites[layer]; mSprites[layer] = sprite; mNeedsRedraw = true; + updateDrawSprites(); } void CompoundSprite::removeSprite(const int layer) @@ -284,6 +286,7 @@ void CompoundSprite::removeSprite(const int layer) delete2(mSprites[layer]); mNeedsRedraw = true; + updateDrawSprites(); } void CompoundSprite::clear() @@ -299,6 +302,7 @@ void CompoundSprite::clear() imagesCache.clear(); delete2(mCacheItem); mLastTime = 0; + updateDrawSprites(); } void CompoundSprite::ensureSize(const size_t layerCount) |