aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/scene.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-04-06 21:24:35 -0400
committerPaul Gilbert2014-04-06 21:24:35 -0400
commit2457905ed42820d27264a4beccc9ae45da746c18 (patch)
tree6bc39595a2578fbbe23a45a7da307f0199765fbd /engines/mads/scene.cpp
parentbd11534499ef169700b0ddb450cc93cff434be6b (diff)
downloadscummvm-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.cpp7
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);