diff options
author | Filippos Karapetis | 2010-11-18 22:26:58 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-18 22:26:58 +0000 |
commit | 9e418e6eafe1c2efcbfb4d490180ac89c1c62bf9 (patch) | |
tree | befe06fb4b901eeb28cb7176992b57e66c0e394a /engines/sci/engine/kscripts.cpp | |
parent | 94d3d82f5909c21a03306470dbec6a0941e77b16 (diff) | |
download | scummvm-rg350-9e418e6eafe1c2efcbfb4d490180ac89c1c62bf9.tar.gz scummvm-rg350-9e418e6eafe1c2efcbfb4d490180ac89c1c62bf9.tar.bz2 scummvm-rg350-9e418e6eafe1c2efcbfb4d490180ac89c1c62bf9.zip |
SCI: Removed SCI3 hacks in kClone/kDisposeClone
svn-id: r54350
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
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; } |