diff options
author | athrxx | 2013-04-27 15:35:48 +0200 |
---|---|---|
committer | athrxx | 2013-04-27 21:28:28 +0200 |
commit | c3a7e01807677e637a123188ba0081173c25380c (patch) | |
tree | 7c7c981b6ccba88d51c658f16c639af7a02d8c80 /engines/kyra | |
parent | be7486ffef6406131fb316d46aeefcd93beec7ac (diff) | |
download | scummvm-rg350-c3a7e01807677e637a123188ba0081173c25380c.tar.gz scummvm-rg350-c3a7e01807677e637a123188ba0081173c25380c.tar.bz2 scummvm-rg350-c3a7e01807677e637a123188ba0081173c25380c.zip |
KYRA: (EOB) - fix original savefile import/export
(flag settings were not imported/exported in EOB 1 saves)
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/script_eob.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp index de4d01b254..4a6a498173 100644 --- a/engines/kyra/script_eob.cpp +++ b/engines/kyra/script_eob.cpp @@ -216,21 +216,25 @@ bool EoBInfProcessor::preventRest() const { void EoBInfProcessor::loadState(Common::SeekableSubReadStreamEndian &in, bool origFile) { _preventRest = (_vm->game() == GI_EOB1 && origFile) ? 0 : in.readByte(); - int numFlags = (_vm->game() == GI_EOB1 && origFile) ? 13 : 18; + int numFlags = (_vm->game() == GI_EOB1 && origFile) ? 12 : 18; for (int i = 0; i < numFlags; i++) _flagTable[i] = in.readUint32(); + if (_vm->game() == GI_EOB1 && origFile) + setFlags(in.readUint32()); } void EoBInfProcessor::saveState(Common::OutSaveFile *out, bool origFile) { if (_vm->game() == GI_EOB2 || !origFile) out->writeByte(_preventRest); - int numFlags = (_vm->game() == GI_EOB1 && origFile) ? 13 : 18; + int numFlags = (_vm->game() == GI_EOB1 && origFile) ? 12 : 18; for (int i = 0; i < numFlags; i++) { if (origFile) out->writeUint32LE(_flagTable[i]); else out->writeUint32BE(_flagTable[i]); } + if (_vm->game() == GI_EOB1 && origFile) + out->writeUint32LE(_flagTable[17]); } void EoBInfProcessor::reset() { |