aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/bladerunner.cpp
diff options
context:
space:
mode:
authorThanasis Antoniou2019-05-15 22:52:00 +0300
committerThanasis Antoniou2019-05-15 22:53:45 +0300
commit297ebb73e0e922c635397086cdca46cd8d00c74b (patch)
tree9e1ecf9b6c66085cb4cf8fc7c4ba55061035ebee /engines/bladerunner/bladerunner.cpp
parent2d992a44309cfbe033d6a02c32db4183bf7ac978 (diff)
downloadscummvm-rg350-297ebb73e0e922c635397086cdca46cd8d00c74b.tar.gz
scummvm-rg350-297ebb73e0e922c635397086cdca46cd8d00c74b.tar.bz2
scummvm-rg350-297ebb73e0e922c635397086cdca46cd8d00c74b.zip
BLADERUNNER: Warning if loading restored cut content save in original mode
And vice versa. The game won't exit, it will continue loading but adjust the mode accordingly Also added a incremental version number for the save games (as a global variable), for possible future use
Diffstat (limited to 'engines/bladerunner/bladerunner.cpp')
-rw-r--r--engines/bladerunner/bladerunner.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index 44a59e1182..8cd9df7186 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -1985,12 +1985,36 @@ bool BladeRunnerEngine::loadGame(Common::SeekableReadStream &stream) {
_scene->_set->load(s);
for (uint i = 0; i != _gameInfo->getGlobalVarCount(); ++i) {
_gameVars[i] = s.readInt();
+ if (i == 3 && _gameVars[i] != kBladeRunnerScummVMVersion) {
+ warning("This game was saved using an older version of the engine (v%d), currently the engine is at v%d", _gameVars[i], kBladeRunnerScummVMVersion);
+ }
}
_music->load(s);
// _audioPlayer->load(s) // zero func
// _audioSpeech->load(s) // zero func
_combat->load(s);
_gameFlags->load(s);
+
+ if ((_gameFlags->query(kFlagGamePlayedInRestoredContentMode) && !_cutContent)
+ || (!_gameFlags->query(kFlagGamePlayedInRestoredContentMode) && _cutContent)
+ ){
+ Common::String warningMsg;
+ if (!_cutContent) {
+ warningMsg = "WARNING: This game was saved in Restored Cut Content mode, but you are playing in Original Content mode. The mode will be adjusted to Restored Cut Content for this session until you completely Quit the game.";
+ } else {
+ warningMsg = "WARNING: This game was saved in Original Content mode, but you are playing in Restored Cut Content mode. The mode will be adjusted to Original Content mode for this session until you completely Quit the game.";
+ }
+ GUI::MessageDialog dialog(warningMsg, "Continue", 0);
+ dialog.runModal();
+ _cutContent = !_cutContent;
+ // force a Key Up event, since we need it to remove the KIA
+ // but it's lost due to the modal dialogue
+ Common::EventManager *eventMan = _system->getEventManager();
+ Common::Event event;
+ event.type = Common::EVENT_KEYUP;
+ eventMan->pushEvent(event);
+ }
+
_items->load(s);
_sceneObjects->load(s);
_ambientSounds->load(s);
@@ -2018,7 +2042,6 @@ bool BladeRunnerEngine::loadGame(Common::SeekableReadStream &stream) {
_settings->setNewSetAndScene(_settings->getSet(), _settings->getScene());
_settings->setChapter(_settings->getChapter());
-
return true;
}