aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/segment.h
diff options
context:
space:
mode:
authorLars Skovlund2010-11-18 17:38:56 +0000
committerLars Skovlund2010-11-18 17:38:56 +0000
commit487feb38433aa6a704dcac5f7b8288ba81772078 (patch)
tree0729131d3107c087d81e5ce8338e205b55b17d2a /engines/sci/engine/segment.h
parent316ba2e6a9ed8a3856ff216017ad8d5025b6314e (diff)
downloadscummvm-rg350-487feb38433aa6a704dcac5f7b8288ba81772078.tar.gz
scummvm-rg350-487feb38433aa6a704dcac5f7b8288ba81772078.tar.bz2
scummvm-rg350-487feb38433aa6a704dcac5f7b8288ba81772078.zip
Get rid of a const_cast.
svn-id: r54333
Diffstat (limited to 'engines/sci/engine/segment.h')
-rw-r--r--engines/sci/engine/segment.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index 40fd385275..b23cf88bef 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -270,14 +270,14 @@ public:
if (getSciVersion() <= SCI_VERSION_2_1)
return _variables[_offset + 2];
else // SCI3
- return make_reg(0, READ_SCI11ENDIAN_UINT16(_baseObj + 10));
+ return infoSelectorSci3;
}
void setInfoSelector(reg_t info) {
if (getSciVersion() <= SCI_VERSION_2_1)
_variables[_offset + 2] = info;
else // SCI3
- WRITE_SCI11ENDIAN_UINT16(const_cast<byte*>(_baseObj + 10), info.offset);
+ infoSelectorSci3 = info;
}
// No setter for the -info- selector
@@ -406,6 +406,7 @@ 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 */
};
/** Data stack */