diff options
author | Max Horn | 2009-09-17 16:50:53 +0000 |
---|---|---|
committer | Max Horn | 2009-09-17 16:50:53 +0000 |
commit | eb77efda785dd7df31a90fb3fd57ea17bf49a606 (patch) | |
tree | 5a31e8292859154a920a0abdf945df0cbd0e4ab4 /engines/sci/engine/kscripts.cpp | |
parent | 9651562e72ac4c73393a2aba87e835269c25210f (diff) | |
download | scummvm-rg350-eb77efda785dd7df31a90fb3fd57ea17bf49a606.tar.gz scummvm-rg350-eb77efda785dd7df31a90fb3fd57ea17bf49a606.tar.bz2 scummvm-rg350-eb77efda785dd7df31a90fb3fd57ea17bf49a606.zip |
SCI: Add a global getSciVersion() function and make use of it
svn-id: r44170
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 157f285541..ce7656f47e 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -201,13 +201,11 @@ reg_t kClone(EngineState *s, int, int argc, reg_t *argv) { *clone_obj = *parent_obj; clone_obj->flags = 0; - SciVersion version = s->resMan->sciVersion(); // for the selector defines - // Mark as clone - clone_obj->setInfoSelector(make_reg(0, SCRIPT_INFO_CLONE), version); - clone_obj->setSpeciesSelector(clone_obj->pos, version); - if (parent_obj->isClass(version)) - clone_obj->setSuperClassSelector(parent_obj->pos, version); + clone_obj->setInfoSelector(make_reg(0, SCRIPT_INFO_CLONE)); + clone_obj->setSpeciesSelector(clone_obj->pos); + if (parent_obj->isClass()) + clone_obj->setSuperClassSelector(parent_obj->pos); s->segMan->getScript(parent_obj->pos.segment)->incrementLockers(); s->segMan->getScript(clone_obj->pos.segment)->incrementLockers(); @@ -228,9 +226,7 @@ reg_t kDisposeClone(EngineState *s, int, int argc, reg_t *argv) { return s->r_acc; } - SciVersion version = s->resMan->sciVersion(); // for the selector defines - - if (victim_obj->getInfoSelector(version).offset != SCRIPT_INFO_CLONE) { + if (victim_obj->getInfoSelector().offset != SCRIPT_INFO_CLONE) { //warning("Attempt to dispose something other than a clone at %04x", offset); // SCI silently ignores this behaviour; some games actually depend on it return s->r_acc; |