aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-10-10 23:58:44 +0300
committerEugene Sandulenko2013-10-10 23:58:44 +0300
commit5b54a546e0de7a3e2e103667320459695a243d9c (patch)
treeab77ec9fdad4d55d64854b573bd62b6b21b7d3f2
parent4b3cfa1c572e3e0e196b0ed2d89dd570a7404a67 (diff)
downloadscummvm-rg350-5b54a546e0de7a3e2e103667320459695a243d9c.tar.gz
scummvm-rg350-5b54a546e0de7a3e2e103667320459695a243d9c.tar.bz2
scummvm-rg350-5b54a546e0de7a3e2e103667320459695a243d9c.zip
FULLPIPE: Made setting rooms via bootparams easier
-rw-r--r--engines/fullpipe/fullpipe.cpp2
-rw-r--r--engines/fullpipe/fullpipe.h1
-rw-r--r--engines/fullpipe/scenes.cpp17
3 files changed, 19 insertions, 1 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 5e1af1227c..a0db6aa08c 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -176,7 +176,7 @@ Common::Error FullpipeEngine::run() {
int scene = 0;
if (ConfMan.hasKey("boot_param"))
- scene = ConfMan.getInt("boot_param");
+ scene = convertScene(ConfMan.getInt("boot_param"));
if (!loadGam("fullpipe.gam", scene))
return Common::kNoGameDataFoundError;
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 6872dd8356..22e4f1d8f4 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -219,6 +219,7 @@ public:
bool sceneSwitcher(EntranceInfo *entrance);
Scene *accessScene(int sceneId);
void setSceneMusicParameters(GameVar *var);
+ int convertScene(int scene);
NGIArchive *_currArchive;
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 9fb8a95f53..40d9f21afb 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -74,6 +74,23 @@ Vars::Vars() {
selector = 0;
}
+static int scenes[] = {
+ SC_1, SC_2, SC_3, SC_4, SC_5, SC_6, SC_7, SC_8, SC_9, SC_10,
+ SC_11, SC_12, SC_13, SC_14, SC_15, SC_16, SC_17, SC_18, SC_19, SC_20,
+ SC_21, SC_22, SC_23, SC_24, SC_25, SC_26, SC_27, SC_28, SC_29, SC_30,
+ SC_31, SC_32, SC_33, SC_34, SC_35, SC_36, SC_37, SC_38, SC_DBGMENU
+};
+
+int FullpipeEngine::convertScene(int scene) {
+ if (!scene || scene >= SC_1)
+ return scene;
+
+ if (scene < 1 || scene > 39)
+ return SC_1;
+
+ return scenes[scene - 1];
+}
+
bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
GameVar *sceneVar;
Common::Point sceneDim;