aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2014-02-17 11:46:24 +0200
committerFilippos Karapetis2014-02-17 11:46:24 +0200
commitd80f1adb3144a623fd450652bc94aecb37ea4297 (patch)
tree65ceb4a0661b66abfcc3724efc9a7aac820184c0 /engines/sci
parent5b1631960e1c10e8fe60261eee0cec62756e3d66 (diff)
downloadscummvm-rg350-d80f1adb3144a623fd450652bc94aecb37ea4297.tar.gz
scummvm-rg350-d80f1adb3144a623fd450652bc94aecb37ea4297.tar.bz2
scummvm-rg350-d80f1adb3144a623fd450652bc94aecb37ea4297.zip
SCI: Provide more accurate error messages for unsupported saved games
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/savegame.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index ce9a672572..c64d5b6272 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -860,16 +860,13 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
return;
}
- if ((meta.version < MINIMUM_SAVEGAME_VERSION) ||
- (meta.version > CURRENT_SAVEGAME_VERSION)) {
- /*
- if (meta.version < MINIMUM_SAVEGAME_VERSION)
- warning("Old savegame version detected, unable to load it");
- else
- warning("Savegame version is %d, maximum supported is %0d", meta.version, CURRENT_SAVEGAME_VERSION);
- */
-
- showScummVMDialog("The format of this saved game is obsolete, unable to load it");
+ if ((meta.version < MINIMUM_SAVEGAME_VERSION) || (meta.version > CURRENT_SAVEGAME_VERSION)) {
+ if (meta.version < MINIMUM_SAVEGAME_VERSION) {
+ showScummVMDialog("The format of this saved game is obsolete, unable to load it");
+ } else {
+ Common::String msg = Common::String::format("Savegame version is %d, maximum supported is %0d", meta.version, CURRENT_SAVEGAME_VERSION);
+ showScummVMDialog(msg);
+ }
s->r_acc = TRUE_REG; // signal failure
return;
@@ -878,8 +875,6 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
if (meta.gameObjectOffset > 0 && meta.script0Size > 0) {
Resource *script0 = g_sci->getResMan()->findResource(ResourceId(kResourceTypeScript, 0), false);
if (script0->size != meta.script0Size || g_sci->getGameObject().getOffset() != meta.gameObjectOffset) {
- //warning("This saved game was created with a different version of the game, unable to load it");
-
showScummVMDialog("This saved game was created with a different version of the game, unable to load it");
s->r_acc = TRUE_REG; // signal failure