diff options
author | Strangerke | 2014-05-04 23:43:36 +0200 |
---|---|---|
committer | Strangerke | 2014-05-04 23:43:36 +0200 |
commit | 622f6eb7275912022c161ff22d74a5f4c28b77b3 (patch) | |
tree | a651ba2514d2832371a8cf70d69de99e70119f77 /engines/mads | |
parent | 5d1c0ef9189575552807d7939d3d39caf00be0d7 (diff) | |
download | scummvm-rg350-622f6eb7275912022c161ff22d74a5f4c28b77b3.tar.gz scummvm-rg350-622f6eb7275912022c161ff22d74a5f4c28b77b3.tar.bz2 scummvm-rg350-622f6eb7275912022c161ff22d74a5f4c28b77b3.zip |
MADS: Implement scene 502
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/nebular/nebular_scenes.cpp | 4 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes5.cpp | 57 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes5.h | 12 |
3 files changed, 71 insertions, 2 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index 95f7cab99d..0574ba9f29 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -193,9 +193,9 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { return new Scene413(vm); // Scene group #5 - case 501: - // TODO case 502: + return new Scene502(vm); + case 501: // TODO case 503: // TODO diff --git a/engines/mads/nebular/nebular_scenes5.cpp b/engines/mads/nebular/nebular_scenes5.cpp index b6684c8bca..eb1aa42dd3 100644 --- a/engines/mads/nebular/nebular_scenes5.cpp +++ b/engines/mads/nebular/nebular_scenes5.cpp @@ -92,5 +92,62 @@ void Scene5xx::sceneEntrySound() { /*------------------------------------------------------------------------*/ +void Scene502::setup() { + _game._player._spritesPrefix = ""; + // The original is using Scene5xx_setAAName() + _game._aaName = Resources::formatAAName(5); +} + +void Scene502::enter() { + if (_globals[kSexOfRex] == REX_MALE) + _handSpriteId = _scene->_sprites.addSprites("*REXHAND"); + else + _handSpriteId = _scene->_sprites.addSprites("*ROXHAND"); + + teleporterEnter(); + + // The original uses scene5xx_sceneEntrySound + if (!_vm->_musicFlag) + _vm->_sound->command(2); + else if (_scene->_priorSceneId == 503) + _vm->_sound->command(38); + else + _vm->_sound->command(29); +} + +void Scene502::step() { + teleporterStep(); +} + +void Scene502::actions() { + if (teleporterActions()) { + _action._inProgress = false; + return; + } + + if (_action.isAction(VERB_LOOK, 0x181) || _action.isAction(0x103, 0x181)) + _vm->_dialogs->show(50210); + else if (_action.isAction(VERB_LOOK, 0xC4)) + _vm->_dialogs->show(50211); + else if (_action.isAction(VERB_LOOK, 0x1CC)) + _vm->_dialogs->show(50212); + else if (_action.isAction(VERB_LOOK, 0x1D0) || _action.isAction(VERB_LOOK, 0x1D1) + || _action.isAction(VERB_LOOK, 0x1D2) || _action.isAction(VERB_LOOK, 0x1D3) + || _action.isAction(VERB_LOOK, 0x1D4) || _action.isAction(VERB_LOOK, 0x1D5) + || _action.isAction(VERB_LOOK, 0x1D6) || _action.isAction(VERB_LOOK, 0x1D7) + || _action.isAction(VERB_LOOK, 0x1D8) || _action.isAction(VERB_LOOK, 0x1D9) + || _action.isAction(VERB_LOOK, 0x1DB) || _action.isAction(VERB_LOOK, 0x7A) + || _action.isAction(VERB_LOOK, 0x1DA)) + _vm->_dialogs->show(50213); + else if (_action.isAction(VERB_LOOK, 0x1CF) || _action._lookFlag) + _vm->_dialogs->show(50214); + else + return; + + _action._inProgress = false; +} + +/*------------------------------------------------------------------------*/ + } // End of namespace Nebular } // End of namespace MADS diff --git a/engines/mads/nebular/nebular_scenes5.h b/engines/mads/nebular/nebular_scenes5.h index 4efbc4a5c1..2748f248d2 100644 --- a/engines/mads/nebular/nebular_scenes5.h +++ b/engines/mads/nebular/nebular_scenes5.h @@ -50,6 +50,18 @@ public: Scene5xx(MADSEngine *vm) : NebularScene(vm) {} }; +class Scene502: public SceneTeleporter { +public: + Scene502(MADSEngine *vm) : SceneTeleporter(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 |