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

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Sat Jan 30 12:59:05 CET 2010


Revision: 47707
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47707&view=rev
Author:   wjpalenstijn
Date:     2010-01-30 11:59:05 +0000 (Sat, 30 Jan 2010)

Log Message:
-----------
SCI: Remove extra '\n's in debugC messages

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/kmovement.cpp
    scummvm/trunk/engines/sci/engine/kparse.cpp
    scummvm/trunk/engines/sci/engine/kscripts.cpp
    scummvm/trunk/engines/sci/engine/kstring.cpp
    scummvm/trunk/engines/sci/engine/segment.cpp
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/sound/iterator/core.cpp
    scummvm/trunk/engines/sci/sound/iterator/iterator.cpp
    scummvm/trunk/engines/sci/sound/soundcmd.cpp

Modified: scummvm/trunk/engines/sci/engine/gc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/gc.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/gc.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -38,7 +38,7 @@
 		if (!reg.segment) // No numbers
 			return;
 
-		debugC(2, kDebugLevelGC, "[GC] Adding %04x:%04x\n", PRINT_REG(reg));
+		debugC(2, kDebugLevelGC, "[GC] Adding %04x:%04x", PRINT_REG(reg));
 
 		if (_map.contains(reg))
 			return; // already dealt with it
@@ -127,14 +127,14 @@
 			}
 		}
 
-	debugC(2, kDebugLevelGC, "[GC] -- Finished explicitly loaded scripts, done with root set\n");
+	debugC(2, kDebugLevelGC, "[GC] -- Finished explicitly loaded scripts, done with root set");
 
 	// Run Worklist Algorithm
 	while (!wm._worklist.empty()) {
 		reg_t reg = wm._worklist.back();
 		wm._worklist.pop_back();
 		if (reg.segment != s->stack_segment) { // No need to repeat this one
-			debugC(2, kDebugLevelGC, "[GC] Checking %04x:%04x\n", PRINT_REG(reg));
+			debugC(2, kDebugLevelGC, "[GC] Checking %04x:%04x", PRINT_REG(reg));
 			if (reg.segment < segMan->_heap.size() && segMan->_heap[reg.segment])
 				segMan->_heap[reg.segment]->listAllOutgoingReferences(reg, &wm, add_outgoing_refs);
 		}
@@ -164,7 +164,7 @@
 		// Not found -> we can free it
 		deallocator->mobj->freeAtAddress(deallocator->segMan, addr);
 #ifdef DEBUG_GC
-		debugC(2, kDebugLevelGC, "[GC] Deallocating %04x:%04x\n", PRINT_REG(addr));
+		debugC(2, kDebugLevelGC, "[GC] Deallocating %04x:%04x", PRINT_REG(addr));
 		deallocator->segcount[deallocator->mobj->getType()]++;
 #endif
 	}
@@ -177,7 +177,7 @@
 	SegManager *segMan = s->_segMan;
 
 #ifdef DEBUG_GC
-	debugC(2, kDebugLevelGC, "[GC] Running...\n");
+	debugC(2, kDebugLevelGC, "[GC] Running...");
 	memset(&(deallocator.segcount), 0, sizeof(int) * (SEG_TYPE_MAX + 1));
 #endif
 
@@ -199,10 +199,10 @@
 #ifdef DEBUG_GC
 	{
 		int i;
-		debugC(2, kDebugLevelGC, "[GC] Summary:\n");
+		debugC(2, kDebugLevelGC, "[GC] Summary:");
 		for (i = 0; i <= SEG_TYPE_MAX; i++)
 			if (deallocator.segcount[i])
-				debugC(2, kDebugLevelGC, "\t%d\t* %s\n", deallocator.segcount[i], deallocator.segnames[i]);
+				debugC(2, kDebugLevelGC, "\t%d\t* %s", deallocator.segcount[i], deallocator.segnames[i]);
 	}
 #endif
 }

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -423,7 +423,7 @@
 			return pos;
 	}
 
-	debugC(2, kDebugLevelVM, "Could not map '%s' to any selector\n", selectorName);
+	debugC(2, kDebugLevelVM, "Could not map '%s' to any selector", selectorName);
 
 	return -1;
 }
@@ -473,7 +473,7 @@
 	reg_t reg;
 
 	segMan->allocateHunkEntry(type, space, &reg);
-	debugC(2, kDebugLevelMemory, "Allocated %d at hunk %04x:%04x (%s)\n", space, PRINT_REG(reg), type);
+	debugC(2, kDebugLevelMemory, "Allocated %d at hunk %04x:%04x (%s)", space, PRINT_REG(reg), type);
 
 	return reg;
 }
@@ -627,7 +627,7 @@
 		}
 	} // for all functions requesting to be mapped
 
