aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorPaul Gilbert2011-02-27 19:04:16 +1100
committerPaul Gilbert2011-02-27 19:04:16 +1100
commit7e595d0b35461c80c62f033ca3cce02319fdf34e (patch)
tree0b78c54e2e9119f165b616eddce5a4d9cc1179ce /engines/tsage
parente7ca134b1a17f5d66b26441c445abe9984a2bbfc (diff)
downloadscummvm-rg350-7e595d0b35461c80c62f033ca3cce02319fdf34e.tar.gz
scummvm-rg350-7e595d0b35461c80c62f033ca3cce02319fdf34e.tar.bz2
scummvm-rg350-7e595d0b35461c80c62f033ca3cce02319fdf34e.zip
TSAGE: Added Scene 1001 (Fleeing Planet)
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/ringworld_logic.cpp40
-rw-r--r--engines/tsage/ringworld_logic.h19
-rw-r--r--engines/tsage/ringworld_scenes2.cpp226
-rw-r--r--engines/tsage/ringworld_scenes2.h19
4 files changed, 302 insertions, 2 deletions
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 225922dab2..b479edbdc2 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -59,7 +59,8 @@ Scene *SceneFactory::createScene(int sceneNumber) {
/* Scene group 2 */
// Title screen
case 1000: return new Scene1000();
-
+ // Fleeing planet cutscene
+ case 1001: return new Scene1001();
default:
error("Unknown scene number - %d", sceneNumber);
@@ -200,6 +201,16 @@ SpeakerMText::SpeakerMText() {
/*--------------------------------------------------------------------------*/
+SpeakerCText::SpeakerCText() {
+ _speakerName = "CTEXT";
+ _colour1 = 4;
+ _textWidth = 240;
+ _textMode = ALIGN_CENTRE;
+ _hideObjects = false;
+}
+
+/*--------------------------------------------------------------------------*/
+
SpeakerQL::SpeakerQL(): AnimatedSpeaker() {
_speakerName = "QL";
_newSceneNumber = 2610;
@@ -335,4 +346,31 @@ void SpeakerQR::setText(const Common::String &msg) {
Speaker::setText(msg);
}
+/*--------------------------------------------------------------------------*/
+
+SpeakerCR::SpeakerCR() {
+ _speakerName = "CR";
+ _newSceneNumber = 9010;
+ _textPos = Common::Point(20, 40);
+ _colour1 = 4;
+}
+
+void SpeakerCR::setText(const Common::String &msg) {
+ _object1.postInit(&_objectList);
+ _object1.setVisage(9011);
+ _object1.setStrip2(2);
+ _object1.setPriority2(255);
+ _object1.setPosition(Common::Point(219, 168));
+ _object1.animate(ANIM_MODE_7, 0, NULL);
+
+ _object2.postInit(&_objectList);
+ _object2.setVisage(9011);
+ _object2.setStrip2(1);
+ _object2.setPriority2(255);
+ _object2.setPosition(Common::Point(232, 81));
+ _object2.setAction(&_speakerAction, NULL);
+
+ Speaker::setText(msg);
+}
+
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_logic.h b/engines/tsage/ringworld_logic.h
index 2b777e749c..95b6813ec6 100644
--- a/engines/tsage/ringworld_logic.h
+++ b/engines/tsage/ringworld_logic.h
@@ -107,6 +107,13 @@ public:
virtual Common::String getClassName() { return "SpeakerMText"; }
};
+class SpeakerCText: public ScreenSpeaker {
+public:
+ SpeakerCText();
+
+ virtual Common::String getClassName() { return "SpeakerCText"; }
+};
+
class SpeakerQL: public AnimatedSpeaker {
public:
SpeakerQL();
@@ -129,6 +136,7 @@ class SpeakerSL: public AnimatedSpeaker {
public:
SpeakerSL();
+ virtual Common::String getClassName() { return "SpeakerSL"; }
virtual void setText(const Common::String &msg);
};
@@ -136,7 +144,16 @@ class SpeakerQR: public AnimatedSpeaker {
public:
SpeakerQR();
- void setText(const Common::String &msg);
+ virtual Common::String getClassName() { return "SpeakerQR"; }
+ virtual void setText(const Common::String &msg);
+};
+
+class SpeakerCR: public AnimatedSpeaker {
+public:
+ SpeakerCR();
+
+ virtual Common::String getClassName() { return "SpeakerCR"; }
+ virtual void setText(const Common::String &msg);
};
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_scenes2.cpp b/engines/tsage/ringworld_scenes2.cpp
index b67f4db946..6d72430b9f 100644
--- a/engines/tsage/ringworld_scenes2.cpp
+++ b/engines/tsage/ringworld_scenes2.cpp
@@ -308,4 +308,230 @@ void Scene1000::postInit(SceneObjectList *OwnerList) {
loadScene(1000);
}
+/*--------------------------------------------------------------------------
+ * Scene 1001 - Fleeing planet cutscene
+ *
+ *--------------------------------------------------------------------------*/
+
+void Scene1001::Action1::signal() {
+ Scene1001 *scene = (Scene1001 *)_globals->_sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0:
+ setDelay(10);
+ break;
+ case 1:
+ scene->_object3.animate(ANIM_MODE_5, this);
+ break;
+ case 2: {
+ Common::Point pt(108, 171);
+ NpcMover *mover = new NpcMover();
+ scene->_object3.addMover(mover, &pt, this);
+ break;
+ }
+ case 3: {
+ Common::Point pt(170, 159);
+ NpcMover *mover = new NpcMover();
+ scene->_object3.addMover(mover, &pt, this);
+ break;
+ }
+ case 4: {
+ scene->_object2.postInit();
+ scene->_object2.setVisage(16);
+ scene->_object2.setStrip2(4);
+ scene->_object2.setPosition(Common::Point(61, 177));
+ scene->_object2.animate(ANIM_MODE_5, this);
+
+ Common::Point pt(320, 100);
+ NpcMover *mover = new NpcMover();
+ scene->_object3.addMover(mover, &pt, this);
+ break;
+ }
+ case 5: {
+ Common::Point pt(82, 166);
+ NpcMover *mover = new NpcMover();
+ scene->_object2.addMover(mover, &pt, this);
+ break;
+ }
+ case 6: {
+ Common::Point pt(64, 149);
+ NpcMover *mover = new NpcMover();
+ scene->_object2.addMover(mover, &pt, this);
+ break;
+ }
+ case 7: {
+ Common::Point pt(15, 136);
+ NpcMover *mover = new NpcMover();
+ scene->_object2.addMover(mover, &pt, this);
+ break;
+ }
+ case 8: {
+ Common::Point pt(-5, 120);
+ NpcMover *mover = new NpcMover();
+ scene->_object2.addMover(mover, &pt, this);
+ break;
+ }
+ case 9: {
+ scene->_object1.postInit();
+ scene->_object1.setVisage(16);
+ scene->_object1.setStrip2(1);
+ scene->_object1.setFrame(1);
+ scene->_object1.setPosition(Common::Point(-75, 87));
+ scene->_object1.animate(ANIM_MODE_2, NULL);
+
+ Common::Point pt(0, 100);
+ NpcMover *mover = new NpcMover();
+ scene->_object1.addMover(mover, &pt, this);
+ break;
+ }
+ case 10: {
+ Common::Point pt1(107, 115);
+ NpcMover *mover1 = new NpcMover();
+ scene->_object1.addMover(mover1, &pt1, NULL);
+
+ scene->_object3.setVisage(16);
+ scene->_object3.setStrip2(5);
+ scene->_object3.setFrame2(2);
+ scene->_object3.setPosition(Common::Point(220, 200));
+
+ Common::Point pt2(187, 181);
+ NpcMover *mover2 = new NpcMover();
+ scene->_object3.addMover(mover2, &pt2, this);
+ break;
+ }
+ case 11: {
+ scene->_object2.setVisage(16);
+ scene->_object2.setStrip2(5);
+ scene->_object2.setFrame2(1);
+ scene->_object2.setPosition(Common::Point(211, 0));
+
+ Common::Point pt(189, 30);
+ NpcMover *mover = new NpcMover();
+ scene->_object2.addMover(mover, &pt, this);
+ break;
+ }
+ case 12:
+ scene->_stripManager.start(100, this);
+ break;
+ case 13: {
+ scene->_object4.postInit();
+ scene->_object4.setVisage(16);
+ scene->_object4.setStrip2(2);
+ scene->_object4.setFrame(4);
+ scene->_object4.setPosition(Common::Point(360, 80));
+ scene->_object4.animate(ANIM_MODE_2, NULL);
+
+ Common::Point pt(303, 97);
+ NpcMover *mover = new NpcMover();
+ scene->_object4.addMover(mover, &pt, this);
+ break;
+ }
+ case 14:
+ scene->_stripManager.start(110, this);
+ break;
+ case 15:
+ setDelay(10);
+ break;
+ case 16: {
+ scene->_soundHandler1.startSound(90);
+
+ scene->_object6.postInit();
+ scene->_object6.setVisage(16);
+ scene->_object6.setStrip2(6);
+ scene->_object6.setFrame2(2);
+ scene->_object6._moveDiff = Common::Point(20, 20);
+ scene->_object6.setPriority2(20);
+ scene->_object6.setPosition(Common::Point(scene->_object2._position.x - 6, scene->_object2._position.y + 7));
+ scene->_object6.animate(ANIM_MODE_5, NULL);
+
+ Common::Point pt(scene->_object6._position.x - 70, scene->_object6._position.y + 70);
+ NpcMover *mover = new NpcMover();
+ scene->_object6.addMover(mover, &pt, this);
+ break;
+ }
+ case 17: {
+ scene->_soundHandler1.startSound(90);
+ scene->_object6.remove();
+
+ scene->_object7.postInit();
+ scene->_object7.setVisage(16);
+ scene->_object7.setStrip2(6);
+ scene->_object7.setFrame2(1);
+ scene->_object7._moveDiff = Common::Point(20, 20);
+ scene->_object7.setPosition(Common::Point(scene->_object3._position.x - 28, scene->_object3._position.y - 11));
+ scene->_object7.setPriority2(200);
+ scene->_object7.animate(ANIM_MODE_5, NULL);
+
+ Common::Point pt(scene->_object7._position.x - 70, scene->_object7._position.y - 70);
+ NpcMover *mover = new NpcMover();
+ scene->_object7.addMover(mover, &pt, this);
+ break;
+ }
+ case 18:
+ scene->_object7.remove();
+
+ scene->_object5.postInit();
+ scene->_object5.setVisage(16);
+ scene->_object5.setPosition(Common::Point(306, 93));
+ scene->_object5._strip = 3;
+ scene->_object5.setPriority2(200);
+ scene->_object5.animate(ANIM_MODE_2, NULL);
+ setDelay(30);
+ break;
+ case 19: {
+ _globals->_soundHandler.startSound(91);
+ byte adjustData[4] = {0xff, 0xff, 0xff, 0};
+ _globals->_scenePalette.fade(adjustData, true, 0);
+
+ scene->_object1._strip = 7;
+ scene->_object1._frame = 1;
+ scene->_object1.setPosition(Common::Point(314, 112));
+ scene->_object1.addMover(NULL);
+ setDelay(2);
+ }
+ case 20:
+ _globals->_scenePalette.loadPalette(16);
+ _globals->_scenePalette.refresh();
+ setDelay(6);
+ break;
+ case 21:
+ scene->_object1._numFrames = 15;
+ scene->_object1.animate(ANIM_MODE_5, this);
+ break;
+ case 22:
+ _globals->_soundHandler.startSound(92);
+ scene->_stripManager.start(111, this);
+ break;
+ case 23:
+ setDelay(60);
+ break;
+ case 24:
+ _globals->_sceneManager.changeScene(2000);
+ break;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+void Scene1001::postInit(SceneObjectList *OwnerList) {
+ loadScene(16);
+ Scene::postInit();
+ setZoomPercents(0, 100, 200, 100);
+
+ _stripManager.addSpeaker(&_speakerQText);
+ _stripManager.addSpeaker(&_speakerCText);
+ _stripManager.addSpeaker(&_speakerCR);
+ _stripManager.addSpeaker(&_speakerSL);
+ _speakerQText._colour1 = 11;
+
+ _object3.postInit();
+ _object3.setVisage(16);
+ _object3.setStrip2(4);
+ _object3.setPosition(Common::Point(61, 177));
+
+ _globals->_soundHandler.startSound(85);
+ setAction(&_action1);
+}
+
+
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_scenes2.h b/engines/tsage/ringworld_scenes2.h
index d0210d0046..5396d8295b 100644
--- a/engines/tsage/ringworld_scenes2.h
+++ b/engines/tsage/ringworld_scenes2.h
@@ -61,6 +61,25 @@ public:
virtual void postInit(SceneObjectList *OwnerList = NULL);
};
+class Scene1001: public Scene {
+ /* Actions */
+ class Action1: public Action {
+ public:
+ virtual void signal();
+ };
+public:
+ SpeakerQText _speakerQText;
+ SpeakerSL _speakerSL;
+ SpeakerCText _speakerCText;
+ SpeakerCR _speakerCR;
+ Action1 _action1;
+ SceneObject _object1, _object2, _object3, _object4;
+ SceneObject _object5, _object6, _object7;
+ SoundHandler _soundHandler1, _soundHandler2;
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+};
+
} // End of namespace tSage
#endif