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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Jan 1 13:48:13 CET 2011


Revision: 55086
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55086&view=rev
Author:   thebluegr
Date:     2011-01-01 12:48:12 +0000 (Sat, 01 Jan 2011)

Log Message:
-----------
SCI: debugC calls no longer require a debug level of 2 to show output

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/gc.cpp
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/engine/kfile.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/klists.cpp
    scummvm/trunk/engines/sci/engine/kmisc.cpp
    scummvm/trunk/engines/sci/engine/kmovement.cpp
    scummvm/trunk/engines/sci/engine/kparse.cpp
    scummvm/trunk/engines/sci/engine/kpathing.cpp
    scummvm/trunk/engines/sci/engine/kscripts.cpp
    scummvm/trunk/engines/sci/engine/ksound.cpp
    scummvm/trunk/engines/sci/engine/kstring.cpp
    scummvm/trunk/engines/sci/engine/script.cpp
    scummvm/trunk/engines/sci/engine/segment.cpp
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/graphics/menu.cpp
    scummvm/trunk/engines/sci/graphics/palette.cpp
    scummvm/trunk/engines/sci/sound/soundcmd.cpp

Modified: scummvm/trunk/engines/sci/engine/gc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/gc.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/gc.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -38,7 +38,7 @@
 		if (!reg.segment) // No numbers
 			return;
 
-		debugC(2, kDebugLevelGC, "[GC] Adding %04x:%04x", PRINT_REG(reg));
+		debugC(kDebugLevelGC, "[GC] Adding %04x:%04x", PRINT_REG(reg));
 
 		if (_map.contains(reg))
 			return; // already dealt with it
@@ -98,7 +98,7 @@
 	for (pos = s->stack_base; pos < xs.sp; pos++)
 		wm.push(*pos);
 
-	debugC(2, kDebugLevelGC, "[GC] -- Finished adding value stack");
+	debugC(kDebugLevelGC, "[GC] -- Finished adding value stack");
 
 	// Init: Execution Stack
 	for (iter = s->_executionStack.begin();
@@ -113,7 +113,7 @@
 		}
 	}
 
-	debugC(2, kDebugLevelGC, "[GC] -- Finished adding execution stack");
+	debugC(kDebugLevelGC, "[GC] -- Finished adding execution stack");
 
 	const Common::Array<SegmentObj *> &heap = segMan->getSegments();
 
@@ -128,7 +128,7 @@
 		}
 	}
 
-	debugC(2, kDebugLevelGC, "[GC] -- Finished explicitly loaded scripts, done with root set");
+	debugC(kDebugLevelGC, "[GC] -- Finished explicitly loaded scripts, done with root set");
 
 	// Run Worklist Algorithm
 	SegmentId stack_seg = segMan->findSegmentByType(SEG_TYPE_STACK);
@@ -136,7 +136,7 @@
 		reg_t reg = wm._worklist.back();
 		wm._worklist.pop_back();
 		if (reg.segment != stack_seg) { // No need to repeat this one
-			debugC(2, kDebugLevelGC, "[GC] Checking %04x:%04x", PRINT_REG(reg));
+			debugC(kDebugLevelGC, "[GC] Checking %04x:%04x", PRINT_REG(reg));
 			if (reg.segment < heap.size() && heap[reg.segment]) {
 				// Valid heap object? Find its outgoing references!
 				wm.pushArray(heap[reg.segment]->listAllOutgoingReferences(reg));
@@ -154,7 +154,7 @@
 	SegManager *segMan = s->_segMan;
 
 	// Some debug stuff
-	debugC(2, kDebugLevelGC, "[GC] Running...");
+	debugC(kDebugLevelGC, "[GC] Running...");
 #ifdef GC_DEBUG_CODE
 	const char *segnames[SEG_TYPE_MAX + 1];
 	int segcount[SEG_TYPE_MAX + 1];
@@ -185,7 +185,7 @@
 				if (!activeRefs->contains(addr)) {
 					// Not found -> we can free it
 					mobj->freeAtAddress(segMan, addr);
-					debugC(2, kDebugLevelGC, "[GC] Deallocating %04x:%04x", PRINT_REG(addr));
+					debugC(kDebugLevelGC, "[GC] Deallocating %04x:%04x", PRINT_REG(addr));
 #ifdef GC_DEBUG_CODE
 					segcount[type]++;
 #endif
@@ -199,10 +199,10 @@
 
 #ifdef GC_DEBUG_CODE
 	// Output debug summary of garbage collection
-	debugC(2, kDebugLevelGC, "[GC] Summary:");
+	debugC(kDebugLevelGC, "[GC] Summary:");
 	for (int i = 0; i <= SEG_TYPE_MAX; i++)
 		if (segcount[i])
-			debugC(2, kDebugLevelGC, "\t%d\t* %s", segcount[i], segnames[i]);
+			debugC(kDebugLevelGC, "\t%d\t* %s", segcount[i], segnames[i]);
 #endif
 }
 

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -102,7 +102,7 @@
 			return pos;
 	}
 
-	debugC(2, kDebugLevelVM, "Could not map '%s' to any selector", selectorName);
+	debugC(kDebugLevelVM, "Could not map '%s' to any selector", selectorName);
 
 	return -1;
 }
@@ -662,7 +662,7 @@
 		}
 	} // for all functions requesting to be mapped
 
-	debugC(2, kDebugLevelVM, "Handled %d/%d kernel functions, mapping %d and ignoring %d.",
+	debugC(kDebugLevelVM, "Handled %d/%d kernel functions, mapping %d and ignoring %d.",
 				mapped + ignored, _kernelNames.size(), mapped, ignored);
 
 	return;

Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -132,17 +132,17 @@
 		}
 
 		if (!inFile)
