[Scummvm-cvs-logs] SF.net SVN: scummvm:[46969] scummvm/trunk/engines/sci/resource.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Mon Jan 4 14:21:36 CET 2010


Revision: 46969
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46969&view=rev
Author:   m_kiewitz
Date:     2010-01-04 13:21:35 +0000 (Mon, 04 Jan 2010)

Log Message:
-----------
SCI: channels[] work, sci0 fading still not working (volume is changed though)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/resource.cpp

Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp	2010-01-04 11:12:19 UTC (rev 46968)
+++ scummvm/trunk/engines/sci/resource.cpp	2010-01-04 13:21:35 UTC (rev 46969)
@@ -1894,7 +1894,7 @@
 		_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 @@
 			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;


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