diff options
author | Strangerke | 2014-05-05 20:56:18 +0200 |
---|---|---|
committer | Strangerke | 2014-05-05 20:56:18 +0200 |
commit | 555f6a3ddac038ae5fa761ad258781340fb6f087 (patch) | |
tree | a7dd06e6e9ab590900fb749f504c5ab2b95578b9 /engines/mads | |
parent | 183dd320963607d7ee1037367c1c86d4b7b77983 (diff) | |
download | scummvm-rg350-555f6a3ddac038ae5fa761ad258781340fb6f087.tar.gz scummvm-rg350-555f6a3ddac038ae5fa761ad258781340fb6f087.tar.bz2 scummvm-rg350-555f6a3ddac038ae5fa761ad258781340fb6f087.zip |
MADS: Some renaming in scene8xx and scene804, implement scene 807
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/nebular/nebular_scenes.cpp | 10 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes8.cpp | 75 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes8.h | 19 |
3 files changed, 86 insertions, 18 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index f192c04842..e2411672dc 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -282,22 +282,20 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { error("Invalid scene %d called", scene._nextSceneId); // Scene group #8 + case 804: + return new Scene804(vm); + case 807: + return new Scene807(vm); case 801: // TODO case 802: // TODO case 803: // TODO - // Fall-through for unimplemented scenes in group #8 - error("Invalid scene %d called", scene._nextSceneId); - case 804: - return new Scene804(vm); case 805: // TODO case 806: // TODO - case 807: - // TODO case 808: // TODO case 810: diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp index 145dbdcfb6..1ae10ed72b 100644 --- a/engines/mads/nebular/nebular_scenes8.cpp +++ b/engines/mads/nebular/nebular_scenes8.cpp @@ -30,7 +30,7 @@ namespace MADS { namespace Nebular { -void Scene8xx::setup1() { +void Scene8xx::setPlayerSpritesPrefix() { _vm->_sound->command(5); if ((_globals[kFromCockpit] && !_globals[kExitShip]) || _scene->_nextSceneId == 804 || _scene->_nextSceneId == 805 || @@ -44,12 +44,14 @@ void Scene8xx::setup1() { _vm->_palette->setEntry(17, 0x0A, 0x2D, 0x2D); } -void Scene8xx::setup2() { +void Scene8xx::setAAName() { _game._aaName = Resources::formatAAName(5); } -void Scene8xx::enter1() { - if (_vm->_musicFlag) { +void Scene8xx::sceneEntrySound() { + if (!_vm->_musicFlag) + _vm->_sound->command(2); + else { switch (_scene->_nextSceneId) { case 801: case 802: @@ -75,8 +77,8 @@ void Scene8xx::enter1() { /*------------------------------------------------------------------------*/ void Scene804::setup() { - Scene8xx::setup1(); - Scene8xx::setup2(); + Scene8xx::setPlayerSpritesPrefix(); + Scene8xx::setAAName(); } void Scene804::enter() { @@ -130,7 +132,7 @@ void Scene804::enter() { _scene->loadAnimation(Resources::formatName(804, 'r', 1, EXT_AA, "")); - Scene8xx::enter1(); + Scene8xx::sceneEntrySound(); if (_globals[kInSpace] && !_globals[kWindowFixed]) { _scene->_userInterface.setup(kInputLimitedSentences); @@ -306,6 +308,63 @@ void Scene804::step() { } } -} // End of namespace Nebular +/*------------------------------------------------------------------------*/ + +void Scene807::setup() { + _game._player._spritesPrefix = ""; + // The original was calling Scene8xx::setAAName() + _game._aaName = Resources::formatAAName(5); +} + +void Scene807::enter() { + if (_globals[kSexOfRex] == REX_FEMALE) + _handSpriteId = _scene->_sprites.addSprites("*ROXHAND"); + else + _handSpriteId = _scene->_sprites.addSprites("*REXHAND"); + + teleporterEnter(); + + // The original uses Scene8xx::SceneEntrySound() + if (!_vm->_musicFlag) + _vm->_sound->command(2); + else + _vm->_sound->command(20); +} +void Scene807::step() { + teleporterStep(); +} + +void Scene807::actions() { + if (teleporterActions()) { + _action._inProgress = false; + return; + } + + if (_action.isAction(VERB_LOOK, 0x181)) + _vm->_dialogs->show(80710); + else if (_action.isAction(0x103, 0x181)) + _vm->_dialogs->show(80710); + else if (_action.isAction(VERB_LOOK, 0xC4) && _action.isAction(0xB7, 0xC4)) + _vm->_dialogs->show(80711); + else if (_action.isAction(VERB_LOOK, 0x1CC)) + _vm->_dialogs->show(80712); + else if (_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, 0x1D0) + || _action.isAction(VERB_LOOK, 0x1DB) || _action.isAction(VERB_LOOK, 0x1DA)) + _vm->_dialogs->show(80713); + else if (_action.isAction(VERB_LOOK, 0x1CF) && _action._lookFlag) + _vm->_dialogs->show(80714); + else + return; + + _action._inProgress = false; +} + +/*------------------------------------------------------------------------*/ + +} // End of namespace Nebular } // End of namespace MADS diff --git a/engines/mads/nebular/nebular_scenes8.h b/engines/mads/nebular/nebular_scenes8.h index 2fb1abfe19..2c777d8699 100644 --- a/engines/mads/nebular/nebular_scenes8.h +++ b/engines/mads/nebular/nebular_scenes8.h @@ -37,17 +37,17 @@ protected: /** * Initial setup code shared by several scenes */ - void setup1(); + void setPlayerSpritesPrefix(); /** * Initial setup code shared by several scenes */ - void setup2(); + void setAAName(); /** * Common scene enter code used by multiple scenes */ - void enter1(); + void sceneEntrySound(); public: Scene8xx(MADSEngine *vm) : NebularScene(vm) {} }; @@ -72,8 +72,19 @@ public: virtual void actions() {}; }; -} // End of namespace Nebular +class Scene807: public SceneTeleporter { +public: + Scene807(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 #endif /* MADS_NEBULAR_SCENES8_H */ |