From 6f95b1a440c8579a5010c39ca84e2c5fcdfac682 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Mon, 17 Apr 2017 11:25:31 -0500 Subject: SCI32: Fix missing mustSetViewVisible data in cloned objects This information comes directly from script data and is not modified at runtime, so it does not need to be persisted in save games, but does need to be set when reconstructing clones. --- engines/sci/engine/savegame.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'engines/sci/engine/savegame.cpp') diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 433878429e..427e32deb3 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -104,10 +104,6 @@ void syncWithSerializer(Common::Serializer &s, Node &obj) { syncWithSerializer(s, obj.value); } -void syncWithSerializer(Common::Serializer &s, bool &obj) { - s.syncAsByte(obj); -} - #pragma mark - // By default, sync using syncWithSerializer, which in turn can easily be overloaded. @@ -427,12 +423,20 @@ void Object::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint32LE(_methodCount); // that's actually a uint16 syncArray(s, _variables); + +#ifdef ENABLE_SCI32 if (s.getVersion() >= 42 && getSciVersion() == SCI_VERSION_3) { - syncArray(s, _mustSetViewVisible); + // Obsolete mustSetViewVisible array + if (s.getVersion() == 42 && s.isLoading()) { + uint32 len; + s.syncAsUint32LE(len); + s.skip(len); + } syncWithSerializer(s, _superClassPosSci3); syncWithSerializer(s, _speciesSelectorSci3); syncWithSerializer(s, _infoSelectorSci3); } +#endif } -- cgit v1.2.3