Fixed Animation::getTopAnimation()

It does not return kTitleText and others.  This caused flickering of speech
texts on/off when the title got displayed under the mouse.

svn-id: r46056
This commit is contained in:
Robert Špalek 2009-11-22 02:42:15 +00:00
parent a2b056c288
commit 509444cc91

View File

@ -504,10 +504,12 @@ const Animation *AnimationManager::getTopAnimation(int x, int y) const {
}
}
// Return the top-most animation object, unless it is an
// overlay sprite and there is an actual object underneath it.
// Return the top-most animation object, unless it is a
// non-clickable sprite (overlay, debugging sprites for
// walking, or title/speech text) and there is an actual object
// underneath it.
if (matches) {
if (anim->getID() != kOverlayImage) {
if (anim->getID() > kOverlayImage || anim->getID() < kSpeechText) {
return anim;
} else if (retval == NULL) {
retval = anim;