From ee7e7e68343b65ec76eea986075bc0b753386546 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 9 Apr 2014 19:39:03 +0200 Subject: MADS: Implement scene 212 --- engines/mads/nebular/nebular_scenes.cpp | 2 ++ engines/mads/nebular/nebular_scenes2.cpp | 61 ++++++++++++++++++++++++++++++++ engines/mads/nebular/nebular_scenes2.h | 10 ++++++ 3 files changed, 73 insertions(+) diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index a3a1433062..0077b5f427 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -69,6 +69,8 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { return new Scene210(vm); case 211: return new Scene211(vm); + case 212: + return new Scene212(vm); // Scene group #8 case 804: diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp index 5c966cf664..77e5234109 100644 --- a/engines/mads/nebular/nebular_scenes2.cpp +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -4592,5 +4592,66 @@ void Scene211::actions() { /*------------------------------------------------------------------------*/ +void Scene212::setup() { + setPlayerSpritesPrefix(); + setAAName(); + + _scene->addActiveVocab(0x19D); +} + +void Scene212::enter() { + // CHECKME: Some useless variables have been remove here + + if (_scene->_priorSceneId == 208) { + _game._player._playerPos = Common::Point(195, 85); + _game._player._facing = FACING_SOUTH; + } else if (_scene->_priorSceneId != -2) { + _game._player._playerPos = Common::Point(67, 117); + _game._player._facing = FACING_NORTHEAST; + } + + sceneEntrySound(); +} + +void Scene212::step() { +// CHECKME: Could we move the dino? +} + +void Scene212::preActions() { + if (_action.isAction(0x18B, 0x41)) + _game._player._walkOffScreenSceneId = 111; +} + +void Scene212::actions() { + if (_action._lookFlag) + _vm->_dialogs->show(0x52D9); + else if (_action.isAction(0x18C) && (_action.isAction(0x82) || _action.isAction(0xE8))) + _scene->_nextSceneId = 208; + else if (_action.isAction(0x18C, 0x3F)) + _scene->_nextSceneId = 111; + else if (_action.isAction(VERB_LOOK, 0x19C)) + _vm->_dialogs->show(0x52D1); + else if (_action.isAction(VERB_LOOK, 0x129)) + _vm->_dialogs->show(0x52D2); + else if (_action.isAction(VERB_LOOK, 0x41)) + _vm->_dialogs->show(0x52D3); + else if (_action.isAction(VERB_LOOK, 0x142)) + _vm->_dialogs->show(0x52D4); + else if (_action.isAction(VERB_LOOK, 0x82)) + _vm->_dialogs->show(0x52D5); + else if (_action.isAction(VERB_LOOK, 0x175)) + _vm->_dialogs->show(0x52D6); + else if (_action.isAction(VERB_LOOK, 0x110)) + _vm->_dialogs->show(0x52D7); + else if (_action.isAction(VERB_LOOK, 0xE8)) + _vm->_dialogs->show(0x52D8); + else + return; + + _action._inProgress = false; +} + +/*------------------------------------------------------------------------*/ + } // End of namespace Nebular } // End of namespace MADS diff --git a/engines/mads/nebular/nebular_scenes2.h b/engines/mads/nebular/nebular_scenes2.h index 738c61fe5c..0b446bbeb1 100644 --- a/engines/mads/nebular/nebular_scenes2.h +++ b/engines/mads/nebular/nebular_scenes2.h @@ -255,6 +255,16 @@ public: virtual void postActions() {}; }; +class Scene212: public Scene2xx { +public: + Scene212(MADSEngine *vm) : Scene2xx(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