aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-01-14 18:20:56 +0000
committerMax Horn2003-01-14 18:20:56 +0000
commit9943dd39751a144d05f7307e8f36d00b9b7dfef8 (patch)
tree7f76a1a951b56e9f7eb2dd1ccbd013129adee5f9 /scumm
parent2f28a2e75ad1f370e1354b38be7728f2dfe7d75b (diff)
downloadscummvm-rg350-9943dd39751a144d05f7307e8f36d00b9b7dfef8.tar.gz
scummvm-rg350-9943dd39751a144d05f7307e8f36d00b9b7dfef8.tar.bz2
scummvm-rg350-9943dd39751a144d05f7307e8f36d00b9b7dfef8.zip
fix saveload bug introduced 2 days ago
svn-id: r6458
Diffstat (limited to 'scumm')
-rw-r--r--scumm/saveload.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 5adeaa160f..ece1656158 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -575,6 +575,14 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion)
s->saveLoadArrayOf(vm.slot, NUM_SCRIPT_SLOT, sizeof(vm.slot[0]), scriptSlotEntries);
s->saveLoadArrayOf(_objs, _numLocalObjects, sizeof(_objs[0]), objectEntries);
+ if (!s->isSaving() && savegameVersion < VER_V13) {
+ // Since roughly v13 of the save games, the objs storage has changed a bit
+ for (i = _numObjectsInRoom; i < _numLocalObjects; i++) {
+ if (_objs[i].fl_object_index == 0)
+ _objs[i].obj_nr = 0;
+ }
+
+ }
s->saveLoadArrayOf(_verbs, _numVerbs, sizeof(_verbs[0]), verbEntries);
s->saveLoadArrayOf(vm.nest, 16, sizeof(vm.nest[0]), nestedScriptEntries);
s->saveLoadArrayOf(_sentence, 6, sizeof(_sentence[0]), sentenceTabEntries);