summaryrefslogtreecommitdiff
path: root/src/compoundsprite.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-14 23:10:32 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-14 23:10:32 +0300
commitffabda4c473711ffa8fdfe37c2a4460fe31347ac (patch)
treee6ca643efc58f718611481f44959528f129396a3 /src/compoundsprite.h
parenta95ddb41f2c17872e37cb7530816b4008789aeb7 (diff)
downloadmanaverse-ffabda4c473711ffa8fdfe37c2a4460fe31347ac.tar.gz
manaverse-ffabda4c473711ffa8fdfe37c2a4460fe31347ac.tar.bz2
manaverse-ffabda4c473711ffa8fdfe37c2a4460fe31347ac.tar.xz
manaverse-ffabda4c473711ffa8fdfe37c2a4460fe31347ac.zip
improve a bit draw speed.
Diffstat (limited to 'src/compoundsprite.h')
-rw-r--r--src/compoundsprite.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compoundsprite.h b/src/compoundsprite.h
index 6049cdeb9..20f5d371e 100644
--- a/src/compoundsprite.h
+++ b/src/compoundsprite.h
@@ -86,7 +86,10 @@ public:
unsigned int getCurrentFrame() const override A_WARN_UNUSED;
- unsigned int getFrameCount() const override A_WARN_UNUSED;
+ unsigned int getActualFrameCount() const A_WARN_UNUSED;
+
+ unsigned int getFrameCount() const override A_WARN_UNUSED
+ { return mTempFramesCount; }
size_t size() const A_WARN_UNUSED
{ return mSprites.size(); }
@@ -155,6 +158,7 @@ private:
bool mDisableAdvBeingCaching;
bool mDisableBeingCaching;
std::vector<Sprite*> mSprites;
+ mutable int mTempFramesCount;
mutable int mNextRedrawTime;
static bool mEnableDelay;
};