From 9e418e6eafe1c2efcbfb4d490180ac89c1c62bf9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 18 Nov 2010 22:26:58 +0000 Subject: SCI: Removed SCI3 hacks in kClone/kDisposeClone svn-id: r54350 --- engines/sci/engine/kscripts.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'engines/sci/engine/kscripts.cpp') diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 194505e54d..4b7451d355 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -155,7 +155,6 @@ reg_t kClone(EngineState *s, int argc, reg_t *argv) { 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 @@ reg_t kClone(EngineState *s, int argc, reg_t *argv) { 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 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) { // 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; } -- cgit v1.2.3