diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index cf294fa9625..3503765ef56 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -193,6 +193,8 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { // Cutscene : Guards in cargo zone return new Scene3220(); case 3230: + // Cutscene : Guards on duty + return new Scene3230(); case 3240: case 3245: case 3250: diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp index 097097308ab..a07076bcba3 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp @@ -1002,5 +1002,31 @@ void Scene3220::signal() { R2_GLOBALS._sceneManager.changeScene(1200); } +/*-------------------------------------------------------------------------- + * Scene 3230 - Cutscene : Guards on duty + * + *--------------------------------------------------------------------------*/ +void Scene3230::postInit(SceneObjectList *OwnerList) { + loadScene(3230); + R2_GLOBALS._v58CE2 = 0; + SceneExt::postInit(); + + _stripManager.addSpeaker(&_rockoSpeaker); + _stripManager.addSpeaker(&_jockoSpeaker); + + R2_GLOBALS._player.postInit(); + R2_GLOBALS._player.hide(); + R2_GLOBALS._player.disableControl(); + + _actor1.postInit(); + _actor2.postInit(); + _actor3.postInit(); + + setAction(&_sequenceManager, this, 3230 + R2_GLOBALS._randomSource.getRandomNumber(1), &_actor1, &_actor2, &_actor3, NULL); +} + +void Scene3230::signal() { + R2_GLOBALS._sceneManager.changeScene(1200); +} } // End of namespace Ringworld2 } // End of namespace TsAGE diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h index afd39769f04..6bff8bc6d80 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.h +++ b/engines/tsage/ringworld2/ringworld2_scenes3.h @@ -223,6 +223,19 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void signal(); }; + +class Scene3230 : public SceneExt { +public: + SpeakerRocko3230 _rockoSpeaker; + SpeakerJocko3230 _jockoSpeaker; + SceneActor _actor1; + SceneActor _actor2; + SceneActor _actor3; + SequenceManager _sequenceManager; + + virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void signal(); +}; } // End of namespace Ringworld2 } // End of namespace TsAGE diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp index c216486d7f1..4c0494c214f 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.cpp +++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp @@ -1298,5 +1298,75 @@ void SpeakerJocko3220::proc15() { } } +SpeakerRocko3230::SpeakerRocko3230() { + _speakerName = "Rocko"; + _color1 = 5; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerRocko3230::proc15() { + int v = _fieldF6; + Scene3230 *scene = (Scene3230 *)R2_GLOBALS._sceneManager._scene; + + if (!_object2) { + _object2 = &scene->_actor1; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + if (v == 0) { + _object1.animate(ANIM_MODE_2, NULL); + } else { + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4111, (_object2->_strip * 2) - 1, 1); + _object1.animate(ANIM_MODE_5, this); + } +} + +SpeakerJocko3230::SpeakerJocko3230() { + _speakerName = "Jocko"; + _color1 = 45; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerJocko3230::proc15() { + int v = _fieldF6; + Scene3230 *scene = (Scene3230 *)R2_GLOBALS._sceneManager._scene; + + if (!_object2) { + _object2 = &scene->_actor2; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + if (v == 0) { + _object1.animate(ANIM_MODE_2, NULL); + } else { + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4060, (_object2->_strip * 2) - 1, 1); + _object1.animate(ANIM_MODE_5, this); + } +} + } // End of namespace Ringworld2 } // End of namespace TsAGE diff --git a/engines/tsage/ringworld2/ringworld2_speakers.h b/engines/tsage/ringworld2/ringworld2_speakers.h index fef700387e1..71933f3ec9d 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.h +++ b/engines/tsage/ringworld2/ringworld2_speakers.h @@ -325,6 +325,21 @@ public: virtual void proc15(); }; +class SpeakerRocko3230 : public VisualSpeaker { +public: + SpeakerRocko3230(); + + virtual Common::String getClassName() { return "SpeakerRocko3230"; } + virtual void proc15(); +}; + +class SpeakerJocko3230 : public VisualSpeaker { +public: + SpeakerJocko3230(); + + virtual Common::String getClassName() { return "SpeakerJocko3230"; } + virtual void proc15(); +}; } // End of namespace Ringworld2 } // End of namespace TsAGE