aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorFilippos Karapetis2015-10-22 03:23:08 +0300
committerFilippos Karapetis2015-10-22 03:23:08 +0300
commit51d5f6c2b843760615e262f51d1791d9bf10bdf8 (patch)
tree255bc6bb23c6ef8f256c87fe85f9327d7d77e27d /engines/mads
parentfac601ae2ec7efea502d4c75e8f2941ab7ca1c46 (diff)
downloadscummvm-rg350-51d5f6c2b843760615e262f51d1791d9bf10bdf8.tar.gz
scummvm-rg350-51d5f6c2b843760615e262f51d1791d9bf10bdf8.tar.bz2
scummvm-rg350-51d5f6c2b843760615e262f51d1791d9bf10bdf8.zip
MADS: Phantom: Implement deleteSequence()
I've left in a CHECKME for the part of the code I'm not 100% sure. Unfortunately, this can't really be tested yet until animations work properly
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/scene.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 9fe601ecb3..6101be67a6 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -796,7 +796,15 @@ void Scene::drawToBackground(int series_id, int sprite_id, Common::Point pos, in
}
void Scene::deleteSequence(int idx) {
- warning("TODO: Scene::deleteSequence");
+ if (_sequences[idx]._active && _sequences[idx]._dynamicHotspotIndex >= 0)
+ _dynamicHotspots.remove(_sequences[idx]._dynamicHotspotIndex);
+
+ _sequences[idx]._active = false;
+
+ if (!_sequences[idx]._doneFlag)
+ doFrame(); // FIXME/CHECKME: Is this correct?
+ else
+ _sequences.remove(idx);
}
void Scene::loadSpeech(int idx) {