diff options
author | Eugene Sandulenko | 2007-04-22 16:06:00 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-04-22 16:06:00 +0000 |
commit | 55152e40554003f965e8fa4bca76a720bbb61de7 (patch) | |
tree | 742211a66bc60fb80e6b15cdbe271b035285aff9 /engines | |
parent | 3f3c7bf7e822e3a974ae6edc33fda6250a704f0b (diff) | |
download | scummvm-rg350-55152e40554003f965e8fa4bca76a720bbb61de7.tar.gz scummvm-rg350-55152e40554003f965e8fa4bca76a720bbb61de7.tar.bz2 scummvm-rg350-55152e40554003f965e8fa4bca76a720bbb61de7.zip |
Fix for loading savegames from the command line.
svn-id: r26567
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/agi.cpp | 2 | ||||
-rw-r--r-- | engines/agi/agi.h | 2 | ||||
-rw-r--r-- | engines/agi/saveload.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index fe5f7f7e74..3a0a433e1d 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -425,7 +425,7 @@ int AgiEngine::agiInit() { snprintf (saveNameBuffer, 256, "%s.%03d", _targetName.c_str(), ConfMan.getInt("save_slot")); - loadGame(saveNameBuffer); + loadGame(saveNameBuffer, false); // Do not check game id } return ec; diff --git a/engines/agi/agi.h b/engines/agi/agi.h index a42f712c12..b9fac16b48 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -545,7 +545,7 @@ public: int saveGame(const char *fileName, const char *saveName); int saveGameDialog(); int saveGameSimple(); - int loadGame(const char *fileName); + int loadGame(const char *fileName, bool checkId = true); int loadGameDialog(); int loadGameSimple(); diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index 4f25b58cc5..94701baa32 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -215,7 +215,7 @@ int AgiEngine::saveGame(const char *fileName, const char *description) { return errOK; } -int AgiEngine::loadGame(const char *fileName) { +int AgiEngine::loadGame(const char *fileName, bool checkId) { char description[31], saveVersion, loadId[8]; int i, vtEntries = MAX_VIEWTABLE; uint8 t; @@ -251,7 +251,7 @@ int AgiEngine::loadGame(const char *fileName) { _game.state = in->readByte(); in->read(loadId, 8); - if (strcmp(loadId, _game.id)) { + if (strcmp(loadId, _game.id) && checkId) { delete in; warning("This save seems to be from a different AGI game (save from %s, running %s), not loaded", loadId, _game.id); return errBadFileOpen; |