diff options
author | Filippos Karapetis | 2009-09-17 08:51:38 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-09-17 08:51:38 +0000 |
commit | f890a69428b0d5ed0314db98cde06c7246041ac4 (patch) | |
tree | d34d28e6f6351eed01189b2f9c8a61112026a0fc /engines/sci/engine/kscripts.cpp | |
parent | 0a037ccc45cda6a2eb1f1604c2c5ec64977ed0ce (diff) | |
download | scummvm-rg350-f890a69428b0d5ed0314db98cde06c7246041ac4.tar.gz scummvm-rg350-f890a69428b0d5ed0314db98cde06c7246041ac4.tar.bz2 scummvm-rg350-f890a69428b0d5ed0314db98cde06c7246041ac4.zip |
Changed the way object selectors are accessed, by removing the relevant defines and adding appropriate methods to the Object structure
svn-id: r44138
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 318d4b9c4d..157f285541 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -204,10 +204,10 @@ reg_t kClone(EngineState *s, int, int argc, reg_t *argv) { SciVersion version = s->resMan->sciVersion(); // for the selector defines // Mark as clone - clone_obj->_variables[SCRIPT_INFO_SELECTOR].offset = SCRIPT_INFO_CLONE; - clone_obj->_variables[SCRIPT_SPECIES_SELECTOR] = clone_obj->pos; - if (IS_CLASS(parent_obj)) - clone_obj->_variables[SCRIPT_SUPERCLASS_SELECTOR] = parent_obj->pos; + 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); s->segMan->getScript(parent_obj->pos.segment)->incrementLockers(); s->segMan->getScript(clone_obj->pos.segment)->incrementLockers(); @@ -230,7 +230,7 @@ reg_t kDisposeClone(EngineState *s, int, int argc, reg_t *argv) { SciVersion version = s->resMan->sciVersion(); // for the selector defines - if (victim_obj->_variables[SCRIPT_INFO_SELECTOR].offset != SCRIPT_INFO_CLONE) { + if (victim_obj->getInfoSelector(version).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; |