From 01ebbcf101efc6897ec11a18ca389aed24371e77 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Mon, 4 Jan 2010 13:21:35 +0000 Subject: SCI: channels[] work, sci0 fading still not working (volume is changed though) svn-id: r46969 --- engines/sci/resource.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 1ecbff6eee..3c99c9801d 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -1894,7 +1894,7 @@ SoundResource::SoundResource(uint32 resNumber, ResourceManager *resMan, SciVersi _tracks = new Track[_trackCount]; _tracks->digitalChannelNr = -1; _tracks->type = TRACKTYPE_NONE; - _tracks->channelCount = 1; + _tracks->channelCount = 16; // Digital sample data included? -> Add an additional channel if (resource->data[0] == 2) _tracks->channelCount++; @@ -1908,10 +1908,17 @@ SoundResource::SoundResource(uint32 resNumber, ResourceManager *resMan, SciVersi channel->data = resource->data + 0x21; channel->size = resource->size - 0x21; } - if (_tracks->channelCount == 2) { + data = resource->data + 1; + for (channelNr = 0; channelNr < 16; channelNr++) { + channel = &_tracks->channels[channelNr]; + channel->number = channelNr; + channel->poly = *data >> 4; + data++; + } + if (_tracks->channelCount == 17) { // Digital sample data included - _tracks->digitalChannelNr = 1; - sampleChannel = &_tracks->channels[1]; + _tracks->digitalChannelNr = 16; + sampleChannel = &_tracks->channels[16]; // we need to find 0xFC (channel terminator) within the data data = channel->data; dataEnd = channel->data + channel->size; -- cgit v1.2.3