-	debugC(2, kDebugLevelVM, "Handled %d/%d kernel functions, mapping %d and ignoring %d.\n",
+	debugC(2, 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	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -219,7 +219,7 @@
 }
 
 static void fgets_wrapper(EngineState *s, char *dest, int maxsize, int handle) {
-	debugC(2, kDebugLevelFile, "FGets'ing %d bytes from handle %d\n", maxsize, handle);
+	debugC(2, kDebugLevelFile, "FGets'ing %d bytes from handle %d", maxsize, handle);
 
 	FileHandle *f = getFileFromHandle(s, handle);
 	if (!f)
@@ -241,7 +241,7 @@
 			dest[strSize - 1] = 0;
 	}
 
-	debugC(2, kDebugLevelFile, "FGets'ed \"%s\"\n", dest);
+	debugC(2, kDebugLevelFile, "FGets'ed \"%s\"", dest);
 }
 
 static int _savegame_index_struct_compare(const void *a, const void *b) {

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -319,7 +319,7 @@
 
 	case K_GRAPH_ADJUST_PRIORITY:
 		// Seems to be only implemented for SCI0/SCI01 games
-		debugC(2, kDebugLevelGraphics, "adjust_priority(%d, %d)\n", argv[1].toUint16(), argv[2].toUint16());
+		debugC(2, kDebugLevelGraphics, "adjust_priority(%d, %d)", argv[1].toUint16(), argv[2].toUint16());
 		s->_gui->graphAdjustPriority(argv[1].toUint16(), argv[2].toUint16());
 		break;
 
@@ -352,7 +352,7 @@
 
 	if (text.empty() || !dest) { // Empty text
 		dest[2] = dest[3] = make_reg(0, 0);
-		debugC(2, kDebugLevelStrings, "GetTextSize: Empty string\n");
+		debugC(2, kDebugLevelStrings, "GetTextSize: Empty string");
 		return s->r_acc;
 	}
 
@@ -365,7 +365,7 @@
 #endif
 		s->_gui->textSize(s->strSplit(text.c_str(), sep).c_str(), font_nr, maxwidth, &textWidth, &textHeight);
 	
-	debugC(2, kDebugLevelStrings, "GetTextSize '%s' -> %dx%d\n", text.c_str(), textWidth, textHeight);
+	debugC(2, 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;
@@ -504,7 +504,7 @@
 #endif
 		loopCount = s->_gui->getLoopCount(viewId);
 
-	debugC(2, kDebugLevelGraphics, "NumLoops(view.%d) = %d\n", viewId, loopCount);
+	debugC(2, kDebugLevelGraphics, "NumLoops(view.%d) = %d", viewId, loopCount);
 
 	return make_reg(0, loopCount);
 }
@@ -522,7 +522,7 @@
 #endif
 		celCount = s->_gui->getCelCount(viewId, loopNo);
 
-	debugC(2, kDebugLevelGraphics, "NumCels(view.%d, %d) = %d\n", viewId, loopNo, celCount);
+	debugC(2, kDebugLevelGraphics, "NumCels(view.%d, %d) = %d", viewId, loopNo, celCount);
 
 	return make_reg(0, celCount);
 }
@@ -831,13 +831,13 @@
 
 	switch (type) {
 	case SCI_CONTROLS_TYPE_BUTTON:
-		debugC(2, kDebugLevelGraphics, "drawing button %04x:%04x to %d,%d\n", PRINT_REG(controlObject), x, y);
+		debugC(2, kDebugLevelGraphics, "drawing button %04x:%04x to %d,%d", PRINT_REG(controlObject), x, y);
 		s->_gui->drawControlButton(rect, controlObject, s->strSplit(text.c_str(), NULL).c_str(), fontId, style, hilite);
 		return;
 
 	case SCI_CONTROLS_TYPE_TEXT:
 		alignment = GET_SEL32V(s->_segMan, controlObject, mode);
-		debugC(2, kDebugLevelGraphics, "drawing text %04x:%04x ('%s') to %d,%d, mode=%d\n", PRINT_REG(controlObject), text.c_str(), x, y, alignment);
+		debugC(2, kDebugLevelGraphics, "drawing text %04x:%04x ('%s') to %d,%d, mode=%d", PRINT_REG(controlObject), text.c_str(), x, y, alignment);
 		s->_gui->drawControlText(rect, controlObject, s->strSplit(text.c_str()).c_str(), fontId, alignment, style, hilite);
 		return;
 
@@ -845,7 +845,7 @@
 		mode = GET_SEL32V(s->_segMan, controlObject, mode);
 		maxChars = GET_SEL32V(s->_segMan, controlObject, max);
 		cursorPos = GET_SEL32V(s->_segMan, controlObject, cursor);
-		debugC(2, kDebugLevelGraphics, "drawing edit control %04x:%04x (text %04x:%04x, '%s') to %d,%d\n", PRINT_REG(controlObject), PRINT_REG(textReference), text.c_str(), x, y);
+		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);
 		s->_gui->drawControlTextEdit(rect, controlObject, s->strSplit(text.c_str(), NULL).c_str(), fontId, mode, style, cursorPos, maxChars, hilite);
 		return;
 
