aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/scene.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2015-10-22 00:42:04 +0300
committerFilippos Karapetis2015-10-22 00:42:04 +0300
commit80dae7b8fcd3e20a0f18d9287a9fc44793f6c38a (patch)
tree3b54dfc89a0449ad9cc1a47f738bd9d6bbeaf8b9 /engines/mads/scene.cpp
parente232c9fdb6f150c361c0a556f3245d9b503d2cbb (diff)
downloadscummvm-rg350-80dae7b8fcd3e20a0f18d9287a9fc44793f6c38a.tar.gz
scummvm-rg350-80dae7b8fcd3e20a0f18d9287a9fc44793f6c38a.tar.bz2
scummvm-rg350-80dae7b8fcd3e20a0f18d9287a9fc44793f6c38a.zip
MADS: Phantom: Initial work on hotspots with dynamic animations
Diffstat (limited to 'engines/mads/scene.cpp')
-rw-r--r--engines/mads/scene.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 07e67c04d6..daa50aacbc 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -771,7 +771,19 @@ int Scene::getAnimFrame(int id) {
}
void Scene::setDynamicAnim(int id, int anim_id, int segment) {
- warning("TODO: Scene::setDynamicAnim");
+ if (id >= 0 && id <= DYNAMIC_HOTSPOTS_SIZE && _animation[anim_id]) {
+ _animation[anim_id]->_dynamicHotspotIndex = id;
+ if (_dynamicHotspots[id]._animIndex < 0)
+ _dynamicHotspots[id]._active = false;
+ _dynamicHotspots[id]._animIndex = anim_id;
+
+ // TODO: Anim segments
+
+ // NOTE: Only remove the TODO below when _dynamicHotspotIndex
+ // in the Animation class is actually used in the engine!
+
+ warning("TODO: Scene::setDynamicAnim");
+ }
}
void Scene::setCamera(Common::Point pos) {