diff options
author | Paul Gilbert | 2014-04-06 21:24:35 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-04-06 21:24:35 -0400 |
commit | 2457905ed42820d27264a4beccc9ae45da746c18 (patch) | |
tree | 6bc39595a2578fbbe23a45a7da307f0199765fbd /engines/mads/scene.cpp | |
parent | bd11534499ef169700b0ddb450cc93cff434be6b (diff) | |
download | scummvm-rg350-2457905ed42820d27264a4beccc9ae45da746c18.tar.gz scummvm-rg350-2457905ed42820d27264a4beccc9ae45da746c18.tar.bz2 scummvm-rg350-2457905ed42820d27264a4beccc9ae45da746c18.zip |
MADS: Fixes for switching between scenes
Diffstat (limited to 'engines/mads/scene.cpp')
-rw-r--r-- | engines/mads/scene.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index 9ef7d0b245..d297cb79ec 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -389,7 +389,7 @@ void Scene::doFrame() { _animFlag = true; _vm->_game->_fx = kTransitionNone; - if (_freeAnimationFlag) { + if (_freeAnimationFlag && _activeAnimation) { _activeAnimation->free(); _activeAnimation = nullptr; } @@ -570,6 +570,11 @@ void Scene::free() { _sceneInfo = nullptr; } +void Scene::removeSprites() { + for (int idx = _sprites.size() - 1; idx >= _spritesCount; --idx) + _sprites.remove(idx); +} + void Scene::changeVariant(int variant) { _variant = variant; _sceneInfo->loadCodes(_depthSurface, variant); |