[Scummvm-cvs-logs] SF.net SVN: scummvm:[51460] scummvm/trunk/engines/sci/sound/soundcmd.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jul 29 12:58:02 CEST 2010


Revision: 51460
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51460&view=rev
Author:   thebluegr
Date:     2010-07-29 10:58:01 +0000 (Thu, 29 Jul 2010)

Log Message:
-----------
SCI: Added back debug output to sound commands

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sound/soundcmd.cpp

Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-07-29 10:48:54 UTC (rev 51459)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-07-29 10:58:01 UTC (rev 51460)
@@ -45,6 +45,7 @@
 }
 
 reg_t SoundCommandParser::kDoSoundInit(int argc, reg_t *argv, reg_t acc) {
+	debugC(2, kDebugLevelSound, "kDoSound(init): %04x:%04x", PRINT_REG(argv[0]));
 	processInitSound(argv[0]);
 	return acc;
 }
@@ -102,6 +103,7 @@
 }
 
 reg_t SoundCommandParser::kDoSoundPlay(int argc, reg_t *argv, reg_t acc) {
+	debugC(2, kDebugLevelSound, "kDoSound(play): %04x:%04x", PRINT_REG(argv[0]));
 	processPlaySound(argv[0]);
 	return acc;
 }
@@ -151,6 +153,7 @@
 }
 
 reg_t SoundCommandParser::kDoSoundDispose(int argc, reg_t *argv, reg_t acc) {
+	debugC(2, kDebugLevelSound, "kDoSound(dispose): %04x:%04x", PRINT_REG(argv[0]));
 	processDisposeSound(argv[0]);
 	return acc;
 }
@@ -173,6 +176,7 @@
 }
 
 reg_t SoundCommandParser::kDoSoundStop(int argc, reg_t *argv, reg_t acc) {
+	debugC(2, kDebugLevelSound, "kDoSound(stop): %04x:%04x", PRINT_REG(argv[0]));
 	processStopSound(argv[0], false);
 	return acc;
 }
@@ -206,6 +210,11 @@
 }
 
 reg_t SoundCommandParser::kDoSoundPause(int argc, reg_t *argv, reg_t acc) {
+	if (argc == 1)
+		debugC(2, kDebugLevelSound, "kDoSound(pause): %04x:%04x", PRINT_REG(argv[0]));
+	else
+		debugC(2, kDebugLevelSound, "kDoSound(pause): %04x:%04x, %04x:%04x", PRINT_REG(argv[0]), PRINT_REG(argv[1]));
+
 	if (_soundVersion <= SCI_VERSION_0_LATE) {
 		// SCI0 games give us 0/1 for either resuming or pausing the current music
 		//  this one doesn't count, so pausing 2 times and resuming once means here that we are supposed to resume
@@ -254,8 +263,11 @@
 }
 
 reg_t SoundCommandParser::kDoSoundMute(int argc, reg_t *argv, reg_t acc) {
-	if (argc > 0)
+	if (argc > 0) {
+		debugC(2, kDebugLevelSound, "kDoSound(mute): %d", argv[0].toUint16());
 		_music->soundSetSoundOn(argv[0].toUint16());
+	}
+
 	return make_reg(0, _music->soundGetSoundOn());
 }
 
@@ -325,6 +337,8 @@
 reg_t SoundCommandParser::kDoSoundUpdate(int argc, reg_t *argv, reg_t acc) {
 	reg_t obj = argv[0];
 
+	debugC(2, kDebugLevelSound, "kDoSound(update): %04x:%04x", PRINT_REG(argv[0]));
+
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {
 		warning("kDoSound(update): Slot not found (%04x:%04x)", PRINT_REG(obj));
@@ -441,6 +455,7 @@
 	uint16 controller = argv[3].toUint16();
 	uint16 param = argv[4].toUint16();
 
+	debugC(2, kDebugLevelSound, "kDoSound(sendMidi): %04x:%04x, %d, %d, %d, %d", PRINT_REG(obj), channel, midiCmd, controller, param);
 	if (channel)
 		channel--; // channel is given 1-based, we are using 0-based
 
@@ -459,6 +474,7 @@
 }
 
 reg_t SoundCommandParser::kDoSoundReverb(int argc, reg_t *argv, reg_t acc) {
+	debugC(2, kDebugLevelSound, "doSoundReverb: %d", argv[0].toUint16() & 0xF);
 	_music->setReverb(argv[0].toUint16() & 0xF);
 	return acc;
 }
@@ -466,6 +482,8 @@
 reg_t SoundCommandParser::kDoSoundSetHold(int argc, reg_t *argv, reg_t acc) {
 	reg_t obj = argv[0];
 
+	debugC(2, kDebugLevelSound, "doSoundSetHold: %04x:%04x, %d", PRINT_REG(argv[0]), argv[1].toUint16());
+
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {
 		warning("kDoSound(setHold): Slot not found (%04x:%04x)", PRINT_REG(obj));
@@ -535,6 +553,8 @@
 	reg_t obj = argv[0];
 	int16 value = argv[1].toSint16();
 
+	debugC(2, kDebugLevelSound, "kDoSound(setPriority): %04x:%04x, %d", PRINT_REG(obj), value);
+
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {
 		warning("kDoSound(setPriority): Slot not found (%04x:%04x)", PRINT_REG(obj));
@@ -565,6 +585,8 @@
 	reg_t obj = argv[0];
 	int16 value = argv[1].toSint16();
 
+	debugC(2, kDebugLevelSound, "kDoSound(setLoop): %04x:%04x, %d", PRINT_REG(obj), value);
+
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {
 		// Apparently, it's perfectly normal for a game to call cmdSetSoundLoop


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