aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/phantom
diff options
context:
space:
mode:
authorStrangerke2015-10-28 12:51:34 +0100
committerStrangerke2015-10-28 12:51:34 +0100
commit90e7f030c34a880ddc2000ad9fb9828abc58559a (patch)
tree236d48efac0099be85338bdb45229e823aa267a4 /engines/mads/phantom
parent0db7c488ead2eefbe029ea6bd09307fda0ba477a (diff)
downloadscummvm-rg350-90e7f030c34a880ddc2000ad9fb9828abc58559a.tar.gz
scummvm-rg350-90e7f030c34a880ddc2000ad9fb9828abc58559a.tar.bz2
scummvm-rg350-90e7f030c34a880ddc2000ad9fb9828abc58559a.zip
MADS: Phantom: Implement scene 306
Diffstat (limited to 'engines/mads/phantom')
-rw-r--r--engines/mads/phantom/phantom_scenes.cpp2
-rw-r--r--engines/mads/phantom/phantom_scenes3.cpp59
-rw-r--r--engines/mads/phantom/phantom_scenes3.h14
3 files changed, 74 insertions, 1 deletions
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 43478e2726..9c95798ad1 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -107,7 +107,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
case 305: // chandelier fight, phantom closeup
return new Scene305(vm);
case 306: // chandelier #2
- return new DummyScene(vm); // TODO
+ return new Scene306(vm);
case 307: // catwalk #3 above stage
return new DummyScene(vm); // TODO
case 308: // hidden staircase behind balcony box
diff --git a/engines/mads/phantom/phantom_scenes3.cpp b/engines/mads/phantom/phantom_scenes3.cpp
index c82e31ff55..4193babe7b 100644
--- a/engines/mads/phantom/phantom_scenes3.cpp
+++ b/engines/mads/phantom/phantom_scenes3.cpp
@@ -1527,5 +1527,64 @@ void Scene305::handle_animation_unmask() {
/*------------------------------------------------------------------------*/
+Scene306::Scene306(MADSEngine *vm) : Scene3xx(vm) {
+ _speechDoneFl = false;
+}
+
+void Scene306::synchronize(Common::Serializer &s) {
+ Scene3xx::synchronize(s);
+
+ s.syncAsByte(_speechDoneFl);
+}
+
+void Scene306::setup() {
+ setPlayerSpritesPrefix();
+ setAAName();
+}
+
+void Scene306::enter() {
+ _scene->loadSpeech(6);
+ _speechDoneFl = false;
+
+ warning("TODO: Switch to letter box view. See definition of MADS_MENU_Y");
+
+ _game._player._visible = false;
+ _game._player._stepEnabled = false;
+ _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('a', 1), 60);
+
+ sceneEntrySound();
+}
+
+void Scene306::step() {
+ if (_game._trigger == 60) {
+ if (_vm->_sound->_preferRoland)
+ _scene->_sequences.setTimingTrigger(120, 61);
+ else
+ _scene->_sequences.setTimingTrigger(300, 61);
+ }
+
+ if (!_speechDoneFl && (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 3)) {
+ _scene->playSpeech(6);
+ _speechDoneFl = true;
+ }
+
+ if (_game._trigger == 61) {
+ _vm->_sound->command(1);
+ _vm->_sound->command(66);
+ _scene->_sequences.setTimingTrigger(120, 62);
+ }
+
+ if (_game._trigger == 62)
+ _scene->_nextSceneId = 150;
+}
+
+void Scene306::actions() {
+}
+
+void Scene306::preActions() {
+}
+
+/*------------------------------------------------------------------------*/
+
} // End of namespace Phantom
} // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes3.h b/engines/mads/phantom/phantom_scenes3.h
index 8b69900bb0..4e0d2d068e 100644
--- a/engines/mads/phantom/phantom_scenes3.h
+++ b/engines/mads/phantom/phantom_scenes3.h
@@ -153,6 +153,20 @@ public:
virtual void actions();
};
+class Scene306 : public Scene3xx {
+private:
+ bool _speechDoneFl;
+
+public:
+ Scene306(MADSEngine *vm);
+ virtual void synchronize(Common::Serializer &s);
+
+ virtual void setup();
+ virtual void enter();
+ virtual void step();
+ virtual void preActions();
+ virtual void actions();
+};
} // End of namespace Phantom
} // End of namespace MADS