aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kscripts.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-17 14:03:14 +0000
committerFilippos Karapetis2010-11-17 14:03:14 +0000
commitbb9b7c24f9e301d35c1dcfb1a498df4af2a154db (patch)
treef4592934cafae379a89133fe1effda0085423e03 /engines/sci/engine/kscripts.cpp
parent3d7f7b49fe86e2ec8d637d9d5df5c8cb11969734 (diff)
downloadscummvm-rg350-bb9b7c24f9e301d35c1dcfb1a498df4af2a154db.tar.gz
scummvm-rg350-bb9b7c24f9e301d35c1dcfb1a498df4af2a154db.tar.bz2
scummvm-rg350-bb9b7c24f9e301d35c1dcfb1a498df4af2a154db.zip
SCI: Added some SCI3 selector related information
- Added a TODO for the usage of the -info- selector in kClone and kDisposeClone in SCI3 scripts, as it's no longer used in SCI3 - Added information about which of the selectors are missing in SCI3. There are some more which are missing, but aren't used in SCI2-SCI3 anyway - Some styling svn-id: r54291
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r--engines/sci/engine/kscripts.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index 0f1ee2c3f3..da67761b8a 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -155,6 +155,7 @@ 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 = readSelectorValue(s->_segMan, parentAddr, SELECTOR(_info_));
cloneObj = s->_segMan->allocateClone(&cloneAddr);
@@ -179,7 +180,11 @@ reg_t kClone(EngineState *s, int argc, reg_t *argv) {
// Mark as clone
infoSelector &= ~kInfoFlagClass; // remove class bit
- writeSelectorValue(s->_segMan, cloneAddr, SELECTOR(_info_), infoSelector | kInfoFlagClone);
+ if (getSciVersion() == SCI_VERSION_3)
+ // TODO: SCI3 equivalent, SCI3 objects don't have an -info- selector
+ warning("TODO: not modifying -info- selector in kClone for SCI3");
+ else
+ writeSelectorValue(s->_segMan, cloneAddr, SELECTOR(_info_), infoSelector | kInfoFlagClone);
cloneObj->setSpeciesSelector(cloneObj->getPos());
if (parentObj->isClass())
@@ -206,6 +211,7 @@ 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_));
if ((infoSelector & 3) == kInfoFlagClone)
object->markAsFreed();