-			debugC(2, kDebugLevelFile, "  -> file_open(_K_FILE_MODE_OPEN_OR_FAIL): failed to open file '%s'", englishName.c_str());
+			debugC(kDebugLevelFile, "  -> file_open(_K_FILE_MODE_OPEN_OR_FAIL): failed to open file '%s'", englishName.c_str());
 	} else if (mode == _K_FILE_MODE_CREATE) {
 		// Create the file, destroying any content it might have had
 		outFile = saveFileMan->openForSaving(wrappedName);
 		if (!outFile)
-			debugC(2, kDebugLevelFile, "  -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str());
+			debugC(kDebugLevelFile, "  -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str());
 	} else if (mode == _K_FILE_MODE_OPEN_OR_CREATE) {
 		// Try to open file, create it if it doesn't exist
 		outFile = saveFileMan->openForSaving(wrappedName);
 		if (!outFile)
-			debugC(2, kDebugLevelFile, "  -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str());
+			debugC(kDebugLevelFile, "  -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str());
 		// QfG1 opens the character export file with _K_FILE_MODE_CREATE first,
 		// closes it immediately and opens it again with this here. Perhaps
 		// other games use this for read access as well. I guess changing this
@@ -153,7 +153,7 @@
 	}
 
 	if (!inFile && !outFile) { // Failed
-		debugC(2, kDebugLevelFile, "  -> file_open() failed");
+		debugC(kDebugLevelFile, "  -> file_open() failed");
 		return SIGNAL_REG;
 	}
 
@@ -171,7 +171,7 @@
 	s->_fileHandles[handle]._out = outFile;
 	s->_fileHandles[handle]._name = englishName;
 
-	debugC(2, kDebugLevelFile, "  -> opened file '%s' with handle %d", englishName.c_str(), handle);
+	debugC(kDebugLevelFile, "  -> opened file '%s' with handle %d", englishName.c_str(), handle);
 	return make_reg(0, handle);
 }
 
@@ -179,7 +179,7 @@
 	Common::String name = s->_segMan->getString(argv[0]);
 	int mode = argv[1].toUint16();
 
-	debugC(2, kDebugLevelFile, "kFOpen(%s,0x%x)", name.c_str(), mode);
+	debugC(kDebugLevelFile, "kFOpen(%s,0x%x)", name.c_str(), mode);
 	return file_open(s, name.c_str(), mode, true);
 }
 
@@ -198,7 +198,7 @@
 }
 
 reg_t kFClose(EngineState *s, int argc, reg_t *argv) {
-	debugC(2, kDebugLevelFile, "kFClose(%d)", argv[0].toUint16());
+	debugC(kDebugLevelFile, "kFClose(%d)", argv[0].toUint16());
 	if (argv[0] != SIGNAL_REG) {
 		FileHandle *f = getFileFromHandle(s, argv[0].toUint16());
 		if (f)
@@ -241,7 +241,7 @@
 		*dest = 0;
 	}
 
-	debugC(2, kDebugLevelFile, "  -> FGets'ed \"%s\"", dest);
+	debugC(kDebugLevelFile, "  -> FGets'ed \"%s\"", dest);
 	return readBytes;
 }
 
@@ -250,7 +250,7 @@
 	char *buf = new char[maxsize];
 	int handle = argv[2].toUint16();
 
-	debugC(2, kDebugLevelFile, "kFGets(%d, %d)", handle, maxsize);
+	debugC(kDebugLevelFile, "kFGets(%d, %d)", handle, maxsize);
 	int readBytes = fgets_wrapper(s, buf, maxsize, handle);
 	s->_segMan->memcpy(argv[0], (const byte*)buf, maxsize);
 	return readBytes ? argv[0] : NULL_REG;
@@ -265,7 +265,7 @@
 	// TODO/FIXME: Is "/" a good value? Maybe "" or "." or "C:\" are better?
 	s->_segMan->strcpy(argv[0], "/");
 
-	debugC(2, kDebugLevelFile, "kGetCWD() -> %s", "/");
+	debugC(kDebugLevelFile, "kGetCWD() -> %s", "/");
 
 	return argv[0];
 }
@@ -768,16 +768,16 @@
 	// loading, so just stop the game from modifying the file here in order
 	// to avoid having it saved in the ScummVM save directory.
 	if (name == "sq4sg.dir") {
-		debugC(2, kDebugLevelFile, "Not opening unused file sq4sg.dir");
+		debugC(kDebugLevelFile, "Not opening unused file sq4sg.dir");
 		return SIGNAL_REG;
 	}
 
 	if (name.empty()) {
 		// Happens many times during KQ1 (e.g. when typing something)
-		debugC(2, kDebugLevelFile, "Attempted to open a file with an empty filename");
+		debugC(kDebugLevelFile, "Attempted to open a file with an empty filename");
 		return SIGNAL_REG;
 	}
-	debugC(2, kDebugLevelFile, "kFileIO(open): %s, 0x%x", name.c_str(), mode);
+	debugC(kDebugLevelFile, "kFileIO(open): %s, 0x%x", name.c_str(), mode);
 
 	// QFG import rooms get a virtual filelisting instead of an actual one
 	if (g_sci->inQfGImportRoom()) {
@@ -791,7 +791,7 @@
 }
 
 reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) {
-	debugC(2, kDebugLevelFile, "kFileIO(close): %d", argv[0].toUint16());
+	debugC(kDebugLevelFile, "kFileIO(close): %d", argv[0].toUint16());
 
 	FileHandle *f = getFileFromHandle(s, argv[0].toUint16());
 	if (f) {
@@ -806,7 +806,7 @@
 	int size = argv[2].toUint16();
 	int bytesRead = 0;
 	char *buf = new char[size];
-	debugC(2, kDebugLevelFile, "kFileIO(readRaw): %d, %d", handle, size);
+	debugC(kDebugLevelFile, "kFileIO(readRaw): %d, %d", handle, size);
 		
 	FileHandle *f = getFileFromHandle(s, handle);
 	if (f) {
@@ -824,7 +824,7 @@
 	char *buf = new char[size];
 	bool success = false;
 	s->_segMan->memcpy((byte*)buf, argv[1], size);
-	debugC(2, kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size);
+	debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size);
 
 	FileHandle *f = getFileFromHandle(s, handle);
 	if (f) {
@@ -867,7 +867,7 @@
 		result = saveFileMan->removeSavefile(wrappedName);
 	}
 
-	debugC(2, kDebugLevelFile, "kFileIO(unlink): %s", name.c_str());
+	debugC(kDebugLevelFile, "kFileIO(unlink): %s", name.c_str());
 	if (result)
 		return NULL_REG;
 	return make_reg(0, 2); // DOS - file not found error code
@@ -877,7 +877,7 @@
 	int size = argv[1].toUint16();
 	char *buf = new char[size];
 	int handle = argv[2].toUint16();
-	debugC(2, kDebugLevelFile, "kFileIO(readString): %d, %d", handle, size);
+	debugC(kDebugLevelFile, "kFileIO(readString): %d, %d", handle, size);
 
 	int readBytes = fgets_wrapper(s, buf, size, handle);
 	s->_segMan->memcpy(argv[0], (const byte*)buf, size);
@@ -888,7 +888,7 @@
 reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) {
 	int handle = argv[0].toUint16();
 	Common::String str = s->_segMan->getString(argv[1]);
-	debugC(2, kDebugLevelFile, "kFileIO(writeString): %d", handle);
+	debugC(kDebugLevelFile, "kFileIO(writeString): %d", handle);
 
 	FileHandle *f = getFileFromHandle(s, handle);
 
@@ -904,7 +904,7 @@
 	int handle = argv[0].toUint16();
 	int offset = argv[1].toUint16();
 	int whence = argv[2].toUint16();
-	debugC(2, kDebugLevelFile, "kFileIO(seek): %d, %d, %d", handle, offset, whence);
+	debugC(kDebugLevelFile, "kFileIO(seek): %d, %d, %d", handle, offset, whence);
 		
 	FileHandle *f = getFileFromHandle(s, handle);
 
@@ -1016,7 +1016,7 @@
 	Common::String mask = s->_segMan->getString(argv[0]);
 	reg_t buf = argv[1];
 	int attr = argv[2].toUint16(); // We won't use this, Win32 might, though...
-	debugC(2, kDebugLevelFile, "kFileIO(findFirst): %s, 0x%x", mask.c_str(), attr);
+	debugC(kDebugLevelFile, "kFileIO(findFirst): %s, 0x%x", mask.c_str(), attr);
 
 	// We remove ".*". mask will get prefixed, so we will return all additional files for that gameid
 	if (mask == "*.*")
@@ -1025,7 +1025,7 @@
 }
 
 reg_t kFileIOFindNext(EngineState *s, int argc, reg_t *argv) {
-	debugC(2, kDebugLevelFile, "kFileIO(findNext)");
+	debugC(kDebugLevelFile, "kFileIO(findNext)");
 	return s->_dirseeker.nextFile(s->_segMan);
 }
 
@@ -1067,7 +1067,7 @@
 		exists = true;
 	}
 