@@ -865,7 +865,7 @@
 			else
 				priority = -1;
 		}
-		debugC(2, kDebugLevelGraphics, "drawing icon control %04x:%04x to %d,%d\n", PRINT_REG(controlObject), x, y - 1);
+		debugC(2, kDebugLevelGraphics, "drawing icon control %04x:%04x to %d,%d", PRINT_REG(controlObject), x, y - 1);
 		s->_gui->drawControlIcon(rect, controlObject, viewId, loopNo, celNo, priority, style, hilite);
 		return;
 
@@ -913,7 +913,7 @@
 			}
 		}
 
-		debugC(2, kDebugLevelGraphics, "drawing list control %04x:%04x to %d,%d, diff %d\n", PRINT_REG(controlObject), x, y, SCI_MAX_SAVENAME_LENGTH);
+		debugC(2, kDebugLevelGraphics, "drawing list control %04x:%04x to %d,%d, diff %d", PRINT_REG(controlObject), x, y, SCI_MAX_SAVENAME_LENGTH);
 		s->_gui->drawControlList(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	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/klists.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -118,7 +118,7 @@
 	List *l;
 	l = s->_segMan->allocateList(&listbase);
 	l->first = l->last = NULL_REG;
-	debugC(2, kDebugLevelNodes, "New listbase at %04x:%04x\n", PRINT_REG(listbase));
+	debugC(2, kDebugLevelNodes, "New listbase at %04x:%04x", PRINT_REG(listbase));
 
 	return listbase; // Return list base address
 }
@@ -178,7 +178,7 @@
 	else
 		s->r_acc = _k_new_node(s, argv[0], argv[1]);
 
-	debugC(2, kDebugLevelNodes, "New nodebase at %04x:%04x\n", PRINT_REG(s->r_acc));
+	debugC(2, kDebugLevelNodes, "New nodebase at %04x:%04x", PRINT_REG(s->r_acc));
 
 	return s->r_acc;
 }
@@ -225,7 +225,7 @@
 	List *l = s->_segMan->lookupList(listbase);
 	Node *new_n = s->_segMan->lookupNode(nodebase);
 
-	debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase));
+	debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x", PRINT_REG(nodebase), PRINT_REG(listbase));
 
 	// FIXME: This should be an error, but it's turned to a warning for now
 	if (!new_n)
@@ -248,7 +248,7 @@
 	List *l = s->_segMan->lookupList(listbase);
 	Node *new_n = s->_segMan->lookupNode(nodebase);
 
-	debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase));
+	debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x", PRINT_REG(nodebase), PRINT_REG(listbase));
 
 	// FIXME: This should be an error, but it's turned to a warning for now
 	if (!new_n)
@@ -344,26 +344,26 @@
 	reg_t key = argv[1];
 	reg_t list_pos = argv[0];
 
-	debugC(2, kDebugLevelNodes, "Looking for key %04x:%04x in list %04x:%04x\n", PRINT_REG(key), PRINT_REG(list_pos));
+	debugC(2, kDebugLevelNodes, "Looking for key %04x:%04x in list %04x:%04x", PRINT_REG(key), PRINT_REG(list_pos));
 
 	checkListPointer(s->_segMan, argv[0]);
 
 	node_pos = s->_segMan->lookupList(list_pos)->first;
 
-	debugC(2, kDebugLevelNodes, "First node at %04x:%04x\n", PRINT_REG(node_pos));
+	debugC(2, 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\n", PRINT_REG(node_pos));
+			debugC(2, kDebugLevelNodes, " Found key at %04x:%04x", PRINT_REG(node_pos));
 			return node_pos;
 		}
 
 		node_pos = n->succ;
-		debugC(2, kDebugLevelNodes, "NextNode at %04x:%04x\n", PRINT_REG(node_pos));
+		debugC(2, kDebugLevelNodes, "NextNode at %04x:%04x", PRINT_REG(node_pos));
 	}
 
-	debugC(2, kDebugLevelNodes, "Looking for key without success\n");
+	debugC(2, kDebugLevelNodes, "Looking for key without success");
 	return NULL_REG;
 }
 

Modified: scummvm/trunk/engines/sci/engine/kmovement.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmovement.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/kmovement.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -122,7 +122,7 @@
 	// POST: (dx != 0)  ==>  abs(tmp) > abs(dx)
 	// POST: (dx != 0)  ==>  abs(tmp) ~>=~ abs(dy)
 
-	debugC(2, kDebugLevelBresen, "c: %d, tmp: %d\n", c, tmp);
+	debugC(2, kDebugLevelBresen, "c: %d, tmp: %d", c, tmp);
 
 	// Compute x step
 	if (tmp != 0)
@@ -154,8 +154,8 @@
 	// Always force vy to be upwards
 	vy = -abs(vy);
 
