From aac3206ec824bb6be8943c7afeff474fb0a2183f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 28 Apr 2014 22:43:00 +0200 Subject: MADS: Implement scene 391 --- engines/mads/nebular/nebular_scenes.cpp | 2 ++ engines/mads/nebular/nebular_scenes3.cpp | 38 ++++++++++++++++++++++++++++++++ engines/mads/nebular/nebular_scenes3.h | 12 ++++++++++ 3 files changed, 52 insertions(+) (limited to 'engines/mads') diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index 7b9e476fb3..caa72b1ffd 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -160,6 +160,8 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { return new Scene389(vm); case 390: return new Scene390(vm); + case 391: + return new Scene391(vm); // Scene group #8 case 804: diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp index 2d4022f944..a5d37b4a9a 100644 --- a/engines/mads/nebular/nebular_scenes3.cpp +++ b/engines/mads/nebular/nebular_scenes3.cpp @@ -5412,6 +5412,44 @@ void Scene390::actions() { _action._inProgress = false; } +/*------------------------------------------------------------------------*/ + +void Scene391::setup() { + setPlayerSpritesPrefix(); + setAAName(); +} + +void Scene391::enter() { + _scene->_userInterface.setup(kInputLimitedSentences); + _game._player._visible = false; + sceneEntrySound(); +} + +void Scene391::actions() { + if (_action.isAction(0x2D5, 0x2D4)) + _scene->_nextSceneId = 313; + else if (_action.isAction(VERB_OPEN, 0x2D3)) { + if (_globals[kKickedIn391Grate]) + _vm->_dialogs->show(0x98C9); + else { + _vm->_dialogs->show(0x98C8); + _globals[kKickedIn391Grate] = true; + } + + if (_globals[kAfterHavoc]) + _scene->_nextSceneId = 361; + else + _scene->_nextSceneId = 311; + } else if (_action.isAction(0xD3, 0x2D3)) { + if (_globals[kAfterHavoc]) + _vm->_dialogs->show(0x98C7); + else + _vm->_dialogs->show(0x98C6); + } else + return; + + _action._inProgress = false; +} /*------------------------------------------------------------------------*/ diff --git a/engines/mads/nebular/nebular_scenes3.h b/engines/mads/nebular/nebular_scenes3.h index 3b997a2709..111eade8d5 100644 --- a/engines/mads/nebular/nebular_scenes3.h +++ b/engines/mads/nebular/nebular_scenes3.h @@ -543,6 +543,18 @@ public: virtual void postActions() {}; }; +class Scene391: public Scene3xx { +public: + Scene391(MADSEngine *vm) : Scene3xx(vm) {} + + virtual void setup(); + virtual void enter(); + virtual void step() {}; + virtual void preActions() {} + virtual void actions(); + virtual void postActions() {}; +}; + } // End of namespace Nebular } // End of namespace MADS -- cgit v1.2.3