aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/scene.cpp
diff options
context:
space:
mode:
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);