[Scummvm-cvs-logs] CVS: scummvm/sword1 resman.cpp,1.3,1.4

Robert G?ffringmann lavosspawn at users.sourceforge.net
Wed Dec 17 03:12:01 CET 2003


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv19027/sword1

Modified Files:
	resman.cpp 
Log Message:
big endian fix

Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/resman.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- resman.cpp	17 Dec 2003 01:47:47 -0000	1.3
+++ resman.cpp	17 Dec 2003 11:11:03 -0000	1.4
@@ -249,14 +249,14 @@
 	BsMemHandle *memHandle = resHandle(id);
 	if (memHandle->cond == MEM_FREED) {
 		resOpen(id);
-#ifdef SCUMM_BIG_ENDIAN
 		uint16 *head = (uint16*)memHandle->data;
+#ifdef SCUMM_BIG_ENDIAN
 		for (uint8 endCnt = 0; endCnt < 5; endCnt++)
 			head[endCnt] = READ_LE_UINT16(head + endCnt);
 #endif
 		// fix transparency:
 		uint8 *rawData = (uint8*)memHandle->data;
-		uint32 size = READ_LE_UINT16(rawData) * READ_LE_UINT16(rawData + 2) * READ_LE_UINT16(rawData + 4);
+		uint32 size = head[0] * head[1] * head[2];
 		rawData += 0x3A;
 		for (uint32 cnt = 0; cnt < size; cnt++)
 			if (rawData[cnt] == 0)





More information about the Scummvm-git-logs mailing list