From c3a7e01807677e637a123188ba0081173c25380c Mon Sep 17 00:00:00 2001 From: athrxx Date: Sat, 27 Apr 2013 15:35:48 +0200 Subject: KYRA: (EOB) - fix original savefile import/export (flag settings were not imported/exported in EOB 1 saves) --- engines/kyra/script_eob.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engines/kyra') 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() { -- cgit v1.2.3