diff options
author | athrxx | 2019-12-06 20:46:01 +0100 |
---|---|---|
committer | athrxx | 2019-12-18 20:50:46 +0100 |
commit | f446242215d55af1fe6151aa9f9f3fc4ce11a8d7 (patch) | |
tree | 9ae17f4d36647dccfa3244d690119639532679af /engines/kyra/gui | |
parent | f01d432c2529e2a47dcbc2438356b00706b41b68 (diff) | |
download | scummvm-rg350-f446242215d55af1fe6151aa9f9f3fc4ce11a8d7.tar.gz scummvm-rg350-f446242215d55af1fe6151aa9f9f3fc4ce11a8d7.tar.bz2 scummvm-rg350-f446242215d55af1fe6151aa9f9f3fc4ce11a8d7.zip |
KYRA: (EOB/PC98) - fix original save file loading
Diffstat (limited to 'engines/kyra/gui')
-rw-r--r-- | engines/kyra/gui/saveload_eob.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/kyra/gui/saveload_eob.cpp b/engines/kyra/gui/saveload_eob.cpp index 1bf6b1da2c..1dc726fdc1 100644 --- a/engines/kyra/gui/saveload_eob.cpp +++ b/engines/kyra/gui/saveload_eob.cpp @@ -648,7 +648,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) { Common::SeekableSubReadStream test(fs, 0, fs->size(), DisposeAfterUse::NO); - // detect source platform + // detect source platform (PC98 has the exact same file layout as DOS) Common::Platform sourcePlatform = Common::kPlatformDOS; test.seek(32); uint16 testSJIS = test.readByte(); @@ -656,9 +656,9 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) { int8 testStr = test.readSByte(); test.seek(66); int8 testChr = test.readSByte(); - test.seek(_flags.gameID == GI_EOB1 ? 48 : 70); + test.seek(_flags.gameID == GI_EOB1 ? 39 : 61); uint32 exp = test.readUint32LE(); - test.seek(_flags.gameID == GI_EOB1 ? 61 : 47); + test.seek(_flags.gameID == GI_EOB1 ? 61 : 27); bool padding = !test.readByte(); test.seek(0); @@ -667,7 +667,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) { sourcePlatform = Common::kPlatformFMTowns; } - if (padding && sourcePlatform == Common::kPlatformDOS && exp & 0xFF000000) + if (sourcePlatform == Common::kPlatformDOS && padding && (exp & 0xFF000000)) sourcePlatform = Common::kPlatformAmiga; Common::SeekableSubReadStreamEndian in(fs, 0, fs->size(), sourcePlatform == Common::kPlatformAmiga, DisposeAfterUse::YES); @@ -702,7 +702,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) { c->constitutionCur = in.readSByte(); c->constitutionMax = in.readSByte(); c->charismaCur = in.readSByte(); - c->charismaMax = in.readSByte(); + c->charismaMax = in.readSByte(); if (_flags.gameID == GI_EOB2 && sourcePlatform == Common::kPlatformAmiga) in.skip(1); c->hitPointsCur = (_flags.gameID == GI_EOB1) ? in.readSByte() : in.readSint16(); |