[Scummvm-cvs-logs] SF.net SVN: scummvm:[50142] scummvm/trunk/engines/sci/engine
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Jun 22 17:03:19 CEST 2010
Revision: 50142
http://scummvm.svn.sourceforge.net/scummvm/?rev=50142&view=rev
Author: thebluegr
Date: 2010-06-22 15:03:19 +0000 (Tue, 22 Jun 2010)
Log Message:
-----------
Reverted the code which handles objects without a base object when loading, for now. This possibly indicates an issue related to the garbage collector
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/savegame.cpp
scummvm/trunk/engines/sci/engine/segment.cpp
scummvm/trunk/engines/sci/engine/segment.h
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2010-06-22 15:01:45 UTC (rev 50141)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2010-06-22 15:03:19 UTC (rev 50142)
@@ -778,11 +778,11 @@
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);
}
}
}
Modified: scummvm/trunk/engines/sci/engine/segment.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.cpp 2010-06-22 15:01:45 UTC (rev 50141)
+++ scummvm/trunk/engines/sci/engine/segment.cpp 2010-06-22 15:03:19 UTC (rev 50142)
@@ -268,14 +268,12 @@
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) {
Modified: scummvm/trunk/engines/sci/engine/segment.h
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.h 2010-06-22 15:01:45 UTC (rev 50141)
+++ scummvm/trunk/engines/sci/engine/segment.h 2010-06-22 15:03:19 UTC (rev 50142)
@@ -406,13 +406,11 @@
*/
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list