diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-01 21:05:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-02 18:38:14 +0300 |
commit | aac238cec9cab9efe7319d8397b95e7a77bdb5cd (patch) | |
tree | 3298f3b604d4d45cc6d04f871f6a1abb29cdd554 /src/animatedsprite.cpp | |
parent | 4e7096f15eba73e6ea28066df6ab389aab3f052c (diff) | |
download | mv-aac238cec9cab9efe7319d8397b95e7a77bdb5cd.tar.gz mv-aac238cec9cab9efe7319d8397b95e7a77bdb5cd.tar.bz2 mv-aac238cec9cab9efe7319d8397b95e7a77bdb5cd.tar.xz mv-aac238cec9cab9efe7319d8397b95e7a77bdb5cd.zip |
Fix perfomance issue with caching complex sprites.
Diffstat (limited to 'src/animatedsprite.cpp')
-rw-r--r-- | src/animatedsprite.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp index 0b9eb5ddd..41aabf60c 100644 --- a/src/animatedsprite.cpp +++ b/src/animatedsprite.cpp @@ -306,3 +306,14 @@ void AnimatedSprite::setAlpha(float alpha) if (mFrame && mFrame->image && mFrame->image->getAlpha() != mAlpha) mFrame->image->setAlpha(mAlpha); } + +void *AnimatedSprite::getHash() +{ + if (mFrame) + return mFrame; +// if (mFrame && mFrame->image) +// return mFrame->image; +// if (mAnimation) +// return mAnimation; + return this; +} |