[Scummvm-cvs-logs] SF.net SVN: scummvm:[54350] scummvm/trunk/engines/sci/engine/kscripts.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Nov 18 23:26:58 CET 2010
Revision: 54350
http://scummvm.svn.sourceforge.net/scummvm/?rev=54350&view=rev
Author: thebluegr
Date: 2010-11-18 22:26:58 +0000 (Thu, 18 Nov 2010)
Log Message:
-----------
SCI: Removed SCI3 hacks in kClone/kDisposeClone
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kscripts.cpp
Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp 2010-11-18 21:45:31 UTC (rev 54349)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp 2010-11-18 22:26:58 UTC (rev 54350)
@@ -155,7 +155,6 @@
debugC(2, kDebugLevelMemory, "Attempting to clone from %04x:%04x", PRINT_REG(parentAddr));
- // TODO: SCI3 equivalent, SCI3 objects don't have an -info- selector
uint16 infoSelector = parentObj->getInfoSelector().offset;
cloneObj = s->_segMan->allocateClone(&cloneAddr);
@@ -176,11 +175,6 @@
if (infoSelector & kInfoFlagClone)
parentObj = s->_segMan->getObject(parentAddr);
- // HACK: Since the info selector can't be read correctly for SCI3 yet,
- // always refresh the parent object pointer
- if (getSciVersion() == SCI_VERSION_3)
- parentObj = s->_segMan->getObject(parentAddr);
-
*cloneObj = *parentObj;
// Mark as clone
@@ -212,16 +206,10 @@
// At least kq4early relies on this behaviour. The scripts clone "Sound", then set bit 1 manually
// and call kDisposeClone later. In that case we may not free it, otherwise we will run into issues
// later, because kIsObject would then return false and Sound object wouldn't get checked.
- // TODO: SCI3 equivalent, SCI3 objects don't have an -info- selector
- uint16 infoSelector = readSelectorValue(s->_segMan, obj, SELECTOR(_info_));
+ uint16 infoSelector = object->getInfoSelector().offset;
if ((infoSelector & 3) == kInfoFlagClone)
object->markAsFreed();
- // HACK: Since the info selector can't be read correctly for SCI3 yet,
- // always mark the object as freed
- if (getSciVersion() == SCI_VERSION_3)
- object->markAsFreed();
-
return s->r_acc;
}
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