diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/draci/animation.cpp | 19 | ||||
-rw-r--r-- | engines/draci/animation.h | 1 |
2 files changed, 16 insertions, 4 deletions
diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp index e553942c63..bb0cb44b10 100644 --- a/engines/draci/animation.cpp +++ b/engines/draci/animation.cpp @@ -232,15 +232,26 @@ void AnimationManager::deleteAnimation(int id) { Common::List<Animation *>::iterator it; for (it = _animations.begin(); it != _animations.end(); ++it) { - if ((*it)->getID() == id) + if ((*it)->getID() == id) { + (*it)->deleteFrames(); + _animations.erase(it); break; + } } +} + +void AnimationManager::deleteOverlays() { - (*it)->deleteFrames(); + Common::List<Animation *>::iterator it; - _animations.erase(it); + for (it = _animations.begin(); it != _animations.end(); ++it) { + if((*it)->getID() == kOverlayImage) + (*it)->deleteFrames(); + + _animations.erase(it); + } } - + void AnimationManager::deleteAll() { Common::List<Animation *>::iterator it; diff --git a/engines/draci/animation.h b/engines/draci/animation.h index 6fbd185b1f..cef8182f7b 100644 --- a/engines/draci/animation.h +++ b/engines/draci/animation.h @@ -91,6 +91,7 @@ public: void stop(int id); void deleteAnimation(int id); + void deleteOverlays(); void deleteAll(); void drawScene(Surface *surf); |