-	debugC(2, kDebugLevelFile, "kFileIO(fileExists) %s -> %d", name.c_str(), exists);
+	debugC(kDebugLevelFile, "kFileIO(fileExists) %s -> %d", name.c_str(), exists);
 	return make_reg(0, exists);
 }
 

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -344,7 +344,7 @@
 	int font_nr = argv[2].toUint16();
 
 	if (!dest) {
-		debugC(2, kDebugLevelStrings, "GetTextSize: Empty destination");
+		debugC(kDebugLevelStrings, "GetTextSize: Empty destination");
 		return s->r_acc;
 	}
 
@@ -359,7 +359,7 @@
 
 	if (text.empty()) { // Empty text
 		dest[2] = dest[3] = make_reg(0, 0);
-		debugC(2, kDebugLevelStrings, "GetTextSize: Empty string");
+		debugC(kDebugLevelStrings, "GetTextSize: Empty string");
 		return s->r_acc;
 	}
 
@@ -373,7 +373,7 @@
 #endif
 		g_sci->_gfxText16->kernelTextSize(g_sci->strSplit(text.c_str(), sep).c_str(), font_nr, maxwidth, &textWidth, &textHeight);
 	
-	debugC(2, kDebugLevelStrings, "GetTextSize '%s' -> %dx%d", text.c_str(), textWidth, textHeight);
+	debugC(kDebugLevelStrings, "GetTextSize '%s' -> %dx%d", text.c_str(), textWidth, textHeight);
 	dest[2] = make_reg(0, textHeight);
 	dest[3] = make_reg(0, textWidth);
 	return s->r_acc;
@@ -469,7 +469,7 @@
 
 	loopCount = g_sci->_gfxCache->kernelViewGetLoopCount(viewId);
 
-	debugC(2, kDebugLevelGraphics, "NumLoops(view.%d) = %d", viewId, loopCount);
+	debugC(kDebugLevelGraphics, "NumLoops(view.%d) = %d", viewId, loopCount);
 
 	return make_reg(0, loopCount);
 }
@@ -482,7 +482,7 @@
 
 	celCount = g_sci->_gfxCache->kernelViewGetCelCount(viewId, loopNo);
 
-	debugC(2, kDebugLevelGraphics, "NumCels(view.%d, %d) = %d", viewId, loopNo, celCount);
+	debugC(kDebugLevelGraphics, "NumCels(view.%d, %d) = %d", viewId, loopNo, celCount);
 
 	return make_reg(0, celCount);
 }
@@ -801,13 +801,13 @@
 
 	switch (type) {
 	case SCI_CONTROLS_TYPE_BUTTON:
-		debugC(2, kDebugLevelGraphics, "drawing button %04x:%04x to %d,%d", PRINT_REG(controlObject), x, y);
+		debugC(kDebugLevelGraphics, "drawing button %04x:%04x to %d,%d", PRINT_REG(controlObject), x, y);
 		g_sci->_gfxControls->kernelDrawButton(rect, controlObject, g_sci->strSplit(text.c_str(), NULL).c_str(), fontId, style, hilite);
 		return;
 
 	case SCI_CONTROLS_TYPE_TEXT:
 		alignment = readSelectorValue(s->_segMan, controlObject, SELECTOR(mode));
-		debugC(2, kDebugLevelGraphics, "drawing text %04x:%04x ('%s') to %d,%d, mode=%d", PRINT_REG(controlObject), text.c_str(), x, y, alignment);
+		debugC(kDebugLevelGraphics, "drawing text %04x:%04x ('%s') to %d,%d, mode=%d", PRINT_REG(controlObject), text.c_str(), x, y, alignment);
 		g_sci->_gfxControls->kernelDrawText(rect, controlObject, g_sci->strSplit(text.c_str()).c_str(), fontId, alignment, style, hilite);
 		s->r_acc = g_sci->_gfxText16->allocAndFillReferenceRectArray();
 		return;
@@ -821,7 +821,7 @@
 			cursorPos = text.size();
 			writeSelectorValue(s->_segMan, controlObject, SELECTOR(cursor), cursorPos);
 		}
-		debugC(2, kDebugLevelGraphics, "drawing edit control %04x:%04x (text %04x:%04x, '%s') to %d,%d", PRINT_REG(controlObject), PRINT_REG(textReference), text.c_str(), x, y);
+		debugC(kDebugLevelGraphics, "drawing edit control %04x:%04x (text %04x:%04x, '%s') to %d,%d", PRINT_REG(controlObject), PRINT_REG(textReference), text.c_str(), x, y);
 		g_sci->_gfxControls->kernelDrawTextEdit(rect, controlObject, g_sci->strSplit(text.c_str(), NULL).c_str(), fontId, mode, style, cursorPos, maxChars, hilite);
 		return;
 
@@ -838,7 +838,7 @@
 			else
 				priority = -1;
 		}
