diff options
author | Filippos Karapetis | 2010-06-22 15:03:19 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-22 15:03:19 +0000 |
commit | c28fa2cf196eec983ad2b33b4f5ca9e607a9652d (patch) | |
tree | b32c785c5292caed75e7207304731c3e8b904fff /engines/sci/engine | |
parent | 5855cd7127c9c7b40a67dd9d8aecbd065fc231b9 (diff) | |
download | scummvm-rg350-c28fa2cf196eec983ad2b33b4f5ca9e607a9652d.tar.gz scummvm-rg350-c28fa2cf196eec983ad2b33b4f5ca9e607a9652d.tar.bz2 scummvm-rg350-c28fa2cf196eec983ad2b33b4f5ca9e607a9652d.zip |
Reverted the code which handles objects without a base object when loading, for now. This possibly indicates an issue related to the garbage collector
svn-id: r50142
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 10 | ||||
-rw-r--r-- | engines/sci/engine/segment.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/segment.h | 2 |
3 files changed, 5 insertions, 9 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index d6cbd32eae..351e7c6a7b 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -778,11 +778,11 @@ void SegManager::reconstructScripts(EngineState *s) { Object *obj = scr->scriptObjInit(addr, false); if (getSciVersion() < SCI_VERSION_1_1) { - if (!obj->isFreed()) { - if (!obj->initBaseObject(this, addr, false)) { - warning("Failed to locate base object for object at %04X:%04X; skipping", PRINT_REG(addr)); - //scr->scriptObjRemove(addr); - } + if (!obj->initBaseObject(this, addr, false)) { + // 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->scriptObjRemove(addr); } } } diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index c2f72ecdbd..98f03ff18a 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -268,14 +268,12 @@ Object *Script::scriptObjInit(reg_t obj_pos, bool fullObjectInit) { return obj; } -#if 0 void Script::scriptObjRemove(reg_t obj_pos) { if (getSciVersion() < SCI_VERSION_1_1) obj_pos.offset += 8; _objects.erase(obj_pos.toUint16()); } -#endif // This helper function is used by Script::relocateLocal and Object::relocate static bool relocateBlock(Common::Array<reg_t> &block, int block_location, SegmentId segment, int location, size_t scriptSize) { diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 141576cb67..253d94cc53 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -406,13 +406,11 @@ public: */ Object *scriptObjInit(reg_t obj_pos, bool fullObjectInit = true); -#if 0 /** * Removes a script object * @param obj_pos Location (segment, offset) of the object. */ void scriptObjRemove(reg_t obj_pos); -#endif /** * Processes a relocation block witin a script |