diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp index 4d6e32436d88..a9cfa02564e1 100644 --- a/engines/voyeur/data.cpp +++ b/engines/voyeur/data.cpp @@ -43,7 +43,7 @@ SVoy::SVoy(VoyeurEngine *vm):_vm(vm) { _abortInterface = false; _isAM = false; Common::fill(&_phoneCallsReceived[0], &_phoneCallsReceived[5], false); - Common::fill(&_roomHotspotsEnabled[0], &_roomHotspotsEnabled[20], false); + Common::fill(&_roomHotspotsEnabled[0], &_roomHotspotsEnabled[32], false); _victimMurdered = false; _audioVisualStartTime = 0; @@ -118,7 +118,8 @@ void SVoy::synchronize(Common::Serializer &s) { _audioHotspotTimes.synchronize(s); _evidenceHotspotTimes.synchronize(s); - for (int idx = 0; idx < 20; ++idx) { + int count = s.getVersion() == 1 ? 20 : 32; + for (int idx = 0; idx < count; ++idx) { s.syncAsByte(_roomHotspotsEnabled[idx]); } diff --git a/engines/voyeur/data.h b/engines/voyeur/data.h index a18ad84f5174..e7bdb63f58ea 100644 --- a/engines/voyeur/data.h +++ b/engines/voyeur/data.h @@ -113,7 +113,7 @@ class SVoy { bool _abortInterface; bool _isAM; bool _phoneCallsReceived[5]; - bool _roomHotspotsEnabled[20]; + bool _roomHotspotsEnabled[32]; bool _victimMurdered; int _aptLoadMode; diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 01b76a72d1e8..7f2f0e312e71 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -793,6 +793,7 @@ void VoyeurEngine::loadGame(int slot) { header._thumbnail->free(); delete header._thumbnail; + serializer.setVersion(header._version); synchronize(serializer); delete saveFile; @@ -821,6 +822,7 @@ Common::Error VoyeurEngine::saveGameState(int slot, const Common::String &desc) Common::Serializer serializer(NULL, saveFile); // Synchronise the data + serializer.setVersion(VOYEUR_SAVEGAME_VERSION); synchronize(serializer); saveFile->finalize(); diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index 9cda85fd5153..dcd82b24a967 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -296,7 +296,7 @@ class VoyeurEngine : public Engine { void showEndingNews(); }; -#define VOYEUR_SAVEGAME_VERSION 1 +#define VOYEUR_SAVEGAME_VERSION 2 /** * Header for Voyeur savegame files