[Scummvm-cvs-logs] SF.net SVN: scummvm:[55525] scummvm/trunk/engines/sci/engine/object.cpp

lskovlun at users.sourceforge.net lskovlun at users.sourceforge.net
Tue Jan 25 11:21:44 CET 2011


Revision: 55525
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55525&view=rev
Author:   lskovlun
Date:     2011-01-25 10:21:44 +0000 (Tue, 25 Jan 2011)

Log Message:
-----------
SCI3: Fix script abort during startup on Big Endian platforms

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/object.cpp

Modified: scummvm/trunk/engines/sci/engine/object.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/object.cpp	2011-01-25 08:24:57 UTC (rev 55524)
+++ scummvm/trunk/engines/sci/engine/object.cpp	2011-01-25 10:21:44 UTC (rev 55525)
@@ -244,7 +244,11 @@
 			for (int bit = 2; bit < 32; ++bit) {
 				int value = READ_SCI11ENDIAN_UINT16(seeker + bit * 2);
 				if (typeMask & (1 << bit)) { // Property
-					propertyIds[propertyCounter] = groupBaseId + bit;
+// 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);
 					_variables[propertyCounter] = make_reg(0, value);
 					propertyOffsets[propertyCounter] = (seeker + bit * 2) - buf;
 					++propertyCounter;


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