diff options
author | Max Horn | 2006-10-28 01:28:41 +0000 |
---|---|---|
committer | Max Horn | 2006-10-28 01:28:41 +0000 |
commit | 10478617c699ad1e6fa272c5609cc743efd98fab (patch) | |
tree | b177dd3393a4d7924d11b58fdcb91c865a2f763f /engines/scumm/smush/imuse_channel.cpp | |
parent | a3bc66bcbd15fa6532b6f502cde42e06fbbb1a6a (diff) | |
download | scummvm-rg350-10478617c699ad1e6fa272c5609cc743efd98fab.tar.gz scummvm-rg350-10478617c699ad1e6fa272c5609cc743efd98fab.tar.bz2 scummvm-rg350-10478617c699ad1e6fa272c5609cc743efd98fab.zip |
SCUMM: Take advantage of the fact that Chunk now is a ReadStream subclass
svn-id: r24546
Diffstat (limited to 'engines/scumm/smush/imuse_channel.cpp')
-rw-r--r-- | engines/scumm/smush/imuse_channel.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp index dc5641f859..44baedc076 100644 --- a/engines/scumm/smush/imuse_channel.cpp +++ b/engines/scumm/smush/imuse_channel.cpp @@ -60,8 +60,8 @@ bool ImuseChannel::checkParameters(int32 index, int32 nbframes, int32 size, int3 bool ImuseChannel::appendData(Chunk &b, int32 size) { if (_dataSize == -1) { assert(size > 8); - Chunk::type imus_type = b.readUint32LE(); imus_type = SWAP_BYTES_32(imus_type); - uint32 imus_size = b.readUint32LE(); imus_size = SWAP_BYTES_32(imus_size); + Chunk::type imus_type = b.readUint32BE(); + /*uint32 imus_size =*/ b.readUint32BE(); if (imus_type != MKID_BE('iMUS')) error("Invalid Chunk for imuse_channel"); size -= 8; @@ -103,15 +103,11 @@ bool ImuseChannel::appendData(Chunk &b, int32 size) { bool ImuseChannel::handleFormat(Chunk &src) { if (src.size() != 20) error("invalid size for FRMT Chunk"); - uint32 imuse_start = src.readUint32LE(); - imuse_start = SWAP_BYTES_32(imuse_start); - src.seek(4, SEEK_CUR); - _bitsize = src.readUint32LE(); - _bitsize = SWAP_BYTES_32(_bitsize); - _rate = src.readUint32LE(); - _rate = SWAP_BYTES_32(_rate); - _channels = src.readUint32LE(); - _channels = SWAP_BYTES_32(_channels); + /*uint32 imuse_start =*/ src.readUint32BE(); + src.skip(4); + _bitsize = src.readUint32BE(); + _rate = src.readUint32BE(); + _channels = src.readUint32BE(); assert(_channels == 1 || _channels == 2); return true; } |