[Scummvm-cvs-logs] SF.net SVN: scummvm:[49603] scummvm/trunk/engines/sci/console.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Jun 12 11:29:28 CEST 2010
Revision: 49603
http://scummvm.svn.sourceforge.net/scummvm/?rev=49603&view=rev
Author: thebluegr
Date: 2010-06-12 09:29:28 +0000 (Sat, 12 Jun 2010)
Log Message:
-----------
Extended show_instruments to show the songs where each instrument is used in
Modified Paths:
--------------
scummvm/trunk/engines/sci/console.cpp
Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp 2010-06-12 02:54:51 UTC (rev 49602)
+++ scummvm/trunk/engines/sci/console.cpp 2010-06-12 09:29:28 UTC (rev 49603)
@@ -866,9 +866,15 @@
sort(resources->begin(), resources->end(), ResourceIdLess());
Common::List<ResourceId>::iterator itr = resources->begin();
int instruments[128];
+ bool instrumentsSongs[128][1000];
+
for (int i = 0; i < 128; i++)
instruments[i] = 0;
+ for (int i = 0; i < 128; i++)
+ for (int j = 0; j < 1000; j++)
+ instrumentsSongs[i][j] = false;
+
if (songNumber == -1) {
DebugPrintf("%d sounds found, checking their instrument mappings...\n", resources->size());
DebugPrintf("Instruments:\n");
@@ -930,6 +936,7 @@
DebugPrintf(" %d", instrument);
instruments[instrument]++;
+ instrumentsSongs[instrument][itr->number] = true;
}
break;
case 0xD:
@@ -984,6 +991,20 @@
DebugPrintf("%d, ", i);
}
DebugPrintf("\n\n");
+
+ DebugPrintf("Used instruments in songs:\n");
+ for (int i = 0; i < 128; i++) {
+ if (instruments[i] > 0) {
+ DebugPrintf("Instrument %d: ", i);
+ for (int j = 0; j < 1000; j++) {
+ if (instrumentsSongs[i][j])
+ DebugPrintf("%d, ", j);
+ }
+ DebugPrintf("\n");
+ }
+ }
+
+ DebugPrintf("\n\n");
}
return true;
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