From aac238cec9cab9efe7319d8397b95e7a77bdb5cd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 Aug 2011 21:05:48 +0300 Subject: Fix perfomance issue with caching complex sprites. --- src/animatedsprite.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/animatedsprite.cpp') 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; +} -- cgit v1.2.3-60-g2f50