-	debugC(2, kDebugLevelBresen, "SetJump for object at %04x:%04x\n", PRINT_REG(object));
-	debugC(2, kDebugLevelBresen, "xStep: %d, yStep: %d\n", vx, vy);
+	debugC(2, kDebugLevelBresen, "SetJump for object at %04x:%04x", PRINT_REG(object));
+	debugC(2, kDebugLevelBresen, "xStep: %d, yStep: %d", vx, vy);
 
 	PUT_SEL32V(segMan, object, xStep, vx);
 	PUT_SEL32V(segMan, object, yStep, vy);
@@ -209,8 +209,8 @@
 	PUT_SEL32V(segMan, mover, dx, deltax_step);
 	PUT_SEL32V(segMan, mover, dy, deltay_step);
 
-	debugC(2, kDebugLevelBresen, "Init bresen for mover %04x:%04x: d=(%d,%d)\n", PRINT_REG(mover), deltax, deltay);
-	debugC(2, kDebugLevelBresen, "    steps=%d, mv=(%d, %d), i1= %d, i2=%d\n",
+	debugC(2, kDebugLevelBresen, "Init bresen for mover %04x:%04x: d=(%d,%d)", PRINT_REG(mover), deltax, deltay);
+	debugC(2, kDebugLevelBresen, "    steps=%d, mv=(%d, %d), i1= %d, i2=%d",
 	          numsteps, deltax_step, deltay_step, i1, bdi*2);
 
 	//PUT_SEL32V(segMan, mover, b_movCnt, numsteps); // Needed for HQ1/Ogre?
@@ -306,13 +306,13 @@
 		y = desty;
 		completed = 1;
 
-		debugC(2, kDebugLevelBresen, "Finished mover %04x:%04x\n", PRINT_REG(mover));
+		debugC(2, kDebugLevelBresen, "Finished mover %04x:%04x", PRINT_REG(mover));
 	}
 
 	PUT_SEL32V(segMan, client, x, x);
 	PUT_SEL32V(segMan, client, y, y);
 
-	debugC(2, kDebugLevelBresen, "New data: (x,y)=(%d,%d), di=%d\n", x, y, bdi);
+	debugC(2, kDebugLevelBresen, "New data: (x,y)=(%d,%d), di=%d", x, y, bdi);
 
 	if (s->_kernel->_selectorCache.cantBeHere != -1) {
 		invoke_selector(INV_SEL(client, cantBeHere, kStopOnInvalidSelector), 0);
@@ -328,7 +328,7 @@
 		PUT_SEL32V(segMan, client, y, oldy);
 		PUT_SEL32V(segMan, client, signal, (signal | kSignalHitObstacle));
 
-		debugC(2, kDebugLevelBresen, "Finished mover %04x:%04x by collision\n", PRINT_REG(mover));
+		debugC(2, kDebugLevelBresen, "Finished mover %04x:%04x by collision", PRINT_REG(mover));
 		completed = 1;
 	}
 
@@ -397,7 +397,7 @@
 	destx = GET_SEL32V(segMan, mover, x);
 	desty = GET_SEL32V(segMan, mover, y);
 
