diff options
author | Strangerke | 2011-12-22 17:12:08 +0100 |
---|---|---|
committer | Strangerke | 2011-12-22 18:35:30 +0100 |
commit | cdd9ab3b70da5abe287cc5ef4baa0c5b40e3bfd4 (patch) | |
tree | 6ed144b7dce9c12b609b2d86c32317257df5680d /engines/tsage/ringworld2 | |
parent | e6a671b555500de4f870d73cbd785e40f76d0d33 (diff) | |
download | scummvm-rg350-cdd9ab3b70da5abe287cc5ef4baa0c5b40e3bfd4.tar.gz scummvm-rg350-cdd9ab3b70da5abe287cc5ef4baa0c5b40e3bfd4.tar.bz2 scummvm-rg350-cdd9ab3b70da5abe287cc5ef4baa0c5b40e3bfd4.zip |
TSAGE: R2R - Implement scene 3245
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.cpp | 34 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.h | 12 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.cpp | 96 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.h | 16 |
5 files changed, 160 insertions, 0 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index 0f43704fa8..f7dcc56d42 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -199,6 +199,8 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { // Cutscene : Teal monolog return new Scene3240(); case 3245: + // Cutscene : Discussions with Dr. Tomko + return new Scene3245(); case 3250: case 3255: case 3260: diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp index 326591178d..aa7361b77b 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp @@ -1056,5 +1056,39 @@ void Scene3240::signal() { R2_GLOBALS._sceneManager.changeScene(1200); } +/*-------------------------------------------------------------------------- + * Scene 3245 - Cutscene : Discussions with Dr. Tomko + * + *--------------------------------------------------------------------------*/ +void Scene3245::postInit(SceneObjectList *OwnerList) { + loadScene(3245); + R2_GLOBALS._v58CE2 = 0; + SceneExt::postInit(); + + _stripManager.addSpeaker(&_ralfSpeaker); + _stripManager.addSpeaker(&_tomkoSpeaker); + + R2_GLOBALS._player.postInit(); + R2_GLOBALS._player.hide(); + R2_GLOBALS._player.disableControl(); + + _actor1.postInit(); + _actor2.postInit(); + + if (R2_GLOBALS._v56AA1 < 4) + ++R2_GLOBALS._v56AA1; + + if (R2_GLOBALS._v56AA1 >= 4) { + SceneItem::display(1200, 7, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); + signal(); + } else { + setAction(&_sequenceManager, this, 3244 + R2_GLOBALS._v56AA1, &_actor1, &_actor2, NULL); + } +} + +void Scene3245::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 d652788e14..96fa65e70f 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.h +++ b/engines/tsage/ringworld2/ringworld2_scenes3.h @@ -249,6 +249,18 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void signal(); }; + +class Scene3245 : public SceneExt { +public: + SpeakerRalf3245 _ralfSpeaker; + SpeakerTomko3245 _tomkoSpeaker; + SceneActor _actor1; + SceneActor _actor2; + 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 a14d3ea8ae..619b1c291f 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.cpp +++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp @@ -1438,5 +1438,101 @@ void SpeakerWebbster3240::proc15() { } } +SpeakerRalf3245::SpeakerRalf3245() { + _speakerName = "Ralf"; + _color1 = 5; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerRalf3245::proc15() { + int v = _fieldF6; + Scene3245 *scene = (Scene3245 *)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; + switch (_object2->_visage) { + case 3100: + _object1.setup(4105, (_object2->_strip * 2) - 1, 1); + break; + case 3101: + _object1.setup(4108, (_object2->_strip * 2) - 1, 1); + break; + case 3102: + _object1.setup(4109, (_object2->_strip * 2) - 1, 1); + break; + default: + break; + } + + _object1.animate(ANIM_MODE_5, this); + } +} + +SpeakerTomko3245::SpeakerTomko3245() { + _speakerName = "Tomko"; + _color1 = 10; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerTomko3245::proc15() { + int v = _fieldF6; + Scene3245 *scene = (Scene3245 *)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; + switch (_object2->_visage) { + case 3100: + _object1.setup(4105, (_object2->_strip * 2) - 1, 1); + break; + case 3101: + _object1.setup(4108, (_object2->_strip * 2) - 1, 1); + break; + case 3102: + _object1.setup(4109, (_object2->_strip * 2) - 1, 1); + break; + default: + break; + } + + _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 bb49b985dc..e6a1819eb3 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.h +++ b/engines/tsage/ringworld2/ringworld2_speakers.h @@ -356,6 +356,22 @@ public: virtual Common::String getClassName() { return "SpeakerWebbster3240"; } virtual void proc15(); }; + +class SpeakerRalf3245 : public VisualSpeaker { +public: + SpeakerRalf3245(); + + virtual Common::String getClassName() { return "SpeakerRalf3245"; } + virtual void proc15(); +}; + +class SpeakerTomko3245 : public VisualSpeaker { +public: + SpeakerTomko3245(); + + virtual Common::String getClassName() { return "SpeakerTomko3245"; } + virtual void proc15(); +}; } // End of namespace Ringworld2 } // End of namespace TsAGE |