From 51d5f6c2b843760615e262f51d1791d9bf10bdf8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 22 Oct 2015 03:23:08 +0300 Subject: 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 --- engines/mads/scene.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engines') 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) { -- cgit v1.2.3