[Scummvm-cvs-logs] CVS: residual blocky16.cpp,1.10,1.11

Joost Peters joostp at users.sourceforge.net
Thu Apr 22 06:40:05 CEST 2004


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21174

Modified Files:
	blocky16.cpp 
Log Message:
attempt to fix smush on other BE platforms


Index: blocky16.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/blocky16.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- blocky16.cpp	19 Apr 2004 18:32:58 -0000	1.10
+++ blocky16.cpp	22 Apr 2004 13:39:07 -0000	1.11
@@ -690,7 +690,7 @@
 
 	switch(src[18]) {
 	case 0:
-#ifdef SYSTEM_BIG_ENDIAN
+#if defined(SYSTEM_BIG_ENDIAN) && defined(MACOSX)
 		for (int i = 0; i < _width * _height; i++) {
 			((uint16 *)_curBuf)[i] = READ_LE_UINT16(gfx_data + i * 2);
 		}
@@ -705,6 +705,13 @@
 		if (seq_nb == _prevSeqNb + 1) {
 			decode2(_curBuf, gfx_data, _width, _height, src + 24, src + 40);
 		}
+
+#if defined(SYSTEM_BIG_ENDIAN) && !defined(MACOSX)
+	for (int i = 0; i < _width * _height; ++i) {
+		((uint16 *)_curBuf)[i] = SWAP_BYTES_16(((uint16 *)_curBuf)[i]);
+	}			
+#endif
+		
 		break;
 	case 3:
 		memcpy(_curBuf, _deltaBufs[1], _frameSize);





More information about the Scummvm-git-logs mailing list