diff options
author | Filippos Karapetis | 2010-11-27 18:23:39 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-27 18:23:39 +0000 |
commit | 91e42bbcb98bca8c93d246664372b15796424b97 (patch) | |
tree | fa06f5ef5d2882c996d0688d9eab3b1eaf9610e4 /engines/sci | |
parent | 3485d433c5c158ceb1ea74d985fa9c1274185e9c (diff) | |
download | scummvm-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
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 18 |
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()); } } } - } } |