[Scummvm-cvs-logs] SF.net SVN: scummvm:[54333] scummvm/trunk/engines/sci/engine
lskovlun at users.sourceforge.net
lskovlun at users.sourceforge.net
Thu Nov 18 18:38:56 CET 2010
Revision: 54333
http://scummvm.svn.sourceforge.net/scummvm/?rev=54333&view=rev
Author: lskovlun
Date: 2010-11-18 17:38:56 +0000 (Thu, 18 Nov 2010)
Log Message:
-----------
Get rid of a const_cast.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/segment.cpp
scummvm/trunk/engines/sci/engine/segment.h
Modified: scummvm/trunk/engines/sci/engine/segment.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.cpp 2010-11-18 17:31:12 UTC (rev 54332)
+++ scummvm/trunk/engines/sci/engine/segment.cpp 2010-11-18 17:38:56 UTC (rev 54333)
@@ -398,6 +398,8 @@
if (getSciVersion() <= SCI_VERSION_2_1) {
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));
}
}
}
Modified: scummvm/trunk/engines/sci/engine/segment.h
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.h 2010-11-18 17:31:12 UTC (rev 54332)
+++ scummvm/trunk/engines/sci/engine/segment.h 2010-11-18 17:38:56 UTC (rev 54333)
@@ -270,14 +270,14 @@
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 @@
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 */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list