diff options
-rw-r--r-- | engines/mads/phantom/phantom_scenes.cpp | 2 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes1.cpp | 65 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes1.h | 12 |
3 files changed, 78 insertions, 1 deletions
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp index 9ba7ca4157..755a2ad505 100644 --- a/engines/mads/phantom/phantom_scenes.cpp +++ b/engines/mads/phantom/phantom_scenes.cpp @@ -71,7 +71,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { case 114: // lower floor, storage room return new Scene114(vm); case 150: // cutscene - return new DummyScene(vm); // TODO + return new Scene150(vm); // Scene group #2 (theater entrance, offices, balcony) case 201: // entrance / ticket office diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp index 7db1616cce..a93be72592 100644 --- a/engines/mads/phantom/phantom_scenes1.cpp +++ b/engines/mads/phantom/phantom_scenes1.cpp @@ -9491,5 +9491,70 @@ void Scene114::preActions() { /*------------------------------------------------------------------------*/ +Scene150::Scene150(MADSEngine *vm) : Scene1xx(vm) { +} + +void Scene150::synchronize(Common::Serializer &s) { + Scene1xx::synchronize(s); +} + +void Scene150::setup() { + setPlayerSpritesPrefix(); + setAAName(); +} + +void Scene150::enter() { + warning("TODO: Switch to letter box view. See definition of MADS_MENU_Y"); + + _game._player._stepEnabled = false; + _game._player._visible = false; + + if (_scene->_priorSceneId == 113) + _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('l', 1), 1); + else if (_scene->_priorSceneId == 203) { + _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('f', 1), 2); + sceneEntrySound(); + } else if (_scene->_priorSceneId == 306) + _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('e', 1), 4); + else if (_scene->_priorSceneId == 208) + _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('h', 1), 3); + else + _globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('q', 1), 5); +} + +void Scene150::step() { + if (_game._trigger == 1) + _scene->_nextSceneId = 203; + + if (_game._trigger == 2) + _scene->_nextSceneId = 111; + + if (_game._trigger == 4) + _scene->_nextSceneId = 204; + + if (_game._trigger == 3) { + _globals[kJacquesStatus] = 1; + _scene->_nextSceneId = 205; + } + + if (_game._trigger == 5) + _game._winStatus = 1; + + if (_scene->_nextSceneId != _scene->_currentSceneId) { + byte pal[768]; + _vm->_palette->getFullPalette(pal); + Common::fill(&pal[12], &pal[756], 0); + _vm->_palette->setFullPalette(pal); + } +} + +void Scene150::actions() { +} + +void Scene150::preActions() { +} + +/*------------------------------------------------------------------------*/ + } // End of namespace Phantom } // End of namespace MADS diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h index 252d393679..e2b4faa79d 100644 --- a/engines/mads/phantom/phantom_scenes1.h +++ b/engines/mads/phantom/phantom_scenes1.h @@ -402,6 +402,18 @@ public: virtual void preActions(); virtual void actions(); }; + +class Scene150 : public Scene1xx { +public: + Scene150(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 |