From 34c18f20d89f9b239a569d434cbf39236a08ed0b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 17 Nov 2010 21:49:19 +0000 Subject: SCI: Added hacks in kClone/kDisposeClone for SCI3 svn-id: r54307 --- engines/sci/engine/kscripts.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engines') diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 9fccceebbe..d91662a695 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -175,6 +175,11 @@ reg_t kClone(EngineState *s, int argc, reg_t *argv) { // extend the internal storage size. 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; @@ -216,6 +221,11 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) { 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