-		debugC(2, kDebugLevelGraphics, "drawing icon control %04x:%04x to %d,%d", PRINT_REG(controlObject), x, y - 1);
+		debugC(kDebugLevelGraphics, "drawing icon control %04x:%04x to %d,%d", PRINT_REG(controlObject), x, y - 1);
 		g_sci->_gfxControls->kernelDrawIcon(rect, controlObject, viewId, loopNo, celNo, priority, style, hilite);
 		return;
 
@@ -886,7 +886,7 @@
 			}
 		}
 
-		debugC(2, kDebugLevelGraphics, "drawing list control %04x:%04x to %d,%d, diff %d", PRINT_REG(controlObject), x, y, SCI_MAX_SAVENAME_LENGTH);
+		debugC(kDebugLevelGraphics, "drawing list control %04x:%04x to %d,%d, diff %d", PRINT_REG(controlObject), x, y, SCI_MAX_SAVENAME_LENGTH);
 		g_sci->_gfxControls->kernelDrawList(rect, controlObject, maxChars, listCount, listEntries, fontId, style, upperPos, cursorPos, isAlias, hilite);
 		free(listEntries);
 		delete[] listStrings;

Modified: scummvm/trunk/engines/sci/engine/klists.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/klists.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/klists.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -131,7 +131,7 @@
 	reg_t listRef;
 	List *list = s->_segMan->allocateList(&listRef);
 	list->first = list->last = NULL_REG;
-	debugC(2, kDebugLevelNodes, "New listRef at %04x:%04x", PRINT_REG(listRef));
+	debugC(kDebugLevelNodes, "New listRef at %04x:%04x", PRINT_REG(listRef));
 
 	return listRef; // Return list base address
 }
@@ -150,7 +150,7 @@
 	reg_t nodeKey = (argc == 2) ? argv[1] : argv[0];
 	s->r_acc = s->_segMan->newNode(nodeValue, nodeKey);
 
-	debugC(2, kDebugLevelNodes, "New nodeRef at %04x:%04x", PRINT_REG(s->r_acc));
+	debugC(kDebugLevelNodes, "New nodeRef at %04x:%04x", PRINT_REG(s->r_acc));
 
 	return s->r_acc;
 }
@@ -202,7 +202,7 @@
 	List *list = s->_segMan->lookupList(listRef);
 	Node *newNode = s->_segMan->lookupNode(nodeRef);
 
