diff options
author | Strangerke | 2014-04-18 22:15:22 +0200 |
---|---|---|
committer | Strangerke | 2014-04-18 22:15:22 +0200 |
commit | 66f2a8572155caea28c0ff803d0028710cc7c4ff (patch) | |
tree | e152c642a589d2334ae61a5596850c5fdd30dd69 | |
parent | 058e1ae575cdb6acdc9625076c6449d2600c559c (diff) | |
download | scummvm-rg350-66f2a8572155caea28c0ff803d0028710cc7c4ff.tar.gz scummvm-rg350-66f2a8572155caea28c0ff803d0028710cc7c4ff.tar.bz2 scummvm-rg350-66f2a8572155caea28c0ff803d0028710cc7c4ff.zip |
MADS: Implement scene 310
-rw-r--r-- | engines/mads/nebular/nebular_scenes.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes3.cpp | 34 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes3.h | 15 |
3 files changed, 51 insertions, 0 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index 9978f574e8..ff32eabfe8 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -117,6 +117,8 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { return new Scene308(vm); case 309: return new Scene309(vm); + case 310: + return new Scene310(vm); // Scene group #8 case 804: diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp index aefc0189cc..b6f5142165 100644 --- a/engines/mads/nebular/nebular_scenes3.cpp +++ b/engines/mads/nebular/nebular_scenes3.cpp @@ -1432,5 +1432,39 @@ void Scene309::step() { /*------------------------------------------------------------------------*/ +void Scene310::setup() { + setPlayerSpritesPrefix(); + setAAName(); +} + +void Scene310::enter() { + _globals._spriteIndexes[1] = _scene->_sprites.addSprites("*SC003x0"); + _globals._spriteIndexes[0] = _scene->_sprites.addSprites("*SC003x1"); + _globals._spriteIndexes[2] = _scene->_sprites.addSprites("*SC003x2"); + + initForceField(&_forceField, true); + + _globals._spriteIndexes[3] = _scene->_sprites.addSprites(Resources::formatName(307, 'X', 0, EXT_SS, "")); + _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 1); + _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[3], Common::Point(127, 78)); + _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15); + + _game._player._visible = false; + _game._player._stepEnabled = false; + _scene->loadAnimation(formAnimName('a', -1), 70); + + sceneEntrySound(); +} + +void Scene310::step() { + handleForceField(&_forceField, &_globals._spriteIndexes[0]); + + if (_game._trigger == 70) + _scene->_nextSceneId = 309; +} + + +/*------------------------------------------------------------------------*/ + } // 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 4ca2c5a9ad..5b380c3ef1 100644 --- a/engines/mads/nebular/nebular_scenes3.h +++ b/engines/mads/nebular/nebular_scenes3.h @@ -188,6 +188,21 @@ public: virtual void postActions() {}; }; +class Scene310: public Scene3xx { +private: + ForceField _forceField; + +public: + Scene310(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 |