diff options
author | Filippos Karapetis | 2010-11-17 21:49:19 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-17 21:49:19 +0000 |
commit | 34c18f20d89f9b239a569d434cbf39236a08ed0b (patch) | |
tree | 58d0403657d3ec79b0e8cf8a2e528b8877da9090 /engines/sci/engine/kscripts.cpp | |
parent | bd844a8c92e4176f613d358425cc3eeb0ead2bda (diff) | |
download | scummvm-rg350-34c18f20d89f9b239a569d434cbf39236a08ed0b.tar.gz scummvm-rg350-34c18f20d89f9b239a569d434cbf39236a08ed0b.tar.bz2 scummvm-rg350-34c18f20d89f9b239a569d434cbf39236a08ed0b.zip |
SCI: Added hacks in kClone/kDisposeClone for SCI3
svn-id: r54307
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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; } |