From 66f2a8572155caea28c0ff803d0028710cc7c4ff Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 18 Apr 2014 22:15:22 +0200 Subject: MADS: Implement scene 310 --- engines/mads/nebular/nebular_scenes.cpp | 2 ++ engines/mads/nebular/nebular_scenes3.cpp | 34 ++++++++++++++++++++++++++++++++ engines/mads/nebular/nebular_scenes3.h | 15 ++++++++++++++ 3 files changed, 51 insertions(+) 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 @@ -1430,6 +1430,40 @@ void Scene309::step() { _scene->_nextSceneId = 308; } +/*------------------------------------------------------------------------*/ + +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 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 -- cgit v1.2.3