summaryrefslogtreecommitdiff
path: root/src/animatedsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-01 21:05:48 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-02 18:38:14 +0300
commitaac238cec9cab9efe7319d8397b95e7a77bdb5cd (patch)
tree3298f3b604d4d45cc6d04f871f6a1abb29cdd554 /src/animatedsprite.cpp
parent4e7096f15eba73e6ea28066df6ab389aab3f052c (diff)
downloadmv-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.cpp11
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;
+}