aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/ringworld2
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp1
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.cpp62
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.h19
3 files changed, 81 insertions, 1 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 079ac62928..b33bb65b80 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -101,6 +101,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
// Balloon Launch Platform
return new Scene2350();
case 2400:
+ return new Scene2400();
case 2425:
case 2430:
case 2435:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index ee3153c0c8..ad45735dc2 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -1221,5 +1221,67 @@ void Scene2350::process(Event &event) {
Scene::process(event);
}
+/*--------------------------------------------------------------------------
+ * Scene 2400 -
+ *
+ *--------------------------------------------------------------------------*/
+void Scene2400::Exit1::changeScene() {
+ Scene2400 *scene = (Scene2400 *)R2_GLOBALS._sceneManager._scene;
+
+ R2_GLOBALS._player.disableControl();
+ scene->_sceneMode = 10;
+
+ Common::Point pt(-10, 150);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, scene);
+
+}
+
+void Scene2400::Exit2::changeScene() {
+ Scene2400 *scene = (Scene2400 *)R2_GLOBALS._sceneManager._scene;
+
+ R2_GLOBALS._player.disableControl();
+ scene->_sceneMode = 11;
+
+ Common::Point pt(330, 150);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, scene);
+}
+
+void Scene2400::postInit(SceneObjectList *OwnerList) {
+ loadScene(2400);
+ SceneExt::postInit();
+ _exit1.setDetails(Rect(0, 125, 14, 165), EXITCURSOR_W, 2000);
+ _exit1.setDest(Common::Point(14, 150));
+ _exit2.setDetails(Rect(305, 125, 320, 165), EXITCURSOR_E, 2000);
+ _exit2.setDest(Common::Point(315, 150));
+ R2_GLOBALS._player.postInit();
+ R2_GLOBALS._player.disableControl();
+
+ if (R2_GLOBALS._v56605[1] == 16) {
+ _sceneMode = 2400;
+ setAction(&_sequenceManager, this, 2400, &R2_GLOBALS._player, NULL);
+ } else {
+ _sceneMode = 2401;
+ setAction(&_sequenceManager, this, 2401, &R2_GLOBALS._player, NULL);
+ }
+}
+
+void Scene2400::signal() {
+ switch (_sceneMode) {
+ case 10:
+ R2_GLOBALS._v56605[1] = 16;
+ g_globals->_sceneManager.changeScene(2000);
+ break;
+ case 11:
+ R2_GLOBALS._v56605[1] = 17;
+ g_globals->_sceneManager.changeScene(2000);
+ break;
+ default:
+ R2_GLOBALS._player.enableControl();
+ break;
+ }
+}
+
} // End of namespace Ringworld2
} // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h
index 27803418c2..15cd40a5d1 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.h
@@ -121,7 +121,24 @@ public:
virtual void remove();
virtual void signal();
virtual void process(Event &event);
-// virtual void synchronize(Serializer &s);
+};
+
+class Scene2400 : public SceneExt {
+ class Exit1 : public SceneExit {
+ virtual void changeScene();
+ };
+ class Exit2 : public SceneExit {
+ virtual void changeScene();
+ };
+public:
+ Exit1 _exit1;
+ Exit2 _exit2;
+ SequenceManager _sequenceManager;
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+// virtual void remove();
+ virtual void signal();
+// virtual void process(Event &event);
};
} // End of namespace Ringworld2