-	debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x", PRINT_REG(nodeRef), PRINT_REG(listRef));
+	debugC(kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x", PRINT_REG(nodeRef), PRINT_REG(listRef));
 
 	if (!newNode)
 		error("Attempt to add non-node (%04x:%04x) to list at %04x:%04x", PRINT_REG(nodeRef), PRINT_REG(listRef));
@@ -228,7 +228,7 @@
 	List *list = s->_segMan->lookupList(listRef);
 	Node *newNode = s->_segMan->lookupNode(nodeRef);
 
-	debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x", PRINT_REG(nodeRef), PRINT_REG(listRef));
+	debugC(kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x", PRINT_REG(nodeRef), PRINT_REG(listRef));
 
 	if (!newNode)
 		error("Attempt to add non-node (%04x:%04x) to list at %04x:%04x", PRINT_REG(nodeRef), PRINT_REG(listRef));
@@ -350,7 +350,7 @@
 	reg_t key = argv[1];
 	reg_t list_pos = argv[0];
 
-	debugC(2, kDebugLevelNodes, "Looking for key %04x:%04x in list %04x:%04x", PRINT_REG(key), PRINT_REG(list_pos));
+	debugC(kDebugLevelNodes, "Looking for key %04x:%04x in list %04x:%04x", PRINT_REG(key), PRINT_REG(list_pos));
 
 #ifdef CHECK_LISTS
 	checkListPointer(s->_segMan, argv[0]);
@@ -358,20 +358,20 @@
 
 	node_pos = s->_segMan->lookupList(list_pos)->first;
 
-	debugC(2, kDebugLevelNodes, "First node at %04x:%04x", PRINT_REG(node_pos));
+	debugC(kDebugLevelNodes, "First node at %04x:%04x", PRINT_REG(node_pos));
 
 	while (!node_pos.isNull()) {
 		Node *n = s->_segMan->lookupNode(node_pos);
 		if (n->key == key) {
-			debugC(2, kDebugLevelNodes, " Found key at %04x:%04x", PRINT_REG(node_pos));
+			debugC(kDebugLevelNodes, " Found key at %04x:%04x", PRINT_REG(node_pos));
 			return node_pos;
 		}
 
 		node_pos = n->succ;
-		debugC(2, kDebugLevelNodes, "NextNode at %04x:%04x", PRINT_REG(node_pos));
+		debugC(kDebugLevelNodes, "NextNode at %04x:%04x", PRINT_REG(node_pos));
 	}
 
-	debugC(2, kDebugLevelNodes, "Looking for key without success");
+	debugC(kDebugLevelNodes, "Looking for key without success");
 	return NULL_REG;
 }
 

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -170,7 +170,7 @@
 
 reg_t kFlushResources(EngineState *s, int argc, reg_t *argv) {
 	run_gc(s);
-	debugC(2, kDebugLevelRoom, "Entering room number %d", argv[0].toUint16());
+	debugC(kDebugLevelRoom, "Entering room number %d", argv[0].toUint16());
 	return s->r_acc;
 }
 
@@ -206,19 +206,19 @@
 	switch (mode) {
 	case KGETTIME_TICKS :
 		retval = elapsedTime * 60 / 1000;
-		debugC(2, kDebugLevelTime, "GetTime(elapsed) returns %d", retval);
+		debugC(kDebugLevelTime, "GetTime(elapsed) returns %d", retval);
 		break;
 	case KGETTIME_TIME_12HOUR :
 		retval = ((loc_time.tm_hour % 12) << 12) | (loc_time.tm_min << 6) | (loc_time.tm_sec);
-		debugC(2, kDebugLevelTime, "GetTime(12h) returns %d", retval);
+		debugC(kDebugLevelTime, "GetTime(12h) returns %d", retval);
 		break;
 	case KGETTIME_TIME_24HOUR :
 		retval = (loc_time.tm_hour << 11) | (loc_time.tm_min << 5) | (loc_time.tm_sec >> 1);
-		debugC(2, kDebugLevelTime, "GetTime(24h) returns %d", retval);
+		debugC(kDebugLevelTime, "GetTime(24h) returns %d", retval);
 		break;
 	case KGETTIME_DATE :
 		retval = loc_time.tm_mday | ((loc_time.tm_mon + 1) << 5) | (((loc_time.tm_year + 1900) & 0x7f) << 9);
-		debugC(2, kDebugLevelTime, "GetTime(date) returns %d", retval);
+		debugC(kDebugLevelTime, "GetTime(date) returns %d", retval);
 		break;
 	default:
 		error("Attempt to use unknown GetTime mode %d", mode);

Modified: scummvm/trunk/engines/sci/engine/kmovement.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmovement.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/kmovement.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -125,7 +125,7 @@
 	// POST: (dx != 0)  ==>  ABS(tmp) > ABS(dx)
 	// POST: (dx != 0)  ==>  ABS(tmp) ~>=~ ABS(dy)
 
-	debugC(2, kDebugLevelBresen, "c: %d, tmp: %d", c, tmp);
+	debugC(kDebugLevelBresen, "c: %d, tmp: %d", c, tmp);
 
 	// Compute x step
 	if (tmp != 0)
@@ -157,8 +157,8 @@
 	// Always force vy to be upwards
 	vy = -ABS(vy);
 
-	debugC(2, kDebugLevelBresen, "SetJump for object at %04x:%04x", PRINT_REG(object));
-	debugC(2, kDebugLevelBresen, "xStep: %d, yStep: %d", vx, vy);
+	debugC(kDebugLevelBresen, "SetJump for object at %04x:%04x", PRINT_REG(object));
+	debugC(kDebugLevelBresen, "xStep: %d, yStep: %d", vx, vy);
 
 	writeSelectorValue(segMan, object, SELECTOR(xStep), vx);
 	writeSelectorValue(segMan, object, SELECTOR(yStep), vy);
@@ -537,7 +537,7 @@
 	destx = readSelectorValue(segMan, mover, SELECTOR(x));
 	desty = readSelectorValue(segMan, mover, SELECTOR(y));
 
-	debugC(2, kDebugLevelBresen, "Doing avoider %04x:%04x (dest=%d,%d)", PRINT_REG(avoider), destx, desty);
+	debugC(kDebugLevelBresen, "Doing avoider %04x:%04x (dest=%d,%d)", PRINT_REG(avoider), destx, desty);
 
 	invokeSelector(s, mover, SELECTOR(doit), argc, argv);
 
@@ -551,7 +551,7 @@
 	dy = desty - readSelectorValue(segMan, client, SELECTOR(y));
 	angle = getAngle(dx, dy);
 
-	debugC(2, kDebugLevelBresen, "Movement (%d,%d), angle %d is %sblocked", dx, dy, angle, (s->r_acc.offset) ? " " : "not ");
+	debugC(kDebugLevelBresen, "Movement (%d,%d), angle %d is %sblocked", dx, dy, angle, (s->r_acc.offset) ? " " : "not ");
 
 	if (s->r_acc.offset) { // isBlocked() returned non-zero
 		int rotation = (g_sci->getRNG().getRandomBit() == 1) ? 45 : (360 - 45); // Clockwise/counterclockwise
@@ -561,7 +561,7 @@
 		int ystep = readSelectorValue(segMan, client, SELECTOR(yStep));
 		int moves;
 
-		debugC(2, kDebugLevelBresen, " avoider %04x:%04x", PRINT_REG(avoider));
+		debugC(kDebugLevelBresen, " avoider %04x:%04x", PRINT_REG(avoider));
 
 		for (moves = 0; moves < 8; moves++) {
 			int move_x = (int)(sin(angle * PI / 180.0) * (xstep));
@@ -570,7 +570,7 @@
 			writeSelectorValue(segMan, client, SELECTOR(x), oldx + move_x);
 			writeSelectorValue(segMan, client, SELECTOR(y), oldy + move_y);
 
-			debugC(2, kDebugLevelBresen, "Pos (%d,%d): Trying angle %d; delta=(%d,%d)", oldx, oldy, angle, move_x, move_y);
+			debugC(kDebugLevelBresen, "Pos (%d,%d): Trying angle %d; delta=(%d,%d)", oldx, oldy, angle, move_x, move_y);
 
 			invokeSelector(s, client, SELECTOR(canBeHere), argc, argv);
 
@@ -578,7 +578,7 @@
 			writeSelectorValue(segMan, client, SELECTOR(y), oldy);
 
 			if (s->r_acc.offset) { // We can be here
-				debugC(2, kDebugLevelBresen, "Success");
+				debugC(kDebugLevelBresen, "Success");
 				writeSelectorValue(segMan, client, SELECTOR(heading), angle);
 
 				return make_reg(0, angle);

Modified: scummvm/trunk/engines/sci/engine/kparse.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kparse.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/kparse.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -109,7 +109,7 @@
 		s->r_acc = make_reg(0, 1);
 
 #ifdef DEBUG_PARSER
-		debugC(2, kDebugLevelParser, "Parsed to the following blocks:");
+		debugC(kDebugLevelParser, "Parsed to the following blocks:");
 
 		for (ResultWordListList::const_iterator i = words.begin(); i != words.end(); ++i) {
 			debugCN(2, kDebugLevelParser, "   ");
@@ -129,7 +129,7 @@
 			invokeSelector(s, g_sci->getGameObject(), SELECTOR(syntaxFail), argc, argv, 2, params);
 			/* Issue warning */
 
-			debugC(2, kDebugLevelParser, "Tree building failed");
+			debugC(kDebugLevelParser, "Tree building failed");
 
 		} else {
 			voc->parserIsValid = true;
@@ -147,7 +147,7 @@
 
 		if (error) {
 			s->_segMan->strcpy(s->_segMan->getParserPtr(), error);
-			debugC(2, kDebugLevelParser, "Word unknown: %s", error);
+			debugC(kDebugLevelParser, "Word unknown: %s", error);
 			/* Issue warning: */
 
 			invokeSelector(s, g_sci->getGameObject(), SELECTOR(wordFail), argc, argv, 2, params);
@@ -191,7 +191,7 @@
 			const byte *synonyms = s->_segMan->getScript(seg)->getSynonyms();
 
 			if (synonyms) {
-				debugC(2, kDebugLevelParser, "Setting %d synonyms for script.%d",
+				debugC(kDebugLevelParser, "Setting %d synonyms for script.%d",
 				          numSynonyms, script);
 
 				if (numSynonyms > 16384) {
@@ -214,7 +214,7 @@
 		node = s->_segMan->lookupNode(node->succ);
 	}
 
-	debugC(2, kDebugLevelParser, "A total of %d synonyms are active now.", numSynonyms);
+	debugC(kDebugLevelParser, "A total of %d synonyms are active now.", numSynonyms);
 
 	return s->r_acc;
 }

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -953,7 +953,7 @@
 				}
 
 				if ((type == POLY_BARRED_ACCESS) || (type == POLY_CONTAINED_ACCESS))
-					debugC(2, kDebugLevelAvoidPath, "AvoidPath: start position at unreachable location");
+					debugC(kDebugLevelAvoidPath, "AvoidPath: start position at unreachable location");
 
 				// The original start position is in an invalid location, so we
 				// use the moved point and add the original one to the final path
@@ -1357,7 +1357,7 @@
 	}
 
 	if (openSet.empty())
-		debugC(2, kDebugLevelAvoidPath, "AvoidPath: End point (%i, %i) is unreachable", s->vertex_end->v.x, s->vertex_end->v.y);
+		debugC(kDebugLevelAvoidPath, "AvoidPath: End point (%i, %i) is unreachable", s->vertex_end->v.x, s->vertex_end->v.y);
 }
 
 static reg_t allocateOutputArray(SegManager *segMan, int size) {

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -108,7 +108,7 @@
 					// Happens in CD games (e.g. LSL6CD) with the message
 					// resource. It isn't fatal, and it's usually caused
 					// by leftover scripts.
-					debugC(2, kDebugLevelResMan, "[resMan] Attempt to unlock non-existant resource %s", id.toString().c_str());
+					debugC(kDebugLevelResMan, "[resMan] Attempt to unlock non-existant resource %s", id.toString().c_str());
 			}
 		}
 		break;
@@ -153,7 +153,7 @@
 		return NULL_REG;
 	}
 
-	debugC(2, kDebugLevelMemory, "Attempting to clone from %04x:%04x", PRINT_REG(parentAddr));
+	debugC(kDebugLevelMemory, "Attempting to clone from %04x:%04x", PRINT_REG(parentAddr));
 
 	uint16 infoSelector = parentObj->getInfoSelector().offset;
 	cloneObj = s->_segMan->allocateClone(&cloneAddr);

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -149,7 +149,7 @@
 			return NULL_REG;
 		}
 
-		debugC(2, kDebugLevelSound, "kDoAudio: play sample %d, module %d", number, module);
+		debugC(kDebugLevelSound, "kDoAudio: play sample %d, module %d", number, module);
 
 		// return sample length in ticks
 		if (argv[0].toUint16() == kSciAudioWPlay)
@@ -158,28 +158,28 @@
 			return make_reg(0, g_sci->_audio->startAudio(module, number));
 	}
 	case kSciAudioStop:
-		debugC(2, kDebugLevelSound, "kDoAudio: stop");
+		debugC(kDebugLevelSound, "kDoAudio: stop");
 		g_sci->_audio->stopAudio();
 		break;
 	case kSciAudioPause:
-		debugC(2, kDebugLevelSound, "kDoAudio: pause");
+		debugC(kDebugLevelSound, "kDoAudio: pause");
 		g_sci->_audio->pauseAudio();
 		break;
 	case kSciAudioResume:
-		debugC(2, kDebugLevelSound, "kDoAudio: resume");
+		debugC(kDebugLevelSound, "kDoAudio: resume");
 		g_sci->_audio->resumeAudio();
 		break;
 	case kSciAudioPosition:
-		//debugC(2, kDebugLevelSound, "kDoAudio: get position");	// too verbose
+		//debugC(kDebugLevelSound, "kDoAudio: get position");	// too verbose
 		return make_reg(0, g_sci->_audio->getAudioPosition());
 	case kSciAudioRate:
-		debugC(2, kDebugLevelSound, "kDoAudio: set audio rate to %d", argv[1].toUint16());
+		debugC(kDebugLevelSound, "kDoAudio: set audio rate to %d", argv[1].toUint16());
 		g_sci->_audio->setAudioRate(argv[1].toUint16());
 		break;
 	case kSciAudioVolume: {
 		int16 volume = argv[1].toUint16();
 		volume = CLIP<int16>(volume, 0, AUDIO_VOLUME_MAX);
-		debugC(2, kDebugLevelSound, "kDoAudio: set volume to %d", volume);
+		debugC(kDebugLevelSound, "kDoAudio: set volume to %d", volume);
 #ifdef ENABLE_SCI32
 		if (getSciVersion() >= SCI_VERSION_2_1) {
 			int16 volumePrev = mixer->getVolumeForSoundType(Audio::Mixer::kSpeechSoundType) / 2;
@@ -193,11 +193,11 @@
 	case kSciAudioLanguage:
 		// In SCI1.1: tests for digital audio support
 		if (getSciVersion() == SCI_VERSION_1_1) {
-			debugC(2, kDebugLevelSound, "kDoAudio: audio capability test");
+			debugC(kDebugLevelSound, "kDoAudio: audio capability test");
 			return make_reg(0, 1);
 		} else {
 			int16 language = argv[1].toSint16();
-			debugC(2, kDebugLevelSound, "kDoAudio: set language to %d", language);
+			debugC(kDebugLevelSound, "kDoAudio: set language to %d", language);
 
 			if (language != -1)
 				g_sci->getResMan()->setAudioLanguage(language);
@@ -211,7 +211,7 @@
 	case kSciAudioCD:
 
 		if (getSciVersion() <= SCI_VERSION_1_1) {
-			debugC(2, kDebugLevelSound, "kDoAudio: CD audio subop");
+			debugC(kDebugLevelSound, "kDoAudio: CD audio subop");
 			return kDoCdAudio(s, argc - 1, argv + 1);
 #ifdef ENABLE_SCI32
 		} else {

Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -215,7 +215,7 @@
 	Common::String source_str = g_sci->getKernel()->lookupText(position, index);
 	const char* source = source_str.c_str();
 
-	debugC(2, kDebugLevelStrings, "Formatting \"%s\"", source);
+	debugC(kDebugLevelStrings, "Formatting \"%s\"", source);
 
 
 	arguments = (uint16 *)malloc(sizeof(uint16) * argc);
@@ -813,7 +813,7 @@
 	char debugString[500];
 
 	sprintf(debugString, debugTemplate.c_str(), argv[1].toUint16());
-	debugC(2, "kPrintDebug: \"%s\"\n", debugString);
+	debugC(kDebugLevelScripts, "kPrintDebug: \"%s\"\n", debugString);
 
 	return s->r_acc;
 }

Modified: scummvm/trunk/engines/sci/engine/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/script.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -673,9 +673,9 @@
 
 void Script::freeAtAddress(SegManager *segMan, reg_t addr) {
 	/*
-		debugC(2, kDebugLevelGC, "[GC] Freeing script %04x:%04x", PRINT_REG(addr));
+		debugC(kDebugLevelGC, "[GC] Freeing script %04x:%04x", PRINT_REG(addr));
 		if (_localsSegment)
-			debugC(2, kDebugLevelGC, "[GC] Freeing locals %04x:0000", _localsSegment);
+			debugC(kDebugLevelGC, "[GC] Freeing locals %04x:0000", _localsSegment);
 	*/
 
 	if (_markedAsDeleted)

Modified: scummvm/trunk/engines/sci/engine/segment.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/segment.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -213,7 +213,7 @@
 
 	// Note that this also includes the 'base' object, which is part of the script and therefore also emits the locals.
 	tmp.push_back(clone->getPos());
-	//debugC(2, kDebugLevelGC, "[GC] Reporting clone-pos %04x:%04x", PRINT_REG(clone->pos));
+	//debugC(kDebugLevelGC, "[GC] Reporting clone-pos %04x:%04x", PRINT_REG(clone->pos));
 
 	return tmp;
 }

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -114,7 +114,7 @@
 	if (index < 0 || (uint)index >= obj->getVarCount()) {
 		// This is same way sierra does it and there are some games, that contain such scripts like
 		//  iceman script 998 (fred::canBeHere, executed right at the start)
-		debugC(2, kDebugLevelVM, "[VM] Invalid property #%d (out of [0..%d]) requested!",
+		debugC(kDebugLevelVM, "[VM] Invalid property #%d (out of [0..%d]) requested!",
 			index, obj->getVarCount());
 		return dummyReg;
 	}
@@ -165,8 +165,8 @@
 				error("%s. [VM] Access would be outside even of the stack (%d); access denied", txt.c_str(), total_offset);
 				return false;
 			} else {
-				debugC(2, kDebugLevelVM, "%s", txt.c_str());
-				debugC(2, kDebugLevelVM, "[VM] Access within stack boundaries; access granted.");
+				debugC(kDebugLevelVM, "%s", txt.c_str());
+				debugC(kDebugLevelVM, "[VM] Access within stack boundaries; access granted.");
 				return true;
 			}
 		}
@@ -235,7 +235,7 @@
 			case VAR_PARAM:
 				// Out-of-bounds read for a parameter that goes onto stack and hits an uninitialized temp
 				//  We return 0 currently in that case
-				debugC(2, kDebugLevelVM, "[VM] Read for a parameter goes out-of-bounds, onto the stack and gets uninitialized temp");
+				debugC(kDebugLevelVM, "[VM] Read for a parameter goes out-of-bounds, onto the stack and gets uninitialized temp");
 				return NULL_REG;
 			default:
 				break;

Modified: scummvm/trunk/engines/sci/graphics/menu.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/graphics/menu.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -276,7 +276,7 @@
 		// PQ2 demo calls this, for example, but has no menus (bug report #3034507). Some SCI
 		// fan games (Al Pond 2, Aquarius) call this too on non-existent menu items. The
 		// original interpreter ignored these as well.
-		debugC(2, kDebugLevelGraphics, "Tried to setAttribute() on non-existent menu-item %d:%d", menuId, itemId);
+		debugC(kDebugLevelGraphics, "Tried to setAttribute() on non-existent menu-item %d:%d", menuId, itemId);
 		return;
 	}
 

Modified: scummvm/trunk/engines/sci/graphics/palette.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/palette.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/graphics/palette.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -108,7 +108,7 @@
 	if (bytesLeft < 37) {
 		// This happens when loading palette of picture 0 in sq5 - the resource is broken and doesn't contain a full
 		//  palette
-		debugC(2, "GfxPalette::createFromData() - not enough bytes in resource (%d), expected palette header", bytesLeft);
+		debugC(kDebugLevelResMan, "GfxPalette::createFromData() - not enough bytes in resource (%d), expected palette header", bytesLeft);
 		return;
 	}
 	// palette formats in here are not really version exclusive, we can not use sci-version to differentiate between them

Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp	2011-01-01 12:43:09 UTC (rev 55085)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp	2011-01-01 12:48:12 UTC (rev 55086)
@@ -47,7 +47,7 @@
 }
 
 reg_t SoundCommandParser::kDoSoundInit(int argc, reg_t *argv, reg_t acc) {
-	debugC(2, kDebugLevelSound, "kDoSound(init): %04x:%04x", PRINT_REG(argv[0]));
+	debugC(kDebugLevelSound, "kDoSound(init): %04x:%04x", PRINT_REG(argv[0]));
 	processInitSound(argv[0]);
 	return acc;
 }
@@ -77,7 +77,7 @@
 		newSound->volume = CLIP<int>(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, MUSIC_VOLUME_MAX);
 	newSound->reverb = -1;	// initialize to SCI invalid, it'll be set correctly in soundInitSnd() below
 
-	debugC(2, kDebugLevelSound, "kDoSound(init): %04x:%04x number %d, loop %d, prio %d, vol %d", PRINT_REG(obj),
+	debugC(kDebugLevelSound, "kDoSound(init): %04x:%04x number %d, loop %d, prio %d, vol %d", PRINT_REG(obj),
 			resourceId,	newSound->loop, newSound->priority, newSound->volume);
 
 	// In SCI1.1 games, sound effects are started from here. If we can find
@@ -114,7 +114,7 @@
 }
 
 reg_t SoundCommandParser::kDoSoundPlay(int argc, reg_t *argv, reg_t acc) {
-	debugC(2, kDebugLevelSound, "kDoSound(play): %04x:%04x", PRINT_REG(argv[0]));
+	debugC(kDebugLevelSound, "kDoSound(play): %04x:%04x", PRINT_REG(argv[0]));
 	processPlaySound(argv[0]);
 	return acc;
 }
@@ -155,7 +155,7 @@
 	if (_soundVersion >= SCI_VERSION_1_EARLY)
 		musicSlot->volume = readSelectorValue(_segMan, obj, SELECTOR(vol));
 
-	debugC(2, kDebugLevelSound, "kDoSound(play): %04x:%04x number %d, loop %d, prio %d, vol %d", PRINT_REG(obj),
+	debugC(kDebugLevelSound, "kDoSound(play): %04x:%04x number %d, loop %d, prio %d, vol %d", PRINT_REG(obj),
 			resourceId, musicSlot->loop, musicSlot->priority, musicSlot->volume);
 
 	_music->soundPlay(musicSlot);
@@ -173,7 +173,7 @@
 }
 
 reg_t SoundCommandParser::kDoSoundDispose(int argc, reg_t *argv, reg_t acc) {
-	debugC(2, kDebugLevelSound, "kDoSound(dispose): %04x:%04x", PRINT_REG(argv[0]));
+	debugC(kDebugLevelSound, "kDoSound(dispose): %04x:%04x", PRINT_REG(argv[0]));
 	processDisposeSound(argv[0]);
 	return acc;
 }
@@ -196,7 +196,7 @@
 }
 
 reg_t SoundCommandParser::kDoSoundStop(int argc, reg_t *argv, reg_t acc) {
-	debugC(2, kDebugLevelSound, "kDoSound(stop): %04x:%04x", PRINT_REG(argv[0]));
+	debugC(kDebugLevelSound, "kDoSound(stop): %04x:%04x", PRINT_REG(argv[0]));
 	processStopSound(argv[0], false);
 	return acc;
 }
