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.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index bbf46f164c..c7a6edee20 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -46,7 +46,7 @@ Scene::Scene(MADSEngine *vm): _vm(vm), _action(_vm), _depthSurface(vm),
_reloadSceneFlag = false;
_destFacing = 0;
_freeAnimationFlag = false;
- _animation = nullptr;
+ _animationData = nullptr;
_activeAnimation = nullptr;
_textSpacing = -1;
@@ -156,9 +156,9 @@ void Scene::loadScene(int sceneId, const Common::String &prefix, bool palFlag) {
if (!_vm->_textWindowStill)
flags |= 0x200;
- _animation = Animation::init(_vm, this);
+ _animationData = Animation::init(_vm, this);
MSurface surface;
- _animation->load(surface, _interface, prefix, flags, nullptr, nullptr);
+ _animationData->load(surface, _interface, prefix, flags, nullptr, nullptr);
_vm->_palette->_paletteUsage.load(0);
@@ -495,6 +495,17 @@ void Scene::checkKeyboard() {
warning("TODO: Scene::checkKeyboard");
}
+void Scene::loadAnimation(const Common::String &resName, int abortTimers) {
+ assert(_activeAnimation == nullptr);
+ MSurface sceneSurface;
+ InterfaceSurface interfaceSurface(_vm);
+
+ _activeAnimation = Animation::init(_vm, this);
+ _activeAnimation->load(sceneSurface, interfaceSurface, resName,
+ _vm->_game->_v2 ? 1 : 0, nullptr, nullptr);
+ _activeAnimation->startAnimation(abortTimers);
+}
+
void Scene::free() {
warning("TODO: Scene::free");
}