aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
authorPaul Gilbert2017-08-07 19:20:05 -0400
committerPaul Gilbert2017-08-07 19:20:05 -0400
commit659fdfaf9ec6fa0ca7a7397221977105f201349c (patch)
treee72aa07486ab09a775032558c5e8dddf35617ed8 /engines/voyeur
parentda4d4d8272a96b6ce5de905966f1ce9ba859a6a3 (diff)
downloadscummvm-rg350-659fdfaf9ec6fa0ca7a7397221977105f201349c.tar.gz
scummvm-rg350-659fdfaf9ec6fa0ca7a7397221977105f201349c.tar.bz2
scummvm-rg350-659fdfaf9ec6fa0ca7a7397221977105f201349c.zip
VOYEUR: Workaround original game using invalid hotspot Ids
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/data.cpp5
-rw-r--r--engines/voyeur/data.h2
-rw-r--r--engines/voyeur/voyeur.cpp2
-rw-r--r--engines/voyeur/voyeur.h2
4 files changed, 7 insertions, 4 deletions
diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp
index 4d6e32436d..a9cfa02564 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 a18ad84f51..e7bdb63f58 100644
--- a/engines/voyeur/data.h
+++ b/engines/voyeur/data.h
@@ -113,7 +113,7 @@ public:
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 01b76a72d1..7f2f0e312e 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 9cda85fd51..dcd82b24a9 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -296,7 +296,7 @@ public:
void showEndingNews();
};
-#define VOYEUR_SAVEGAME_VERSION 1
+#define VOYEUR_SAVEGAME_VERSION 2
/**
* Header for Voyeur savegame files