@@ -231,9 +231,9 @@
 
 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]));
+		debugC(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]));
+		debugC(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
@@ -267,7 +267,7 @@
 		MusicEntry *musicSlot = _music->getSlot(obj);
 		if (!musicSlot) {
 			// This happens quite frequently
-			debugC(2, kDebugLevelSound, "kDoSound(pause): Slot not found (%04x:%04x)", PRINT_REG(obj));
+			debugC(kDebugLevelSound, "kDoSound(pause): Slot not found (%04x:%04x)", PRINT_REG(obj));
 			return acc;
 		}
 
@@ -286,7 +286,7 @@
 reg_t SoundCommandParser::kDoSoundMute(int argc, reg_t *argv, reg_t acc) {
 	uint16 previousState = _music->soundGetSoundOn();
 	if (argc > 0) {
-		debugC(2, kDebugLevelSound, "kDoSound(mute): %d", argv[0].toUint16());
+		debugC(kDebugLevelSound, "kDoSound(mute): %d", argv[0].toUint16());
 		_music->soundSetSoundOn(argv[0].toUint16());
 	}
 
@@ -297,7 +297,7 @@
 	acc = make_reg(0, _music->soundGetMasterVolume());
 
 	if (argc > 0) {
-		debugC(2, kDebugLevelSound, "kDoSound(masterVolume): %d", argv[0].toSint16());
+		debugC(kDebugLevelSound, "kDoSound(masterVolume): %d", argv[0].toSint16());
 		int vol = CLIP<int16>(argv[0].toSint16(), 0, MUSIC_MASTERVOLUME_MAX);
 		vol = vol * Audio::Mixer::kMaxMixerVolume / MUSIC_MASTERVOLUME_MAX;
 		ConfMan.setInt("music_volume", vol);
@@ -312,7 +312,7 @@
 
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {
-		debugC(2, kDebugLevelSound, "kDoSound(fade): Slot not found (%04x:%04x)", PRINT_REG(obj));
+		debugC(kDebugLevelSound, "kDoSound(fade): Slot not found (%04x:%04x)", PRINT_REG(obj));
 		return acc;
 	}
 
@@ -320,7 +320,7 @@
 
 	// If sound is not playing currently, set signal directly
 	if (musicSlot->status != kSoundPlaying) {
-		debugC(2, kDebugLevelSound, "kDoSound(fade): %04x:%04x fading requested, but sound is currently not playing", PRINT_REG(obj));
+		debugC(kDebugLevelSound, "kDoSound(fade): %04x:%04x fading requested, but sound is currently not playing", PRINT_REG(obj));
 		writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
 		return acc;
 	}
@@ -352,7 +352,7 @@
 		error("kDoSound(fade): unsupported argc %d", argc);
 	}
 
-	debugC(2, kDebugLevelSound, "kDoSound(fade): %04x:%04x to %d, step %d, ticker %d", PRINT_REG(obj), musicSlot->fadeTo, musicSlot->fadeStep, musicSlot->fadeTickerStep);
+	debugC(kDebugLevelSound, "kDoSound(fade): %04x:%04x to %d, step %d, ticker %d", PRINT_REG(obj), musicSlot->fadeTo, musicSlot->fadeStep, musicSlot->fadeTickerStep);
 	return acc;
 }
 
@@ -363,7 +363,7 @@
 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]));
