From ba34b1f8823e9e39a6d9c5bed76f10910d8c65ec Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 24 Apr 2014 07:13:44 +0200 Subject: MADS: Implement scene 321 --- engines/mads/nebular/nebular_scenes3.cpp | 37 ++++++++++++++++++++++++++++++++ engines/mads/nebular/nebular_scenes3.h | 12 +++++++++++ 2 files changed, 49 insertions(+) (limited to 'engines/mads') diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp index 9f4873f55a..b0b837bd6f 100644 --- a/engines/mads/nebular/nebular_scenes3.cpp +++ b/engines/mads/nebular/nebular_scenes3.cpp @@ -3639,5 +3639,42 @@ void Scene320::actions() { /*------------------------------------------------------------------------*/ +void Scene321::setup() { + setPlayerSpritesPrefix(); + setAAName(); +} + +void Scene321::enter() { + _game._player._visible = false; + _game._player._stepEnabled = false; + + _scene->_userInterface.emptyConversationList(); + _scene->_userInterface.setup(kInputConversation); + + int suffixNum; + if (_globals[kSexOfRex] == REX_FEMALE) { + _globals[kSexOfRex] = REX_MALE; + suffixNum = 1; + } else { + _globals[kSexOfRex] = REX_FEMALE; + suffixNum = _game._visitedScenes._sceneRevisited ? 2 : 0; + } + + _scene->loadAnimation(formAnimName('g', suffixNum), 60); + sceneEntrySound(); +} + +void Scene321::step() { + if (_scene->_activeAnimation != nullptr) { + if ((_scene->_activeAnimation->getCurrentFrame() >= 260) && (_globals[kSexOfRex] == REX_MALE) && (_game._storyMode >= STORYMODE_NICE)) + _scene->_nextSceneId = 316; + } + + if (_game._trigger == 60) + _scene->_nextSceneId = 316; +} + +/*------------------------------------------------------------------------*/ + } // 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 79ffa316f2..6da0f3e320 100644 --- a/engines/mads/nebular/nebular_scenes3.h +++ b/engines/mads/nebular/nebular_scenes3.h @@ -337,6 +337,18 @@ public: virtual void postActions() {}; }; +class Scene321: public Scene3xx { +public: + Scene321(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