diff options
author | Filippos Karapetis | 2014-02-17 11:46:24 +0200 |
---|---|---|
committer | Filippos Karapetis | 2014-02-17 11:46:24 +0200 |
commit | d80f1adb3144a623fd450652bc94aecb37ea4297 (patch) | |
tree | 65ceb4a0661b66abfcc3724efc9a7aac820184c0 /engines/sci | |
parent | 5b1631960e1c10e8fe60261eee0cec62756e3d66 (diff) | |
download | scummvm-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.cpp | 19 |
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 |