-	debugC(2, kDebugLevelBresen, "Doing avoider %04x:%04x (dest=%d,%d)\n", PRINT_REG(avoider), destx, desty);
+	debugC(2, kDebugLevelBresen, "Doing avoider %04x:%04x (dest=%d,%d)", PRINT_REG(avoider), destx, desty);
 
 	if (invoke_selector(INV_SEL(mover, doit, kContinueOnInvalidSelector) , 0)) {
 		error("Mover %04x:%04x of avoider %04x:%04x doesn't have a doit() funcselector", PRINT_REG(mover), PRINT_REG(avoider));
@@ -418,7 +418,7 @@
 	dy = desty - GET_SEL32V(segMan, client, y);
 	angle = getAngle(dx, dy);
 
-	debugC(2, kDebugLevelBresen, "Movement (%d,%d), angle %d is %sblocked\n", dx, dy, angle, (s->r_acc.offset) ? " " : "not ");
+	debugC(2, 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 = (rand() & 1) ? 45 : (360 - 45); // Clockwise/counterclockwise
@@ -428,7 +428,7 @@
 		int ystep = GET_SEL32V(segMan, client, yStep);
 		int moves;
 
-		debugC(2, kDebugLevelBresen, " avoider %04x:%04x\n", PRINT_REG(avoider));
+		debugC(2, kDebugLevelBresen, " avoider %04x:%04x", PRINT_REG(avoider));
 
 		for (moves = 0; moves < 8; moves++) {
 			int move_x = (int)(sin(angle * PI / 180.0) * (xstep));
@@ -437,7 +437,7 @@
 			PUT_SEL32V(segMan, client, x, oldx + move_x);
 			PUT_SEL32V(segMan, client, y, oldy + move_y);
 
-			debugC(2, kDebugLevelBresen, "Pos (%d,%d): Trying angle %d; delta=(%d,%d)\n", oldx, oldy, angle, move_x, move_y);
+			debugC(2, kDebugLevelBresen, "Pos (%d,%d): Trying angle %d; delta=(%d,%d)", oldx, oldy, angle, move_x, move_y);
 
 			if (invoke_selector(INV_SEL(client, canBeHere, kContinueOnInvalidSelector) , 0)) {
 				error("Client %04x:%04x of avoider %04x:%04x doesn't"
@@ -449,7 +449,7 @@
 			PUT_SEL32V(segMan, client, y, oldy);
 
 			if (s->r_acc.offset) { // We can be here
-				debugC(2, kDebugLevelBresen, "Success\n");
+				debugC(2, kDebugLevelBresen, "Success");
 				PUT_SEL32V(segMan, client, heading, angle);
 
 				return make_reg(0, angle);

Modified: scummvm/trunk/engines/sci/engine/kparse.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kparse.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/kparse.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -105,10 +105,10 @@
 		s->r_acc = make_reg(0, 1);
 
 #ifdef DEBUG_PARSER
-			debugC(2, kDebugLevelParser, "Parsed to the following blocks:\n", 0);
+			debugC(2, kDebugLevelParser, "Parsed to the following blocks:", 0);
 
 			for (ResultWordList::const_iterator i = words.begin(); i != words.end(); ++i)
-				debugC(2, kDebugLevelParser, "   Type[%04x] Group[%04x]\n", i->_class, i->_group);
+				debugC(2, kDebugLevelParser, "   Type[%04x] Group[%04x]", i->_class, i->_group);
 #endif
 
 		int syntax_fail = voc->parseGNF(words);
@@ -120,7 +120,7 @@
 			invoke_selector(INV_SEL(s->_gameObj, syntaxFail, kStopOnInvalidSelector), 2, s->_voc->parser_base, stringpos);
 			/* Issue warning */
 
-			debugC(2, kDebugLevelParser, "Tree building failed\n");
+			debugC(2, kDebugLevelParser, "Tree building failed");
 
 		} else {
 			s->_voc->parserIsValid = true;
@@ -137,7 +137,7 @@
 		PUT_SEL32V(segMan, event, claimed, 1);
 		if (error) {
 			s->_segMan->strcpy(s->_voc->parser_base, error);
-			debugC(2, kDebugLevelParser, "Word unknown: %s\n", error);
+			debugC(2, kDebugLevelParser, "Word unknown: %s", error);
 			/* Issue warning: */
 
 			invoke_selector(INV_SEL(s->_gameObj, wordFail, kStopOnInvalidSelector), 2, s->_voc->parser_base, stringpos);
@@ -180,7 +180,7 @@
 			byte *synonyms = s->_segMan->getScript(seg)->getSynonyms();
 
 			if (synonyms) {
-				debugC(2, kDebugLevelParser, "Setting %d synonyms for script.%d\n",
+				debugC(2, kDebugLevelParser, "Setting %d synonyms for script.%d",
 				          numSynonyms, script);
 
 				if (numSynonyms > 16384) {
@@ -203,7 +203,7 @@
 		node = s->_segMan->lookupNode(node->succ);
 	}
 
-	debugC(2, kDebugLevelParser, "A total of %d synonyms are active now.\n", numSynonyms);
+	debugC(2, kDebugLevelParser, "A total of %d synonyms are active now.", numSynonyms);
 
 	return s->r_acc;
 }

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -121,7 +121,7 @@
 		return NULL_REG;
 	}
 
-	debugC(2, kDebugLevelMemory, "Attempting to clone from %04x:%04x\n", PRINT_REG(parent_addr));
+	debugC(2, kDebugLevelMemory, "Attempting to clone from %04x:%04x", PRINT_REG(parent_addr));
 
 	clone_obj = s->_segMan->allocateClone(&clone_addr);
 

Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -214,7 +214,7 @@
 	Common::String source_str = kernel_lookup_text(s, position, index);
 	const char* source = source_str.c_str();
 
-	debugC(2, kDebugLevelStrings, "Formatting \"%s\"\n", source);
+	debugC(2, kDebugLevelStrings, "Formatting \"%s\"", source);
 
 
 	arguments = (uint16 *)malloc(sizeof(uint16) * argc);

Modified: scummvm/trunk/engines/sci/engine/segment.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/segment.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -322,9 +322,9 @@
 
 void Script::freeAtAddress(SegManager *segMan, reg_t addr) {
 	/*
-		debugC(2, kDebugLevelGC, "[GC] Freeing script %04x:%04x\n", PRINT_REG(addr));
+		debugC(2, kDebugLevelGC, "[GC] Freeing script %04x:%04x", PRINT_REG(addr));
 		if (_localsSegment)
-			debugC(2, kDebugLevelGC, "[GC] Freeing locals %04x:0000\n", _localsSegment);
+			debugC(2, kDebugLevelGC, "[GC] Freeing locals %04x:0000", _localsSegment);
 	*/
 
 	if (_markedAsDeleted)
@@ -374,7 +374,7 @@
 
 	// Note that this also includes the 'base' object, which is part of the script and therefore also emits the locals.
 	(*note)(param, clone->getPos());
-	//debugC(2, kDebugLevelGC, "[GC] Reporting clone-pos %04x:%04x\n", PRINT_REG(clone->pos));
+	//debugC(2, kDebugLevelGC, "[GC] Reporting clone-pos %04x:%04x", PRINT_REG(clone->pos));
 }
 
 void CloneTable::freeAtAddress(SegManager *segMan, reg_t addr) {

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -64,12 +64,12 @@
 	static reg_t dummyReg = NULL_REG;
 
 	if (!obj) {
-		debugC(2, kDebugLevelVM, "[VM] Sending to disposed object!\n");
+		debugC(2, kDebugLevelVM, "[VM] Sending to disposed object!");
 		return dummyReg;
 	}
 
 	if (index < 0 || (uint)index >= obj->getVarCount()) {
-		debugC(2, kDebugLevelVM, "[VM] Invalid property #%d (out of [0..%d]) requested!\n",
+		debugC(2, kDebugLevelVM, "[VM] Invalid property #%d (out of [0..%d]) requested!",
 			index, obj->getVarCount());
 		return dummyReg;
 	}
@@ -126,8 +126,8 @@
 				warning("[VM] Access would be outside even of the stack (%d); access denied", total_offset);
 				return false;
 			} else {
-				debugC(2, kDebugLevelVM, "%s\n", txt.c_str());
-				debugC(2, kDebugLevelVM, "[VM] Access within stack boundaries; access granted.\n");
+				debugC(2, kDebugLevelVM, "%s", txt.c_str());
+				debugC(2, kDebugLevelVM, "[VM] Access within stack boundaries; access granted.");
 				return true;
 			}
 		}
@@ -1952,7 +1952,7 @@
 	// Explanation: I'm starting to believe that this work is done by SCI itself.
 	scr->markDeleted();
 
-	debugC(kDebugLevelScripts, "Unloaded script 0x%x.\n", script_nr);
+	debugC(kDebugLevelScripts, "Unloaded script 0x%x.", script_nr);
 
 	return;
 }
@@ -1998,7 +1998,7 @@
 				s = successor;
 
 				if (script_abort_flag == 2) {
-					debugC(2, kDebugLevelVM, "Restarting with replay()\n");
+					debugC(2, kDebugLevelVM, "Restarting with replay()");
 					s->_executionStack.clear(); // Restart with replay
 
 					_init_stack_base_with_selector(s, s->_kernel->_selectorCache.replay);
@@ -2019,7 +2019,7 @@
 int game_run(EngineState **_s) {
 	EngineState *s = *_s;
 
-	debugC(2, kDebugLevelVM, "Calling %s::play()\n", s->_gameId.c_str());
+	debugC(2, kDebugLevelVM, "Calling %s::play()", s->_gameId.c_str());
 	_init_stack_base_with_selector(s, s->_kernel->_selectorCache.play); // Call the play selector
 
 	// Now: Register the first element on the execution stack-
@@ -2032,7 +2032,7 @@
 	// and ENGAGE!
 	_game_run(*_s, 0);
 
-	debugC(2, kDebugLevelVM, "Game::play() finished.\n");
+	debugC(2, kDebugLevelVM, "Game::play() finished.");
 
 	return 0;
 }

Modified: scummvm/trunk/engines/sci/sound/iterator/core.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/iterator/core.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/sound/iterator/core.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -559,7 +559,7 @@
 	if (!newsong) {
 		// Iterators should get freed when there's only one song left playing
 		if(oldfirst && oldfirst->_status == SOUND_STATUS_STOPPED) {
-			debugC(2, kDebugLevelSound, "[SFX] Stopping song %lx\n", oldfirst->_handle);
+			debugC(2, kDebugLevelSound, "[SFX] Stopping song %lx", oldfirst->_handle);
 			if (_player && oldfirst->_it)
 				_player->iterator_message(SongIterator::Message(oldfirst->_it->ID, SIMSG_STOP));
 		}
@@ -602,7 +602,7 @@
 	        oldseeker = oldseeker->_nextStopping)
 		if (oldseeker->_nextPlaying == &not_playing_anymore) {
 			setSongStatus(oldseeker, SOUND_STATUS_SUSPENDED);
-			debugC(2, kDebugLevelSound, "[SFX] Stopping song %lx\n", oldseeker->_handle);
+			debugC(2, kDebugLevelSound, "[SFX] Stopping song %lx", oldseeker->_handle);
 
 			if (_player && oldseeker->_it)
 				_player->iterator_message(SongIterator::Message(oldseeker->_it->ID, SIMSG_STOP));
@@ -611,7 +611,7 @@
 
 	for (newseeker = newsong; newseeker; newseeker = newseeker->_nextPlaying) {
 		if (newseeker->_status != SOUND_STATUS_PLAYING && _player) {
-			debugC(2, kDebugLevelSound, "[SFX] Adding song %lx\n", newseeker->_it->ID);
+			debugC(2, kDebugLevelSound, "[SFX] Adding song %lx", newseeker->_it->ID);
 
 			SongIterator *clonesong = newseeker->_it->clone(newseeker->_delay);
 			_player->add_iterator(clonesong, g_system->getMillis());

Modified: scummvm/trunk/engines/sci/sound/iterator/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/iterator/iterator.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/sound/iterator/iterator.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -247,7 +247,7 @@
 			channel->state = SI_STATE_DELTA_TIME;
 			channel->total_timepos = channel->loop_timepos;
 			channel->last_cmd = 0xfe;
-			debugC(2, kDebugLevelSound, "Looping song iterator %08lx.\n", ID);
+			debugC(2, kDebugLevelSound, "Looping song iterator %08lx.", ID);
 			return SI_LOOP;
 		} else {
 			channel->state = SI_STATE_FINISHED;
@@ -402,7 +402,7 @@
 		channel->state = SI_STATE_FINISHED;
 		delay = (size * 50 + rate - 1) / rate; /* number of ticks to completion*/
 
-		debugC(2, kDebugLevelSound, "delaying %d ticks\n", delay);
+		debugC(2, kDebugLevelSound, "delaying %d ticks", delay);
 		return delay;
 	}
 
@@ -544,7 +544,7 @@
 }
 
 static Audio::AudioStream *makeStream(byte *data, int size, int rate) {
-	debugC(2, kDebugLevelSound, "Playing PCM data of size %d, rate %d\n", size, rate);
+	debugC(2, kDebugLevelSound, "Playing PCM data of size %d, rate %d", size, rate);
 
 	// Duplicate the data
 	byte *sound = (byte *)malloc(size);
@@ -573,7 +573,7 @@
 
 		case _SIMSG_BASEMSG_PRINT:
 			print_tabs_id(msg._arg.i, ID);
-			debugC(2, kDebugLevelSound, "SCI0: dev=%d, active-chan=%d, size=%d, loops=%d\n",
+			debugC(2, kDebugLevelSound, "SCI0: dev=%d, active-chan=%d, size=%d, loops=%d",
 			        _deviceId, _numActiveChannels, _data.size(), _loops);
 			break;
 
@@ -973,7 +973,7 @@
 				playmask |= _channels[i].playmask;
 
 			print_tabs_id(msg._arg.i, ID);
-			debugC(2, kDebugLevelSound, "SCI1: chan-nr=%d, playmask=%04x\n",
+			debugC(2, kDebugLevelSound, "SCI1: chan-nr=%d, playmask=%04x",
 			        _numChannels, playmask);
 		}
 		break;
@@ -1126,7 +1126,7 @@
 SongIterator *CleanupSongIterator::handleMessage(Message msg) {
 	if (msg._class == _SIMSG_BASEMSG_PRINT && msg._type == _SIMSG_BASEMSG_PRINT) {
 		print_tabs_id(msg._arg.i, ID);
-		debugC(2, kDebugLevelSound, "CLEANUP\n");
+		debugC(2, kDebugLevelSound, "CLEANUP");
 	}
 
 	return NULL;
@@ -1208,7 +1208,7 @@
 
 	if (msg._class == _SIMSG_BASE && msg._type == _SIMSG_BASEMSG_PRINT) {
 		print_tabs_id(msg._arg.i, ID);
-		debugC(2, kDebugLevelSound, "FASTFORWARD:\n");
+		debugC(2, kDebugLevelSound, "FASTFORWARD:");
 		msg._arg.i++;
 	}
 
@@ -1511,7 +1511,7 @@
 
 	if (msg._class == _SIMSG_BASE && msg._type == _SIMSG_BASEMSG_PRINT) {
 		print_tabs_id(msg._arg.i, ID);
-		debugC(2, kDebugLevelSound, "TEE:\n");
+		debugC(2, kDebugLevelSound, "TEE:");
 		msg._arg.i++;
 	}
 
@@ -1555,15 +1555,15 @@
 	do {
 		retval = (*it)->nextCommand(buf, result);
 		if (retval == SI_MORPH) {
-			debugC(2, kDebugLevelSound, "  Morphing %p (stored at %p)\n", (void *)*it, (void *)it);
+			debugC(2, kDebugLevelSound, "  Morphing %p (stored at %p)", (void *)*it, (void *)it);
 			if (!SIMSG_SEND((*it), SIMSG_ACK_MORPH)) {
 				error("SI_MORPH failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
 			} else
-				debugC(2, kDebugLevelSound, "SI_MORPH successful\n");
+				debugC(2, kDebugLevelSound, "SI_MORPH successful");
 		}
 
 		if (retval == SI_FINISHED)
-			debugC(2, kDebugLevelSound, "[song-iterator] Song finished. mask = %04x, cm=%04x\n",
+			debugC(2, kDebugLevelSound, "[song-iterator] Song finished. mask = %04x, cm=%04x",
 			        mask, (*it)->channel_mask);
 		if (retval == SI_FINISHED
 		        && (mask & IT_READER_MAY_CLEAN)

Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-01-30 11:17:08 UTC (rev 47706)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-01-30 11:59:05 UTC (rev 47707)
@@ -95,26 +95,26 @@
 		switch (result) {
 
 		case SI_LOOP:
-			debugC(2, kDebugLevelSound, "[process-sound] Song %04x:%04x looped (to %d)\n",
+			debugC(2, kDebugLevelSound, "[process-sound] Song %04x:%04x looped (to %d)",
 			          PRINT_REG(obj), cue);
 			/*			PUT_SEL32V(segMan, obj, loops, GET_SEL32V(segMan, obj, loop) - 1);*/
 			PUT_SEL32V(segMan, obj, signal, SIGNAL_OFFSET);
 			break;
 
 		case SI_RELATIVE_CUE:
-			debugC(2, kDebugLevelSound, "[process-sound] Song %04x:%04x received relative cue %d\n",
+			debugC(2, kDebugLevelSound, "[process-sound] Song %04x:%04x received relative cue %d",
 			          PRINT_REG(obj), cue);
 			PUT_SEL32V(segMan, obj, signal, cue + 0x7f);
 			break;
 
 		case SI_ABSOLUTE_CUE:
-			debugC(2, kDebugLevelSound, "[process-sound] Song %04x:%04x received absolute cue %d\n",
+			debugC(2, kDebugLevelSound, "[process-sound] Song %04x:%04x received absolute cue %d",
 			          PRINT_REG(obj), cue);
 			PUT_SEL32V(segMan, obj, signal, cue);
 			break;
 
 		case SI_FINISHED:
-			debugC(2, kDebugLevelSound, "[process-sound] Song %04x:%04x finished\n",
+			debugC(2, kDebugLevelSound, "[process-sound] Song %04x:%04x finished",
 			          PRINT_REG(obj));
 			PUT_SEL32V(segMan, obj, signal, SIGNAL_OFFSET);
 			PUT_SEL32V(segMan, obj, state, kSoundStopped);
@@ -389,7 +389,7 @@
 					PUT_SEL32V(_segMan, obj, signal, SIGNAL_OFFSET);
 					return;
 				}
-				debugC(2, kDebugLevelSound, "Initializing song number %d\n", songNumber);
+				debugC(2, kDebugLevelSound, "Initializing song number %d", songNumber);
 				_state->sfx_add_song(build_iterator(_resMan, songNumber, SCI_SONG_ITERATOR_TYPE_SCI1,
 				                          handle), 0, handle, songNumber);
 			}
@@ -734,21 +734,21 @@
 
 	switch (result) {
 	case SI_ABSOLUTE_CUE:
-		debugC(2, kDebugLevelSound, "---    [CUE] %04x:%04x Absolute Cue: %d\n",
+		debugC(2, kDebugLevelSound, "---    [CUE] %04x:%04x Absolute Cue: %d",
 		          PRINT_REG(obj), signal);
-		debugC(2, kDebugLevelSound, "abs-signal %04X\n", signal);
+		debugC(2, kDebugLevelSound, "abs-signal %04X", signal);
 		PUT_SEL32V(_segMan, obj, signal, signal);
 		break;
 
 	case SI_RELATIVE_CUE:
-		debugC(2, kDebugLevelSound, "---    [CUE] %04x:%04x Relative Cue: %d\n",
+		debugC(2, kDebugLevelSound, "---    [CUE] %04x:%04x Relative Cue: %d",
 		          PRINT_REG(obj), signal);
 
 		/* FIXME to match commented-out semantics
 		 * below, with proper storage of dataInc and
 		 * signal in the iterator code. */
 		PUT_SEL32V(_segMan, obj, dataInc, signal);
-		debugC(2, kDebugLevelSound, "rel-signal %04X\n", signal);
+		debugC(2, kDebugLevelSound, "rel-signal %04X", signal);
 		if (_soundVersion == SCI_VERSION_1_EARLY)
 			PUT_SEL32V(_segMan, obj, signal, signal);
 		else
@@ -756,7 +756,7 @@
 		break;
 
 	case SI_FINISHED:
-		debugC(2, kDebugLevelSound, "---    [FINISHED] %04x:%04x\n", PRINT_REG(obj));
+		debugC(2, kDebugLevelSound, "---    [FINISHED] %04x:%04x", PRINT_REG(obj));
 		PUT_SEL32V(_segMan, obj, signal, SIGNAL_OFFSET);
 		break;
 


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