diff options
author | Filippos Karapetis | 2007-12-10 18:57:17 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-12-10 18:57:17 +0000 |
commit | f625562aff39af1150bd941cf56c50ea0d1f52e6 (patch) | |
tree | bd0499a6a0fa9e68043b474de1bc5d1902dfcd84 /engines/agi | |
parent | dd2386cde49d42467df520c177d0acf2bdce6ee0 (diff) | |
download | scummvm-rg350-f625562aff39af1150bd941cf56c50ea0d1f52e6.tar.gz scummvm-rg350-f625562aff39af1150bd941cf56c50ea0d1f52e6.tar.bz2 scummvm-rg350-f625562aff39af1150bd941cf56c50ea0d1f52e6.zip |
Oops, fixed some problems with the last commit
svn-id: r29817
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/preagi_winnie.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp index a4cbc12697..e1f88db755 100644 --- a/engines/agi/preagi_winnie.cpp +++ b/engines/agi/preagi_winnie.cpp @@ -1238,9 +1238,7 @@ void Winnie::loadGame() { if (!(infile = _vm->getSaveFileMan()->openForLoading(szFile))) return; - if (infile->readUint32BE() != MKID_BE('WINN')) { - error("Winnie::loadGame wrong save game format"); - + if (infile->readUint32BE() == MKID_BE('WINN')) { saveVersion = infile->readByte(); if (saveVersion != WTP_SAVEGAME_VERSION) warning("Old save game version (%d, current version is %d). Will try and read anyway, but don't be surprised if bad things happen", saveVersion, WTP_SAVEGAME_VERSION); @@ -1257,7 +1255,10 @@ void Winnie::loadGame() { // Note that the original saves variables as 16-bit integers, but only 8 bits are used. // Since we read the save file data as little-endian, we skip the first byte of each // variable - infile->readUint16LE(); // skip unused field + + // First 16 bits are an unused field, and they have already been read from the + // header check above + infile->readByte(); // first 8 bits of fSound _game.fSound = infile->readByte(); infile->readByte(); // first 8 bits of nMoves @@ -1285,8 +1286,9 @@ void Winnie::loadGame() { for(i = 0; i < IDI_WTP_MAX_ROOM_OBJ; i++) _game.iObjRoom[i] = infile->readByte(); - // Note that saved games from the original interpreter have 2 more fields here which are - // ignored + // Note that saved games from the original interpreter have 2 more 16-bit fields here + // which are ignored + delete infile; } |