aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
authorEugene Sandulenko2018-04-03 22:04:20 +0200
committerEugene Sandulenko2018-04-03 22:06:34 +0200
commitd3648232fdce6a851470ce57b135b38e66bfe0bc (patch)
tree5cca513a7c46e15cae1aa1e0122dc3a161e8fb41 /engines/bladerunner
parent847163aa5d1b570d4c549bd8efcf95cd7786e8c0 (diff)
downloadscummvm-rg350-d3648232fdce6a851470ce57b135b38e66bfe0bc.tar.gz
scummvm-rg350-d3648232fdce6a851470ce57b135b38e66bfe0bc.tar.bz2
scummvm-rg350-d3648232fdce6a851470ce57b135b38e66bfe0bc.zip
BLADERUNNER: Implement scene jumping via bootparams.
Specify bootparam in form CTTTSSS, where C is chapter, TTT is set and SSS is scene number. So, for RC02 it is 1016079.
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/bladerunner.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index ab8ad36979..a48042e39d 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -75,6 +75,7 @@
#include "bladerunner/zbuffer.h"
#include "common/array.h"
+#include "common/config-manager.h"
#include "common/error.h"
#include "common/events.h"
#include "common/savefile.h"
@@ -475,8 +476,20 @@ void BladeRunnerEngine::initChapterAndScene() {
_actors[i]->movementTrackNext(true);
}
- _settings->setChapter(1);
- _settings->setNewSetAndScene(_gameInfo->getInitialSetId(), _gameInfo->getInitialSceneId());
+ if (ConfMan.hasKey("boot_param")) {
+ int param = ConfMan.getInt("boot_param"); // CTTTSSS
+ int chapter = param / 1000000;
+ param -= chapter * 1000000;
+ int set = param / 1000;
+ param -= set * 1000;
+ int scene = param;
+
+ _settings->setChapter(chapter);
+ _settings->setNewSetAndScene(set, scene);
+ } else {
+ _settings->setChapter(1);
+ _settings->setNewSetAndScene(_gameInfo->getInitialSetId(), _gameInfo->getInitialSceneId());
+ }
}
void BladeRunnerEngine::shutdown() {