+	debugC(kDebugLevelSound, "kDoSound(update): %04x:%04x", PRINT_REG(argv[0]));
 
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {
@@ -481,7 +481,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);
+	debugC(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
 
@@ -504,7 +504,7 @@
 	byte reverb = argv[0].toUint16() & 0xF;
 
 	if (argc == 1) {
-		debugC(2, kDebugLevelSound, "doSoundGlobalReverb: %d", argv[0].toUint16() & 0xF);
+		debugC(kDebugLevelSound, "doSoundGlobalReverb: %d", argv[0].toUint16() & 0xF);
 		if (reverb <= 10)
 			_music->setGlobalReverb(reverb);
 	}
@@ -515,7 +515,7 @@
 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());
+	debugC(kDebugLevelSound, "doSoundSetHold: %04x:%04x, %d", PRINT_REG(argv[0]), argv[1].toUint16());
 
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {
@@ -570,7 +570,7 @@
 		return acc;
 	}
 
-	debugC(2, kDebugLevelSound, "kDoSound(setVolume): %d", value);
+	debugC(kDebugLevelSound, "kDoSound(setVolume): %d", value);
 
 	value = CLIP<int>(value, 0, MUSIC_VOLUME_MAX);
 
@@ -586,11 +586,11 @@
 	reg_t obj = argv[0];
 	int16 value = argv[1].toSint16();
 
-	debugC(2, kDebugLevelSound, "kDoSound(setPriority): %04x:%04x, %d", PRINT_REG(obj), value);
+	debugC(kDebugLevelSound, "kDoSound(setPriority): %04x:%04x, %d", PRINT_REG(obj), value);
 
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {
-		debugC(2, kDebugLevelSound, "kDoSound(setPriority): Slot not found (%04x:%04x)", PRINT_REG(obj));
+		debugC(kDebugLevelSound, "kDoSound(setPriority): Slot not found (%04x:%04x)", PRINT_REG(obj));
 		return acc;
 	}
 
@@ -623,7 +623,7 @@
 	reg_t obj = argv[0];
 	int16 value = argv[1].toSint16();
 
-	debugC(2, kDebugLevelSound, "kDoSound(setLoop): %04x:%04x, %d", PRINT_REG(obj), value);
+	debugC(kDebugLevelSound, "kDoSound(setLoop): %04x:%04x, %d", PRINT_REG(obj), value);
 
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {


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