diff options
author | Strangerke | 2014-04-27 10:28:28 +0200 |
---|---|---|
committer | Strangerke | 2014-04-27 10:28:28 +0200 |
commit | da1b4c8316d0b960b6e44553a965e863c6ba2345 (patch) | |
tree | 400f3dd9b2db6d1b2505e94f8ae04f95e9b99292 | |
parent | 2cff7557fe57581c578b8eb17e099597ee33cbc1 (diff) | |
download | scummvm-rg350-da1b4c8316d0b960b6e44553a965e863c6ba2345.tar.gz scummvm-rg350-da1b4c8316d0b960b6e44553a965e863c6ba2345.tar.bz2 scummvm-rg350-da1b4c8316d0b960b6e44553a965e863c6ba2345.zip |
MADS: Implement scene 357
-rw-r--r-- | engines/mads/nebular/nebular_scenes.cpp | 4 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes3.cpp | 67 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes3.h | 11 |
3 files changed, 82 insertions, 0 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index 21c3e9cd58..00b49d014f 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -138,6 +138,10 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { return new Scene352(vm); case 353: return new Scene353(vm); + case 354: + return new Scene354(vm); + case 357: + return new Scene357(vm); // Scene group #8 case 804: diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp index 41777b116e..e7f1dda703 100644 --- a/engines/mads/nebular/nebular_scenes3.cpp +++ b/engines/mads/nebular/nebular_scenes3.cpp @@ -4490,5 +4490,72 @@ void Scene354::actions() { /*------------------------------------------------------------------------*/ +void Scene357::setup() { + setPlayerSpritesPrefix(); + setAAName(); +} + +void Scene357::enter() { + _globals[kAfterHavoc] = true; + _globals._spriteIndexes[1] = _scene->_sprites.addSprites(Resources::formatName(307, 'X', 0, EXT_SS, "")); + _globals._sequenceIndexes[1] = _scene->_sequences.startCycle(_globals._spriteIndexes[1], false, 1); + _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[1], Common::Point(127, 78)); + _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 15); + + if (_scene->_priorSceneId == 318) + _game._player._playerPos = Common::Point(298, 142); + else if (_scene->_priorSceneId == 313) + _game._player._playerPos = Common::Point(127, 101); + else if (_scene->_priorSceneId != -2) + _game._player._playerPos = Common::Point(15, 148); + + sceneEntrySound(); +} + +void Scene357::preActions() { + if (_action.isAction(0x1AD, 0x2B9)) + _game._player._walkOffScreenSceneId = 318; + + if (_action.isAction(0x1AD, 0x2BA)) + _game._player._walkOffScreenSceneId = 358; +} + +void Scene357::actions() { + if (_action._lookFlag) + _vm->_dialogs->show(0x8B83); + else if (_action.isAction(VERB_LOOK, 0x11)) + _vm->_dialogs->show(0x8B7E); + else if (_action.isAction(0x2F7, 0x11)) + _vm->_dialogs->show(0x8B7F); + else if (_action.isAction(VERB_LOOK, 0x1CB)) + _vm->_dialogs->show(0x8B80); + else if (_action.isAction(VERB_LOOK, 0x216)) + _vm->_dialogs->show(0x8B81); + else if (_action.isAction(VERB_LOOK, 0x21B)) + _vm->_dialogs->show(0x8B82); + else if (_action.isAction(VERB_LOOK, 0x207)) + _vm->_dialogs->show(0x8B84); + else if (_action.isAction(VERB_LOOK, 0xCD)) + _vm->_dialogs->show(0x8B85); + else if (_action.isAction(VERB_LOOK, 0x23A)) + _vm->_dialogs->show(0x8B86); + else if (_action.isAction(VERB_LOOK, 0x218)) + _vm->_dialogs->show(0x8B87); + else if (_action.isAction(VERB_TAKE, 0x218)) + _vm->_dialogs->show(0x8B88); + else if (_action.isAction(VERB_LOOK, 0x18D)) + _vm->_dialogs->show(0x8B89); + else if (_action.isAction(VERB_LOOK, 0x2B9)) + _vm->_dialogs->show(0x8B8A); + else if (_action.isAction(VERB_LOOK, 0x2BA)) + _vm->_dialogs->show(0x8B8B); + else + return; + + _action._inProgress = false; +} + +/*------------------------------------------------------------------------*/ + } // End of namespace Nebular } // End of namespace MADS diff --git a/engines/mads/nebular/nebular_scenes3.h b/engines/mads/nebular/nebular_scenes3.h index 8950fa5981..e27806b182 100644 --- a/engines/mads/nebular/nebular_scenes3.h +++ b/engines/mads/nebular/nebular_scenes3.h @@ -411,6 +411,17 @@ public: virtual void postActions() {}; }; +class Scene357: public Scene3xx { +public: + Scene357(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 |