diff options
author | Strangerke | 2011-12-29 16:54:37 +0100 |
---|---|---|
committer | Strangerke | 2011-12-29 18:39:28 +0100 |
commit | 44a8e4ac1d963ec31e233884fce83ffdb007898c (patch) | |
tree | 30bdb1d025cb6fba2349cf2a1c0d8de890fd4af8 /engines | |
parent | 79bdefccc4f493dc16d6cdf3c986452c84d3a33e (diff) | |
download | scummvm-rg350-44a8e4ac1d963ec31e233884fce83ffdb007898c.tar.gz scummvm-rg350-44a8e4ac1d963ec31e233884fce83ffdb007898c.tar.bz2 scummvm-rg350-44a8e4ac1d963ec31e233884fce83ffdb007898c.zip |
TSAGE: R2R - Implement Scene 3385
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.cpp | 230 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.h | 47 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.cpp | 244 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.h | 32 |
5 files changed, 554 insertions, 0 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index 0e387083a5..4952cf1831 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -219,6 +219,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { case 3375: return new Scene3375(); case 3385: + return new Scene3385(); case 3395: error("Missing scene %d from group 3", sceneNumber); case 3400: diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp index 670143a70b..db1b9b6c21 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp @@ -2186,6 +2186,236 @@ void Scene3375::dispatch() { } /*-------------------------------------------------------------------------- + * Scene 3385 - + * + *--------------------------------------------------------------------------*/ +Scene3385::Scene3385() { + _field11B2 = 0; +} + +void Scene3385::synchronize(Serializer &s) { + SceneExt::synchronize(s); + + s.syncAsSint16LE(_field11B2); +} + +bool Scene3385::Actor1::startAction(CursorType action, Event &event) { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + if (action != CURSOR_TALK) + return SceneActor::startAction(action, event); + + scene->_sceneMode = 9999; + if (R2_GLOBALS._player._characterIndex == 2) + scene->_stripManager.start(3302, scene); + else + scene->_stripManager.start(3304, scene); + + return true; +} + +bool Scene3385::Actor2::startAction(CursorType action, Event &event) { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + if (action != CURSOR_TALK) + return SceneActor::startAction(action, event); + + scene->_sceneMode = 9999; + if (R2_GLOBALS._player._characterIndex == 3) + scene->_stripManager.start(3302, scene); + else + scene->_stripManager.start(3301, scene); + + return true; +} + +bool Scene3385::Actor3::startAction(CursorType action, Event &event) { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + if (action != CURSOR_TALK) + return SceneActor::startAction(action, event); + + scene->_sceneMode = 9999; + scene->_stripManager.start(3303, scene); + + return true; +} + +bool Scene3385::Actor4::startAction(CursorType action, Event &event) { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + if (action != CURSOR_USE) + return SceneActor::startAction(action, event); + + R2_GLOBALS._player.disableControl(CURSOR_ARROW); + if (R2_GLOBALS._sceneManager._previousScene == 3375) + R2_GLOBALS._sound2.play(314); + + scene->_sceneMode = 3386; + scene->setAction(&scene->_sequenceManager, scene, 3386, &R2_GLOBALS._player, &scene->_actor1, &scene->_actor2, &scene->_actor3, &scene->_actor4, NULL); + + return true; +} + +void Scene3385::Exit1::changeScene() { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + R2_GLOBALS._player.disableControl(CURSOR_ARROW); + scene->_sceneMode = 3387; + + if (R2_GLOBALS._sceneManager._previousScene == 3375) + scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_actor1, &scene->_actor2, &scene->_actor3, NULL); + else + scene->signal(); +} + +void Scene3385::Action1::signal() { + ++_actionIndex; + + if (_actionIndex == 0) + setDelay(1); + else if (_actionIndex == 1) + R2_GLOBALS._sound2.play(314); +} + +void Scene3385::postInit(SceneObjectList *OwnerList) { + loadScene(3385); + SceneExt::postInit(); + + R2_GLOBALS._sound1.play(313); + + _stripManager.setColors(60, 255); + _stripManager.setFontNumber(3); + _stripManager.addSpeaker(&_quinnSpeaker); + _stripManager.addSpeaker(&_seekerSpeaker); + _stripManager.addSpeaker(&_mirandaSpeaker); + _stripManager.addSpeaker(&_webbsterSpeaker); + + R2_GLOBALS._player._characterScene[1] = 3385; + R2_GLOBALS._player._characterScene[2] = 3385; + R2_GLOBALS._player._characterScene[3] = 3385; + + if (R2_GLOBALS._sceneManager._previousScene == 3375) + _field11B2 = 3; + else + _field11B2 = 4; + + setZoomPercents(102, 40, 200, 160); + R2_GLOBALS._player.postInit(); + + if (R2_GLOBALS._player._characterIndex == 2) + R2_GLOBALS._player._moveDiff = Common::Point(5, 3); + else + R2_GLOBALS._player._moveDiff = Common::Point(3, 2); + + R2_GLOBALS._player.changeZoom(-1); + + if (R2_GLOBALS._player._characterIndex == 2) + R2_GLOBALS._player.setup(20, _field11B2, 1); + else if (R2_GLOBALS._player._characterIndex == 3) + R2_GLOBALS._player.setup(30, _field11B2, 1); + else + R2_GLOBALS._player.setup(10, _field11B2, 1); + + R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); + R2_GLOBALS._player.disableControl(); + + _actor1.postInit(); + if (R2_GLOBALS._player._characterIndex == 2) { + _actor1._moveRate = 10; + _actor1._moveDiff = Common::Point(3, 2); + } else { + _actor1._moveRate = 7; + _actor1._moveDiff = Common::Point(5, 3); + } + _actor1.changeZoom(-1); + _actor1._effect = 1; + if (R2_GLOBALS._player._characterIndex == 2) + _actor1.setup(10, _field11B2, 1); + else + _actor1.setup(20, _field11B2, 1); + _actor1.animate(ANIM_MODE_1, NULL); + _actor1.setDetails(3385, -1, -1, -1, 1, (SceneItem *) NULL); + + _actor2.postInit(); + _actor2._moveDiff = Common::Point(3, 2); + _actor2.changeZoom(-1); + _actor2._effect = 1; + if (R2_GLOBALS._player._characterIndex == 2) + _actor2.setup(10, _field11B2, 1); + else + _actor2.setup(30, _field11B2, 1); + _actor2.animate(ANIM_MODE_1, NULL); + _actor2.setDetails(3385, -1, -1, -1, 1, (SceneItem *) NULL); + + _actor3.postInit(); + _actor3._moveDiff = Common::Point(3, 2); + _actor3.changeZoom(-1); + _actor3._effect = 1; + _actor3.setup(40, _field11B2, 1); + _actor3.animate(ANIM_MODE_1, NULL); + _actor3.setDetails(3385, 15, -1, -1, 1, (SceneItem *) NULL); + + _exit1.setDetails(Rect(103, 152, 217, 170), SHADECURSOR_DOWN, 3395); + _exit1.setDest(Common::Point(158, 151)); + + _actor4.postInit(); + _actor4.setPosition(Common::Point(160, 100)); + _actor4.fixPriority(90); + _actor4.setDetails(3385, 3, 4, -1, 1, (SceneItem *) NULL); + + if (R2_GLOBALS._sceneManager._previousScene == 3375) { + R2_GLOBALS._player.setPosition(Common::Point(158, 102)); + _actor1.setPosition(Common::Point(164, 100)); + _actor1.fixPriority(98); + _actor2.setPosition(Common::Point(150, 100)); + _actor2.fixPriority(97); + _actor3.setPosition(Common::Point(158, 100)); + _actor3.fixPriority(96); + _sceneMode = 3384; + _actor4.setup(3385, 1, 6); + _actor4.animate(ANIM_MODE_6, this); + setAction(&_action1, &_actor4); + } else { + R2_GLOBALS._player.setPosition(Common::Point(158, 230)); + _actor1.setPosition(Common::Point(191, 270)); + _actor2.setPosition(Common::Point(124, 255)); + _actor3.setPosition(Common::Point(155, 245)); + _actor4.setup(3385, 1, 1); + _sceneMode = 3385; + setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, &_actor1, &_actor2, &_actor3, NULL); + } + + _item1.setDetails(Rect(0, 0, 320, 200), 3385, 0, -1, -1, 1, NULL); + R2_GLOBALS._v56A9E = 0; +} + +void Scene3385::remove() { + R2_GLOBALS._sound1.fadeOut2(NULL); + SceneExt::remove(); +} + +void Scene3385::signal() { + switch (_sceneMode) { + case 3386: + R2_GLOBALS._sceneManager.changeScene(3375); + break; + case 3387: + R2_GLOBALS._sceneManager.changeScene(3395); + break; + case 9999: + if (R2_GLOBALS._sceneManager._previousScene == 3375) + R2_GLOBALS._player.setStrip(3); + else + R2_GLOBALS._player.setStrip(4); + break; + default: + R2_GLOBALS._player.enableControl(CURSOR_ARROW); + break; + } +} + +/*-------------------------------------------------------------------------- * Scene 3400 - * *--------------------------------------------------------------------------*/ diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h index d5e2e451f4..558acf62e9 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.h +++ b/engines/tsage/ringworld2/ringworld2_scenes3.h @@ -457,6 +457,53 @@ public: virtual void synchronize(Serializer &s); }; +class Scene3385 : public SceneExt { + class Actor1 : public SceneActor { + virtual bool startAction(CursorType action, Event &event); + }; + class Actor2 : public SceneActor { + virtual bool startAction(CursorType action, Event &event); + }; + class Actor3 : public SceneActor { + virtual bool startAction(CursorType action, Event &event); + }; + class Actor4 : public SceneActor { + virtual bool startAction(CursorType action, Event &event); + }; + + class Exit1 : public SceneExit { + public: + virtual void changeScene(); + }; + + class Action1: public Action { + public: + virtual void signal(); + }; + +public: + SpeakerQuinn3385 _quinnSpeaker; + SpeakerSeeker3385 _seekerSpeaker; + SpeakerMiranda3385 _mirandaSpeaker; + SpeakerWebbster3385 _webbsterSpeaker; + NamedHotspot _item1; + Actor1 _actor1; + Actor2 _actor2; + Actor3 _actor3; + Actor4 _actor4; + Exit1 _exit1; + Action1 _action1; + SequenceManager _sequenceManager; + + int _field11B2; + + Scene3385(); + virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void remove(); + virtual void signal(); + virtual void synchronize(Serializer &s); +}; + class Scene3400 : public SceneExt { public: SpeakerQuinn3400 _quinnSpeaker; diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp index 4deeb91c06..b8773192b0 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.cpp +++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp @@ -1845,6 +1845,250 @@ void SpeakerWebbster3375::proc15() { } } +SpeakerQuinn3385::SpeakerQuinn3385() { + _speakerName = "QUINN"; + _color1 = 60; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} +void SpeakerQuinn3385::proc15() { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + if (R2_GLOBALS._player._characterIndex == 1) + _object2 = &R2_GLOBALS._player; + else if (R2_GLOBALS._player._characterIndex == 2) + _object2 = &scene->_actor1; + else + _object2 = &scene->_actor2; + + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (R2_GLOBALS._sceneManager._previousScene == 3375) + R2_GLOBALS._player.setStrip(4); + else + R2_GLOBALS._player.setStrip(3); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + if (R2_GLOBALS._player._characterIndex == 2) + _object1.setup(4010, 3, 1); + else + _object1.setup(4010, 5, 1); + + _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; + } +} + +SpeakerSeeker3385::SpeakerSeeker3385() { + _speakerName = "SEEKER"; + _color1 = 35; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerSeeker3385::proc15() { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + if (R2_GLOBALS._player._characterIndex == 2) + _object2 = &R2_GLOBALS._player; + else + _object2 = &scene->_actor1; + + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (R2_GLOBALS._sceneManager._previousScene == 3375) + R2_GLOBALS._player.setStrip(4); + else + R2_GLOBALS._player.setStrip(3); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4031, 3, 1); + _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; + } +} + +SpeakerMiranda3385::SpeakerMiranda3385() { + _speakerName = "MIRANDA"; + _color1 = 154; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerMiranda3385::proc15() { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + if (R2_GLOBALS._player._characterIndex == 3) + _object2 = &R2_GLOBALS._player; + else + _object2 = &scene->_actor2; + + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (R2_GLOBALS._sceneManager._previousScene == 3375) + R2_GLOBALS._player.setStrip(4); + else + R2_GLOBALS._player.setStrip(3); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4051, 5, 1); + _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; + } +} + +SpeakerWebbster3385::SpeakerWebbster3385() { + _speakerName = "WEBBSTER"; + _color1 = 60; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerWebbster3385::proc15() { + Scene3385 *scene = (Scene3385 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + _object2 = &scene->_actor3; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (R2_GLOBALS._sceneManager._previousScene == 3375) + R2_GLOBALS._player.setStrip(4); + else + R2_GLOBALS._player.setStrip(3); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4110, 5, 1); + _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; + } +} + SpeakerQuinn3400::SpeakerQuinn3400() { _speakerName = "QUINN"; _color1 = 60; diff --git a/engines/tsage/ringworld2/ringworld2_speakers.h b/engines/tsage/ringworld2/ringworld2_speakers.h index 2f289175e8..c3de6a68a8 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.h +++ b/engines/tsage/ringworld2/ringworld2_speakers.h @@ -421,6 +421,38 @@ public: virtual void proc15(); }; +class SpeakerQuinn3385 : public VisualSpeaker { +public: + SpeakerQuinn3385(); + + virtual Common::String getClassName() { return "SpeakerQuinn3385"; } + virtual void proc15(); +}; + +class SpeakerSeeker3385 : public VisualSpeaker { +public: + SpeakerSeeker3385(); + + virtual Common::String getClassName() { return "SpeakerSeeker3385"; } + virtual void proc15(); +}; + +class SpeakerMiranda3385 : public VisualSpeaker { +public: + SpeakerMiranda3385(); + + virtual Common::String getClassName() { return "SpeakerMiranda3385"; } + virtual void proc15(); +}; + +class SpeakerWebbster3385 : public VisualSpeaker { +public: + SpeakerWebbster3385(); + + virtual Common::String getClassName() { return "SpeakerWebbster3385"; } + virtual void proc15(); +}; + class SpeakerQuinn3400 : public VisualSpeaker { public: SpeakerQuinn3400(); |