Fix for loading savegames from the command line.

svn-id: r26567
This commit is contained in:
Eugene Sandulenko 2007-04-22 16:06:00 +00:00
parent 3f3c7bf7e8
commit 55152e4055
3 changed files with 4 additions and 4 deletions

View file

@ -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;