aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp8
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp71
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.h18
3 files changed, 95 insertions, 2 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 92585eb29b..ef212bc52a 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -65,8 +65,12 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
// Deck #2 - By Lift
return new Scene200();
case 205:
- // Star-field Credits
- return new Scene205();
+ if (g_vm->getFeatures() & GF_DEMO)
+ // End of Demo
+ return new Scene205Demo();
+ else
+ // Star-field Credits
+ return new Scene205();
case 250:
// Lift
return new Scene250();
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 3a724628dd..6c9138fdee 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -2519,6 +2519,77 @@ void Scene205::handleText() {
}
/*--------------------------------------------------------------------------
+ * Scene 205 Demo - End of Demo
+ *
+ *--------------------------------------------------------------------------*/
+
+void Scene205Demo::Action1::signal() {
+ Scene205Demo *scene = (Scene205Demo *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0:
+ setDelay(2);
+ break;
+
+ case 1: {
+ Common::String mask = g_resourceManager->getMessage(206, 0, true);
+// Common::String msg = sprintf(mask.c_str(), "1-800-482-3766");
+ MessageDialog::show2(mask, OK_BTN_STRING);
+ setDelay(1);
+ }
+ break;
+
+ case 2:
+ scene->leaveScene();
+ break;
+ default:
+ break;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+void Scene205Demo::leaveScene() {
+ if (g_globals->getFlag(85))
+ R2_GLOBALS._sceneManager.changeScene(160);
+ else
+ R2_GLOBALS._sceneManager.changeScene(R2_GLOBALS._sceneManager._previousScene);
+
+ BF_GLOBALS._scenePalette.loadPalette(0);
+ BF_GLOBALS._scenePalette.refresh();
+}
+
+void Scene205Demo::postInit(SceneObjectList *OwnerList) {
+ R2_GLOBALS._sceneManager._hasPalette = true;
+ R2_GLOBALS._scenePalette.loadPalette(0);
+
+ loadScene(1000);
+ R2_GLOBALS._uiElements._active = false;
+ R2_GLOBALS._player.enableControl();
+
+ SceneExt::postInit();
+
+ _sound1.play(337);
+ _stripManager.addSpeaker(&_animationPlayer);
+
+ setAction(&_action1);
+}
+
+void Scene205Demo::remove() {
+ R2_GLOBALS._sound1.fadeOut2(NULL);
+ SceneExt::remove();
+}
+
+void Scene205Demo::process(Event &event) {
+ if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
+ event.handled = true;
+ leaveScene();
+ } else {
+ Scene::process(event);
+ }
+}
+
+/*--------------------------------------------------------------------------
* Scene 250 - Lift
*
*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h
index 0e68b67ee7..216039a348 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.h
@@ -304,6 +304,24 @@ public:
virtual void dispatch();
};
+class Scene205Demo: public SceneExt {
+ /* Actions */
+ class Action1: public Action {
+ public:
+ virtual void signal();
+ };
+private:
+ void leaveScene();
+public:
+ VisualSpeaker _animationPlayer;
+ ASound _sound1;
+ Action1 _action1;
+public:
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+ virtual void remove();
+ virtual void process(Event &event);
+};
+
class Scene250: public SceneExt {
class Button: public SceneActor {
public: