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 | |
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')
-rw-r--r-- | engines/kyra/engine/eobcommon.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/gui/saveload_eob.cpp | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp index 729e59b749..eabaf4754c 100644 --- a/engines/kyra/engine/eobcommon.cpp +++ b/engines/kyra/engine/eobcommon.cpp @@ -573,9 +573,9 @@ Common::Error EoBCoreEngine::go() { // Import original save game files (especially the "Quick Start Party") if (ConfMan.getBool("importOrigSaves")) { - //importOriginalSaveFile(-1); - //ConfMan.setBool("importOrigSaves", false); - //ConfMan.flushToDisk(); + importOriginalSaveFile(-1); + ConfMan.setBool("importOrigSaves", false); + ConfMan.flushToDisk(); } loadItemDefs(); 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(); |