aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-27 18:23:39 +0000
committerFilippos Karapetis2010-11-27 18:23:39 +0000
commit91e42bbcb98bca8c93d246664372b15796424b97 (patch)
treefa06f5ef5d2882c996d0688d9eab3b1eaf9610e4
parent3485d433c5c158ceb1ea74d985fa9c1274185e9c (diff)
downloadscummvm-rg350-91e42bbcb98bca8c93d246664372b15796424b97.tar.gz
scummvm-rg350-91e42bbcb98bca8c93d246664372b15796424b97.tar.bz2
scummvm-rg350-91e42bbcb98bca8c93d246664372b15796424b97.zip
SCI: Reverted changes to savegame.cpp made in r54510, as that still occurs
svn-id: r54511
-rw-r--r--engines/sci/engine/savegame.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index f0df3ff627..715b3b5127 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -194,23 +194,17 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
for (ObjMap::iterator it = scr->_objects.begin(); it != scr->_objects.end(); ++it) {
reg_t addr = it->_value.getPos();
- scr->scriptObjInit(addr, false);
- }
+ Object *obj = scr->scriptObjInit(addr, false);
- // In SCI0-SCI1, we need to make two passes, as the objects in the
- // script might be in the wrong order (e.g. in the demo of Iceman).
- // Refer to bug #3034713
- if (getSciVersion() < SCI_VERSION_1_1) {
- for (ObjMap::iterator it = scr->_objects.begin(); it != scr->_objects.end(); ++it) {
- reg_t addr = it->_value.getPos();
- Object *obj = scr->scriptObjInit(addr, false);
+ if (getSciVersion() < SCI_VERSION_1_1) {
if (!obj->initBaseObject(this, addr, false)) {
- error("Failed to locate base object for object at %04X:%04X; skipping", PRINT_REG(addr));
- //scr->scriptObjRemove(addr);
+ // TODO/FIXME: This should not be happening at all. It might indicate a possible issue
+ // with the garbage collector. It happens for example in LSL5 (German, perhaps English too).
+ warning("Failed to locate base object for object at %04X:%04X; skipping", PRINT_REG(addr));
+ scr->_objects.erase(addr.toUint16());
}
}
}
-
}
}