[Scummvm-cvs-logs] CVS: scummvm/scumm/smush imuse_channel.cpp,1.17,1.18 saud_channel.cpp,1.14,1.15

Max Horn fingolfin at users.sourceforge.net
Sat Jun 14 11:53:07 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv12056/scumm/smush

Modified Files:
	imuse_channel.cpp saud_channel.cpp 
Log Message:
Patch #754151: Removed READ_*_UNALIGNED and always read stuff bytewise; augmented by some more changes of mine

Index: imuse_channel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/imuse_channel.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- imuse_channel.cpp	7 Jun 2003 00:45:32 -0000	1.17
+++ imuse_channel.cpp	14 Jun 2003 18:52:29 -0000	1.18
@@ -72,8 +72,8 @@
 bool ImuseChannel::appendData(Chunk &b, int32 size) {
 	if (_dataSize == -1) {
 		assert(size > 8);
-		Chunk::type imus_type = b.getDword(); imus_type = SWAP_BYTES(imus_type);
-		uint32 imus_size = b.getDword(); imus_size = SWAP_BYTES(imus_size);
+		Chunk::type imus_type = b.getDword(); imus_type = SWAP_BYTES_32(imus_type);
+		uint32 imus_size = b.getDword(); imus_size = SWAP_BYTES_32(imus_size);
 		if (imus_type != TYPE_iMUS)
 			error("Invalid Chunk for imuse_channel");
 		size -= 8;
@@ -109,14 +109,14 @@
 bool ImuseChannel::handleFormat(Chunk &src) {
 	if (src.getSize() != 20) error("invalid size for FRMT Chunk");
 	uint32 imuse_start = src.getDword();
-	imuse_start = SWAP_BYTES(imuse_start);
+	imuse_start = SWAP_BYTES_32(imuse_start);
 	src.seek(4);
 	_bitsize = src.getDword();
-	_bitsize = SWAP_BYTES(_bitsize);
+	_bitsize = SWAP_BYTES_32(_bitsize);
 	_rate = src.getDword();
-	_rate = SWAP_BYTES(_rate);
+	_rate = SWAP_BYTES_32(_rate);
 	_channels = src.getDword();
-	_channels = SWAP_BYTES(_channels);
+	_channels = SWAP_BYTES_32(_channels);
 	assert(_channels == 1 || _channels == 2);
 	return true;
 }

Index: saud_channel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/saud_channel.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- saud_channel.cpp	7 Jun 2003 00:45:32 -0000	1.14
+++ saud_channel.cpp	14 Jun 2003 18:52:29 -0000	1.15
@@ -232,8 +232,8 @@
 bool SaudChannel::appendData(Chunk &b, int32 size) {
 	if (_dataSize == -1) {
 		assert(size > 8);
-		Chunk::type saud_type = b.getDword(); saud_type = SWAP_BYTES(saud_type);
-		uint32 saud_size = b.getDword(); saud_size = SWAP_BYTES(saud_size);
+		Chunk::type saud_type = b.getDword(); saud_type = SWAP_BYTES_32(saud_type);
+		uint32 saud_size = b.getDword(); saud_size = SWAP_BYTES_32(saud_size);
 		if (saud_type != TYPE_SAUD) error("Invalid Chunk for SaudChannel : %X", saud_type);
 		size -= 8;
 		_dataSize = -2;





More information about the Scummvm-git-logs mailing list