[Scummvm-cvs-logs] SF.net SVN: scummvm:[35506] scummvm/trunk/engines/tinsel/bmv.cpp

joostp at users.sourceforge.net joostp at users.sourceforge.net
Tue Dec 23 21:20:31 CET 2008


Revision: 35506
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35506&view=rev
Author:   joostp
Date:     2008-12-23 20:20:30 +0000 (Tue, 23 Dec 2008)

Log Message:
-----------
endian fixes

Modified Paths:
--------------
    scummvm/trunk/engines/tinsel/bmv.cpp

Modified: scummvm/trunk/engines/tinsel/bmv.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/bmv.cpp	2008-12-23 19:50:24 UTC (rev 35505)
+++ scummvm/trunk/engines/tinsel/bmv.cpp	2008-12-23 20:20:30 UTC (rev 35506)
@@ -692,7 +692,7 @@
 			if (nextReadSlot*SLOT_SIZE >= thisPacket && thisPacket+3 >= nextReadSlot*SLOT_SIZE)
 				return thisPacket + 3;
 		}
-		length = *(int32 *)(bigBuffer + thisPacket + 1);
+		length = (int32)READ_LE_UINT32(bigBuffer + thisPacket + 1);
 		length &= 0x00ffffff;
 		return thisPacket + length + 4;
 	}
@@ -962,7 +962,7 @@
 		return true;
 
 	default:
-		length = *(int *)(data + 1);
+		length = (int32)READ_LE_UINT32(data + 1);
 		length &= 0x00ffffff;
 
 		graphOffset = nextUseOffset + 4;	// Skip command byte and length
@@ -998,7 +998,7 @@
 		}
 
 		if (*data & CD_XSCR) {
-			xscr = *(signed short *)(bigBuffer + graphOffset);
+			xscr = (int16)READ_LE_UINT16(bigBuffer + graphOffset);
 			graphOffset += sz_XSCR_pkt;	// Skip scroll offset
 			length -= sz_XSCR_pkt;
 		} else if (*data & BIT0)


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