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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Jul 7 22:43:27 CEST 2009


Revision: 42240
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42240&view=rev
Author:   thebluegr
Date:     2009-07-07 20:43:27 +0000 (Tue, 07 Jul 2009)

Log Message:
-----------
Silenced the very chatty song iterator console messages by converting them to appropriate debug messages

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/ksound.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
    scummvm/trunk/engines/sci/sfx/iterator.cpp

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2009-07-07 20:17:07 UTC (rev 42239)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2009-07-07 20:43:27 UTC (rev 42240)
@@ -940,14 +940,14 @@
 
 		case SI_ABSOLUTE_CUE:
 			signal = cue;
-			fprintf(stderr, "[CUE] %04x:%04x Absolute Cue: %d\n",
+			debugC(2, kDebugLevelSound, "[CUE] %04x:%04x Absolute Cue: %d\n",
 			        PRINT_REG(obj), signal);
 
 			PUT_SEL32V(obj, signal, signal);
 			break;
 
 		case SI_RELATIVE_CUE:
-			fprintf(stderr, "[CUE] %04x:%04x Relative Cue: %d\n",
+			debugC(2, kDebugLevelSound, "[CUE] %04x:%04x Relative Cue: %d\n",
 			        PRINT_REG(obj), cue);
 
 			PUT_SEL32V(obj, dataInc, cue);

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-07-07 20:17:07 UTC (rev 42239)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-07-07 20:43:27 UTC (rev 42240)
@@ -619,7 +619,7 @@
 	// Workaround: LSL1VGA mixes its own internal fonts with the global
 	// SCI ones, so we translate them here, by removing their extra bits
 	if (!resMap.contains(num) && !_resManager->testResource(ResourceId(kResourceTypeFont, num)))
-			num = num & 0x7ff;
+		num = num & 0x7ff;
 
 	res = resMap.contains(num) ? resMap[num] : NULL;
 

Modified: scummvm/trunk/engines/sci/sfx/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-07-07 20:17:07 UTC (rev 42239)
+++ scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-07-07 20:43:27 UTC (rev 42240)
@@ -27,6 +27,7 @@
 
 #include "common/util.h"
 
+#include "sci/sci.h"
 #include "sci/sfx/iterator_internal.h"
 #include "sci/sfx/misc.h"	// for sfx_player_tell_synth
 #include "sci/tools.h"
@@ -233,7 +234,7 @@
 			channel->state = SI_STATE_DELTA_TIME;
 			channel->total_timepos = channel->loop_timepos;
 			channel->last_cmd = 0xfe;
-			fprintf(stderr, "Looping song iterator %08lx.\n", ID);
+			debugC(2, kDebugLevelSound, "Looping song iterator %08lx.\n", ID);
 			return SI_LOOP;
 		} else {
 			channel->state = SI_STATE_FINISHED;
@@ -379,7 +380,7 @@
 		channel->state = SI_STATE_FINISHED;
 		delay = (size * 50 + format.rate - 1) / format.rate; /* number of ticks to completion*/
 
-		fprintf(stderr, "delaying %d ticks\n", delay);
+		debugC(2, kDebugLevelSound, "delaying %d ticks\n", delay);
 		return delay;
 	}
 
@@ -523,7 +524,7 @@
 }
 
 static Audio::AudioStream *makeStream(byte *data, int size, sfx_pcm_config_t conf) {
-	printf("Playing PCM data of size %d, rate %d\n", size, conf.rate);
+	debugC(2, kDebugLevelSound, "Playing PCM data of size %d, rate %d\n", size, conf.rate);
 
 	// Duplicate the data
 	byte *sound = (byte *)malloc(size);
@@ -563,7 +564,7 @@
 
 		case _SIMSG_BASEMSG_PRINT:
 			print_tabs_id(msg._arg.i, ID);
-			fprintf(stderr, "SCI0: dev=%d, active-chan=%d, size=%d, loops=%d\n",
+			debugC(2, kDebugLevelSound, "SCI0: dev=%d, active-chan=%d, size=%d, loops=%d\n",
 			        _deviceId, _numActiveChannels, _data.size(), _loops);
 			break;
 
@@ -980,7 +981,7 @@
 				playmask |= _channels[i].playmask;
 
 			print_tabs_id(msg._arg.i, ID);
-			fprintf(stderr, "SCI1: chan-nr=%d, playmask=%04x\n",
+			debugC(2, kDebugLevelSound, "SCI1: chan-nr=%d, playmask=%04x\n",
 			        _numChannels, playmask);
 		}
 		break;
@@ -1142,7 +1143,7 @@
 SongIterator *CleanupSongIterator::handleMessage(Message msg) {
 	if (msg._class == _SIMSG_BASEMSG_PRINT && msg._type == _SIMSG_BASEMSG_PRINT) {
 		print_tabs_id(msg._arg.i, ID);
-		fprintf(stderr, "CLEANUP\n");
+		debugC(2, kDebugLevelSound, "CLEANUP\n");
 	}
 
 	return NULL;
@@ -1208,7 +1209,7 @@
 
 	if (msg._class == _SIMSG_BASE && msg._type == _SIMSG_BASEMSG_PRINT) {
 		print_tabs_id(msg._arg.i, ID);
-		fprintf(stderr, "FASTFORWARD:\n");
+		debugC(2, kDebugLevelSound, "FASTFORWARD:\n");
 		msg._arg.i++;
 	}
 
@@ -1532,7 +1533,7 @@
 
 	if (msg._class == _SIMSG_BASE && msg._type == _SIMSG_BASEMSG_PRINT) {
 		print_tabs_id(msg._arg.i, ID);
-		fprintf(stderr, "TEE:\n");
+		debugC(2, kDebugLevelSound, "TEE:\n");
 		msg._arg.i++;
 	}
 
@@ -1576,15 +1577,15 @@
 	do {
 		retval = (*it)->nextCommand(buf, result);
 		if (retval == SI_MORPH) {
-			fprintf(stderr, "  Morphing %p (stored at %p)\n", (void *)*it, (void *)it);
+			debugC(2, kDebugLevelSound, "  Morphing %p (stored at %p)\n", (void *)*it, (void *)it);
 			if (!SIMSG_SEND((*it), SIMSG_ACK_MORPH)) {
 				error("SI_MORPH failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
 			} else
-				fprintf(stderr, "SI_MORPH successful\n");
+				debugC(2, kDebugLevelSound, "SI_MORPH successful\n");
 		}
 
 		if (retval == SI_FINISHED)
-			fprintf(stderr, "[song-iterator] Song finished. mask = %04x, cm=%04x\n",
+			debugC(2, kDebugLevelSound, "[song-iterator] Song finished. mask = %04x, cm=%04x\n",
 			        mask, (*it)->channel_mask);
 		if (retval == SI_FINISHED
 		        && (mask & IT_READER_MAY_CLEAN)


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