aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-03-15 16:20:01 -0400
committerPaul Gilbert2015-03-15 16:20:01 -0400
commit6d8134f7518a2c368a55cfc49ba0a625a9744645 (patch)
tree9c2aa91c27289088b31eccc27c174285e760004a /engines
parent9caed13d906b852cd90033a2df304d19f0f0e38c (diff)
downloadscummvm-rg350-6d8134f7518a2c368a55cfc49ba0a625a9744645.tar.gz
scummvm-rg350-6d8134f7518a2c368a55cfc49ba0a625a9744645.tar.bz2
scummvm-rg350-6d8134f7518a2c368a55cfc49ba0a625a9744645.zip
MADS: Revert fix for sprites disappearing on last frame of cutscenes
The fix that kept the sprites on-screen for the last frame before scene changes in the intro/ending sequences was also causing crashes in-game, where the animation is getting freed before the scene update to remove the sprites was done, so it couldn't get the areas of the screen to refresh
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/animation.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index b48491626d..cf02e7b0b5 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -436,6 +436,9 @@ void Animation::update() {
if (_vm->_game->_scene._frameStartTime < _nextFrameTimer)
return;
+ // Erase any active sprites
+ eraseSprites();
+
// Validate the current frame
if (_currentFrame >= (int)_miscEntries.size()) {
// Is the animation allowed to be repeated?
@@ -448,8 +451,6 @@ void Animation::update() {
}
}
- eraseSprites();
-
// Handle executing any sound command for this frame
AnimMiscEntry &misc = _miscEntries[_currentFrame];
if (misc._soundId)