aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-01-26 16:51:18 +0000
committerWillem Jan Palenstijn2011-01-26 16:51:18 +0000
commit190bd60505e2ca0fb3c99f995d7b618915c895ad (patch)
tree9fd923130f3261824a0765aace83b1fc949292db /engines
parent04f971370c642aa30722af6ccad848ee99b5d835 (diff)
downloadscummvm-rg350-190bd60505e2ca0fb3c99f995d7b618915c895ad.tar.gz
scummvm-rg350-190bd60505e2ca0fb3c99f995d7b618915c895ad.tar.bz2
scummvm-rg350-190bd60505e2ca0fb3c99f995d7b618915c895ad.zip
SCI: Make SCI3 propertyId endianness hack a bit cleaner
svn-id: r55542
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/object.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/sci/engine/object.cpp b/engines/sci/engine/object.cpp
index 505cab9e96..bc79e30129 100644
--- a/engines/sci/engine/object.cpp
+++ b/engines/sci/engine/object.cpp
@@ -244,11 +244,15 @@ void Object::initSelectorsSci3(const byte *buf) {
for (int bit = 2; bit < 32; ++bit) {
int value = READ_SCI11ENDIAN_UINT16(seeker + bit * 2);
if (typeMask & (1 << bit)) { // Property
-// We really shouldn't be doing endianness conversion here;
-// instead, propertyIds should be converted to a Common::Array, like _baseMethod already is
-// This interim solution fixes playing SCI3 PC games on Big Endian platforms
-// but would likely fail with Mac versions of the same games...
- propertyIds[propertyCounter] = TO_LE_16(groupBaseId + bit);
+
+ // FIXME: We really shouldn't be doing endianness
+ // conversion here; instead, propertyIds should be converted
+ // to a Common::Array, like _baseMethod already is
+ // This interim solution fixes playing SCI3 PC games
+ // on Big Endian platforms
+
+ WRITE_SCI11ENDIAN_UINT16(&propertyIds[propertyCounter],
+ groupBaseId + bit);
_variables[propertyCounter] = make_reg(0, value);
propertyOffsets[propertyCounter] = (seeker + bit * 2) - buf;
++propertyCounter;