diff options
author | Strangerke | 2011-12-28 01:17:34 +0100 |
---|---|---|
committer | Strangerke | 2011-12-28 01:17:34 +0100 |
commit | 4f5a708d7dc8d4040e866430df7ab019379f3e03 (patch) | |
tree | 1a9a51659b7c93ea72676c79254d357749c8ae77 /engines/tsage/ringworld2 | |
parent | 93173a11cad9f22978f573c9424b7e01971bf541 (diff) | |
download | scummvm-rg350-4f5a708d7dc8d4040e866430df7ab019379f3e03.tar.gz scummvm-rg350-4f5a708d7dc8d4040e866430df7ab019379f3e03.tar.bz2 scummvm-rg350-4f5a708d7dc8d4040e866430df7ab019379f3e03.zip |
TSAGE: R2R - Implement scene 3700
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 3 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.cpp | 73 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.h | 17 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.cpp | 217 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.h | 26 |
5 files changed, 336 insertions, 0 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index dfa135be6c..1b6c375b80 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -224,7 +224,10 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { return new Scene3400(); case 3500: case 3600: + error("Missing scene %d from group 3", sceneNumber); case 3700: + // Cutscene - Teleport outside + return new Scene3700(); case 3800: case 3900: error("Missing scene %d from group 3", sceneNumber); diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp index 85e1f7760b..4c749a9166 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp @@ -1945,5 +1945,78 @@ void Scene3400::signal() { } } +/*-------------------------------------------------------------------------- + * Scene 3700 - Cutscene - Teleport outside + * + *--------------------------------------------------------------------------*/ +void Scene3700::postInit(SceneObjectList *OwnerList) { + loadScene(3700); + R2_GLOBALS._v58CE2 = 0; + SceneExt::postInit(); + + _stripManager.setColors(60, 255); + _stripManager.setFontNumber(3); + _stripManager.addSpeaker(&_quinnSpeaker); + _stripManager.addSpeaker(&_seekerSpeaker); + _stripManager.addSpeaker(&_mirandaSpeaker); + + _actor1.postInit(); + _actor1._moveDiff = Common::Point(3, 2); + + _actor2.postInit(); + _actor2._numFrames = 7; + _actor2._moveDiff = Common::Point(5, 3); + _actor2.hide(); + + _actor3.postInit(); + _actor3._moveDiff = Common::Point(3, 2); + _actor3.hide(); + + _actor4.postInit(); + _actor4._numFrames = 7; + _actor4._moveDiff = Common::Point(5, 3); + _actor4.hide(); + + _actor5.postInit(); + + R2_GLOBALS._player.postInit(); + R2_GLOBALS._sound1.play(332); + + _sceneMode = 3700; + setAction(&_sequenceManager, this, 3700, &_actor1, &_actor2, &_actor3, &_actor4, &_actor5, NULL); +} + +void Scene3700::remove() { + R2_GLOBALS._sound1.fadeOut2(NULL); + SceneExt::remove(); +} + +void Scene3700::signal() { + switch (_sceneMode) { + case 3328: + // No break on purpose + case 3329: + warning("STUB: sub_1D227()"); + setAction(&_sequenceManager, this, 3701, &_actor2, &_actor3, &_actor4, NULL); + break; + case 3700: + _actor1.setup(10, 6, 1); + _actor2.setup(20, 5, 1); + if (R2_GLOBALS.getFlag(71)) { + _sceneMode = 3329; + _stripManager.start(3329, this); + } else { + _sceneMode = 3328; + _stripManager.start(3328, this); + } + case 3701: + R2_GLOBALS._sceneManager.changeScene(1000); + break; + default: + R2_GLOBALS._player.enableControl(); + break; + } +} + } // 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 8968bddf1a..f83417e772 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.h +++ b/engines/tsage/ringworld2/ringworld2_scenes3.h @@ -424,6 +424,23 @@ public: virtual void signal(); virtual void synchronize(Serializer &s); }; + +class Scene3700 : public SceneExt { +public: + SpeakerQuinn3700 _quinnSpeaker; + SpeakerSeeker3700 _seekerSpeaker; + SpeakerMiranda3700 _mirandaSpeaker; + SceneActor _actor1; + SceneActor _actor2; + SceneActor _actor3; + SceneActor _actor4; + SceneActor _actor5; + SequenceManager _sequenceManager; + + virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void remove(); + 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 edcf340e04..25ad156cd3 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.cpp +++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp @@ -1915,5 +1915,222 @@ void SpeakerTeal3400::proc15() { } } +SpeakerQuinn3700::SpeakerQuinn3700() { + _speakerName = "QUINN"; + _color1 = 60; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerQuinn3700::setText(const Common::String &msg) { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; + + switch (_fieldF6) { + case 2: + scene->_actor3.setup(30, 1, 1); + R2_GLOBALS._sound2.play(44); + break; + case 3: + scene->_actor3.setup(30, 1, 1); + break; + default: + scene->_actor3.setup(30, 7, 1); + break; + } + VisualSpeaker::setText(msg); +} + +void SpeakerQuinn3700::proc15() { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + _object2 = &scene->_actor1; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + R2_GLOBALS._player.disableControl(); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + _object1.setPosition(_object2->_position); + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + R2_GLOBALS._sound2.stop(); + scene->_actor1.setup(10, 4, 1); + scene->_actor3.setup(30, 7, 1); + _object1.setup(3701, 1, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor2.setup(20, 1, 1); + scene->_actor3.setup(30, 1, 1); + _object1.setup(3701, 2, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 3: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor1.setup(10, 2, 1); + scene->_actor3.setup(30, 1, 1); + _object1.setup(4011, 1, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; + } +} + +SpeakerSeeker3700::SpeakerSeeker3700() { + _speakerName = "SEEKER"; + _color1 = 35; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerSeeker3700::setText(const Common::String &msg) { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; + + if (_fieldF6 == 1) { + R2_GLOBALS._sound2.play(44); + scene->_actor3.setup(30, 8, 1); + } else { + scene->_actor3.setup(30, 2, 1); + } + VisualSpeaker::setText(msg); +} + +void SpeakerSeeker3700::proc15() { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + _object2 = &scene->_actor2; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + R2_GLOBALS._player.disableControl(); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + _object1.setPosition(_object2->_position); + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + R2_GLOBALS._sound2.stop(); + scene->_actor1.setup(10, 8, 1); + scene->_actor2.setup(20, 7, 1); + scene->_actor3.setup(30, 8, 1); + _object1.setup(3701, 3, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor1.setup(10, 2, 1); + scene->_actor2.setup(20, 1, 1); + scene->_actor3.setup(30, 1, 1); + _object1.setup(4031, 1, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; + } +} + +SpeakerMiranda3700::SpeakerMiranda3700() { + _speakerName = "MIRANDA"; + _color1 = 154; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerMiranda3700::proc15() { + Scene3700 *scene = (Scene3700 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + _object2 = &scene->_actor3; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + R2_GLOBALS._player.disableControl(); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + _object1.setPosition(_object2->_position); + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor1.setup(10, 6, 1); + scene->_actor2.setup(20, 5, 1); + _object2->setup(30, 1, 1); + scene->_actor4.setup(40, 1, 1); + _object1.setup(4050, 5, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor3.setup(30, 8, 1); + _object1.setup(4052, 3, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + case 3: + ((SceneItem *)_action)->_sceneRegionId = 0; + scene->_actor2.setup(20, 1, 1); + scene->_actor3.setup(30, 1, 1); + _object1.setup(4051, 7, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; + } +} + } // 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 f85b412f9c..e4ea036938 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.h +++ b/engines/tsage/ringworld2/ringworld2_speakers.h @@ -428,6 +428,32 @@ public: virtual Common::String getClassName() { return "SpeakerTeal3400"; } virtual void proc15(); }; + +class SpeakerQuinn3700 : public VisualSpeaker { +public: + SpeakerQuinn3700(); + + virtual Common::String getClassName() { return "SpeakerQuinn3700"; } + virtual void setText(const Common::String &msg); + virtual void proc15(); +}; + +class SpeakerSeeker3700 : public VisualSpeaker { +public: + SpeakerSeeker3700(); + + virtual Common::String getClassName() { return "SpeakerSeeker3700"; } + virtual void setText(const Common::String &msg); + virtual void proc15(); +}; + +class SpeakerMiranda3700 : public VisualSpeaker { +public: + SpeakerMiranda3700(); + + virtual Common::String getClassName() { return "SpeakerMiranda3700"; } + virtual void proc15(); +}; } // End of namespace Ringworld2 } // End of namespace TsAGE |