aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/segment.cpp3
-rw-r--r--engines/sci/engine/segment.h11
2 files changed, 8 insertions, 6 deletions
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp
index 547eb20182..69b9153621 100644
--- a/engines/sci/engine/segment.cpp
+++ b/engines/sci/engine/segment.cpp
@@ -399,7 +399,7 @@ void Object::init(byte *buf, reg_t obj_pos, bool initVariables) {
for (uint i = 0; i < _variables.size(); i++)
_variables[i] = make_reg(0, READ_SCI11ENDIAN_UINT16(data + (i * 2)));
} else {
- infoSelectorSci3 = make_reg(0, READ_SCI11ENDIAN_UINT16(_baseObj + 10));
+ _infoSelectorSci3 = make_reg(0, READ_SCI11ENDIAN_UINT16(_baseObj + 10));
}
}
}
@@ -581,6 +581,7 @@ void Object::initSelectorsSci3(const byte *buf) {
}
}
+ _speciesSelectorSci3 = make_reg(0, READ_SCI11ENDIAN_UINT16(_baseObj + 4));
_superClassPosSci3 = make_reg(0, READ_SCI11ENDIAN_UINT16(_baseObj + 8));
_baseVars = propertyIds;
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index b23cf88bef..8cebfbcb7d 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -242,14 +242,14 @@ public:
if (getSciVersion() <= SCI_VERSION_2_1)
return _variables[_offset];
else // SCI3
- return make_reg(0, READ_SCI11ENDIAN_UINT16(_baseObj + 4));
+ return _speciesSelectorSci3;
}
void setSpeciesSelector(reg_t value) {
if (getSciVersion() <= SCI_VERSION_2_1)
_variables[_offset] = value;
else // SCI3
- warning("TODO: setSpeciesSelector called for SCI3");
+ _speciesSelectorSci3 = value;
}
reg_t getSuperClassSelector() const {
@@ -270,14 +270,14 @@ public:
if (getSciVersion() <= SCI_VERSION_2_1)
return _variables[_offset + 2];
else // SCI3
- return infoSelectorSci3;
+ return _infoSelectorSci3;
}
void setInfoSelector(reg_t info) {
if (getSciVersion() <= SCI_VERSION_2_1)
_variables[_offset + 2] = info;
else // SCI3
- infoSelectorSci3 = info;
+ _infoSelectorSci3 = info;
}
// No setter for the -info- selector
@@ -406,7 +406,8 @@ private:
uint16 _offset;
reg_t _pos; /**< Object offset within its script; for clones, this is their base */
reg_t _superClassPosSci3; /**< reg_t pointing to superclass for SCI3 */
- reg_t infoSelectorSci3; /**< reg_t containing info "selector" for SCI3 */
+ reg_t _speciesSelectorSci3; /**< reg_t containing species "selector" for SCI3 */
+ reg_t _infoSelectorSci3; /**< reg_t containing info "selector" for SCI3 */
};
/** Data stack */