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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Nov 1 22:37:47 CET 2010


Revision: 54031
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54031&view=rev
Author:   fingolfin
Date:     2010-11-01 21:37:47 +0000 (Mon, 01 Nov 2010)

Log Message:
-----------
ENGINES: Replace many printfs by warning/debug/debugN

Modified Paths:
--------------
    scummvm/trunk/engines/agi/loader_v3.cpp
    scummvm/trunk/engines/agi/objects.cpp
    scummvm/trunk/engines/agi/predictive.cpp
    scummvm/trunk/engines/agos/debug.cpp
    scummvm/trunk/engines/agos/midi.cpp
    scummvm/trunk/engines/agos/subroutine.cpp
    scummvm/trunk/engines/agos/vga.cpp
    scummvm/trunk/engines/agos/vga_ff.cpp
    scummvm/trunk/engines/parallaction/font.cpp
    scummvm/trunk/engines/parallaction/parser_ns.cpp
    scummvm/trunk/engines/queen/logic.cpp
    scummvm/trunk/engines/scumm/boxes.cpp
    scummvm/trunk/engines/scumm/charset-fontdata.cpp
    scummvm/trunk/engines/scumm/costume.cpp
    scummvm/trunk/engines/scumm/he/resource_he.cpp
    scummvm/trunk/engines/scumm/resource_v2.cpp
    scummvm/trunk/engines/scumm/script.cpp
    scummvm/trunk/engines/scumm/script_v8.cpp
    scummvm/trunk/engines/scumm/scumm.cpp
    scummvm/trunk/engines/sky/disk.cpp
    scummvm/trunk/engines/sky/logic.cpp
    scummvm/trunk/engines/toon/script_func.cpp

Modified: scummvm/trunk/engines/agi/loader_v3.cpp
===================================================================
--- scummvm/trunk/engines/agi/loader_v3.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/agi/loader_v3.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -121,7 +121,7 @@
 	}
 
 	if (!fp.open(path)) {
-		printf("Failed to open \"%s\"\n", path.c_str());
+		warning("Failed to open '%s'", path.c_str());
 		return errBadFileOpen;
 	}
 	// build offset table for v3 directory format

Modified: scummvm/trunk/engines/agi/objects.cpp
===================================================================
--- scummvm/trunk/engines/agi/objects.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/agi/objects.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -74,8 +74,7 @@
 		if ((uint) offset < flen) {
 			(_objects + i)->name = (char *)strdup((const char *)mem + offset);
 		} else {
-			printf("ERROR: object %i name beyond object filesize! "
-					"(%04x > %04x)\n", i, offset, flen);
+			warning("object %i name beyond object filesize (%04x > %04x)", i, offset, flen);
 			(_objects + i)->name = strdup("");
 		}
 	}

Modified: scummvm/trunk/engines/agi/predictive.cpp
===================================================================
--- scummvm/trunk/engines/agi/predictive.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/agi/predictive.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -546,7 +546,7 @@
 #endif
 
 	uint32 time3 = _system->getMillis();
-	printf("Time to parse pred.dic: %d, total: %d\n", time3-time2, time3-time1);
+	debug("Time to parse pred.dic: %d, total: %d", time3-time2, time3-time1);
 }
 
 bool AgiEngine::matchWord() {

Modified: scummvm/trunk/engines/agos/debug.cpp
===================================================================
--- scummvm/trunk/engines/agos/debug.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/agos/debug.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -76,30 +76,30 @@
 
 	while (*st != '|')
 		st++;
-	printf("%s ", st + 1);
+	debugN("%s ", st + 1);
 
 	for (;;) {
 		switch (*s++) {
 		case 'x':
-			printf("\n");
+			debugN("\n");
 			return NULL;
 		case '|':
-			printf("\n");
+			debugN("\n");
 			return p;
 		case 'B':{
 				byte b = *p++;
 				if (b == 255)
-					printf("[%d] ", *p++);
+					debugN("[%d] ", *p++);
 				else
-					printf("%d ", b);
+					debugN("%d ", b);
 				break;
 			}
 		case 'V':{
 				byte b = *p++;
 				if (b == 255)
-					printf("[[%d]] ", *p++);
+					debugN("[[%d]] ", *p++);
 				else
-					printf("[%d] ", b);
+					debugN("[%d] ", b);
 				break;
 			}
 
@@ -108,15 +108,15 @@
 				p += 2;
 				if (getGameType() == GType_PP) {
 					if (n >= 60000 && n < 62048)
-						printf("[%d] ", n - 60000);
+						debugN("[%d] ", n - 60000);
 					else
-						printf("%d ", n);
+						debugN("%d ", n);
 
 				} else {
 					if (n >= 30000 && n < 30512)
-						printf("[%d] ", n - 30000);
+						debugN("[%d] ", n - 30000);
 					else
-						printf("%d ", n);
+						debugN("%d ", n);
 				}
 				break;
 			}
@@ -124,7 +124,7 @@
 		case 'w':{
 				int n = (int16)READ_BE_UINT16(p);
 				p += 2;
-				printf("%d ", n);
+				debugN("%d ", n);
 				break;
 			}
 
@@ -132,22 +132,22 @@
 				int n = (int16)READ_BE_UINT16(p);
 				p += 2;
 				if (n == -1)
-					printf("SUBJECT_ITEM ");
+					debugN("SUBJECT_ITEM ");
 				else if (n == -3)
-					printf("OBJECT_ITEM ");
+					debugN("OBJECT_ITEM ");
 				else if (n == -5)
-					printf("ME_ITEM ");
+					debugN("ME_ITEM ");
 				else if (n == -7)
-					printf("ACTOR_ITEM ");
+					debugN("ACTOR_ITEM ");
 				else if (n == -9)
-					printf("ITEM_A_PARENT ");
+					debugN("ITEM_A_PARENT ");
 				else
-					printf("<%d> ", n);
+					debugN("<%d> ", n);
 				break;
 			}
 
 		case 'J':{
-				printf("-> ");
+				debugN("-> ");
 			}
 			break;
 
@@ -155,9 +155,9 @@
 				uint n = READ_BE_UINT16(p);
 				p += 2;
 				if (n != 0xFFFF)
-					printf("\"%s\"(%d) ", getStringPtrByID(n), n);
+					debugN("\"%s\"(%d) ", getStringPtrByID(n), n);
 				else
-					printf("NULL_STRING ");
+					debugN("NULL_STRING ");
 			}
 			break;
 		}
@@ -167,11 +167,11 @@
 void AGOSEngine::dumpSubroutineLine(SubroutineLine *sl, Subroutine *sub) {
 	const byte *p;
 
-	printf("; ****\n");
+	debugN("; ****\n");
 
 	p = (byte *)sl + SUBROUTINE_LINE_SMALL_SIZE;
 	if (sub->id == 0) {
-		printf("; verb=%d, noun1=%d, noun2=%d\n", sl->verb, sl->noun1, sl->noun2);
+		debugN("; verb=%d, noun1=%d, noun2=%d\n", sl->verb, sl->noun1, sl->noun2);
 		p = (byte *)sl + SUBROUTINE_LINE_BIG_SIZE;
 	}
 
@@ -185,12 +185,12 @@
 void AGOSEngine::dumpSubroutine(Subroutine *sub) {
 	SubroutineLine *sl;
 
-	printf("\n******************************************\n;Subroutine, ID=%d:\nSUB_%d:\n", sub->id, sub->id);
+	debugN("\n******************************************\n;Subroutine, ID=%d:\nSUB_%d:\n", sub->id, sub->id);
 	sl = (SubroutineLine *)((byte *)sub + sub->first);
 	for (; (byte *)sl != (byte *)sub; sl = (SubroutineLine *)((byte *)sub + sl->next)) {
 		dumpSubroutineLine(sl, sub);
 	}
-	printf("\nEND ******************************************\n");
+	debugN("\nEND ******************************************\n");
 }
 
 void AGOSEngine::dumpSubroutines() {
@@ -245,35 +245,35 @@
 
 		while (*strn != '|')
 			strn++;
-		printf("%.2d: %s ", opcode, strn + 1);
+		debugN("%.2d: %s ", opcode, strn + 1);
 
 		int end = (getGameType() == GType_FF || getGameType() == GType_PP) ? 9999 : 999;
 		for (; *str != '|'; str++) {
 			switch (*str) {
 			case 'x':
-				printf("\n");
+				debugN("\n");
 				return;
 			case 'b':
-				printf("%d ", *src++);
+				debugN("%d ", *src++);
 				break;
 			case 'd':
-				printf("%d ", (int16)readUint16Wrapper(src));
+				debugN("%d ", (int16)readUint16Wrapper(src));
 				src += 2;
 				break;
 			case 'v':
-				printf("[%d] ", readUint16Wrapper(src));
+				debugN("[%d] ", readUint16Wrapper(src));
 				src += 2;
 				break;
 			case 'i':
-				printf("%d ", (int16)readUint16Wrapper(src));
+				debugN("%d ", (int16)readUint16Wrapper(src));
 				src += 2;
 				break;
 			case 'j':
-				printf("-> ");
+				debugN("-> ");
 				break;
 			case 'q':
 				while (readUint16Wrapper(src) != end) {
-					printf("(%d,%d) ", readUint16Wrapper(src),
+					debugN("(%d,%d) ", readUint16Wrapper(src),
 									readUint16Wrapper(src + 2));
 					src += 4;
 				}
@@ -284,7 +284,7 @@
 			}
 		}
 
-		printf("\n");
+		debugN("\n");
 	} while (!singeOpcode);
 }
 
@@ -293,10 +293,10 @@
 }
 
 void AGOSEngine::dumpVgaScriptAlways(const byte *ptr, uint16 res, uint16 id) {
-	printf("; address=%x, vgafile=%d  vgasprite=%d\n",
+	debugN("; address=%x, vgafile=%d  vgasprite=%d\n",
 					(unsigned int)(ptr - _vgaBufferPointers[res].vgaFile1), res, id);
 	dumpVideoScript(ptr, false);
-	printf("; end\n");
+	debugN("; end\n");
 }
 
 void AGOSEngine::dumpAllVgaImageFiles() {

Modified: scummvm/trunk/engines/agos/midi.cpp
===================================================================
--- scummvm/trunk/engines/agos/midi.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/agos/midi.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -226,7 +226,7 @@
 		parser->setMidiDriver(this);
 		parser->setTimerRate(_driver->getBaseTempo());
 		if (!parser->loadMusic(_music.songs[track], _music.song_sizes[track])) {
-			printf ("Error reading track!\n");
+			warning("Error reading track %d", track);
 			delete parser;
 			parser = 0;
 		}
@@ -455,7 +455,7 @@
 	parser->setMidiDriver(this);
 	parser->setTimerRate(timerRate);
 	if (!parser->loadMusic(p->data, size)) {
-		printf("Error reading track!\n");
+		warning("Error reading track");
 		delete parser;
 		parser = 0;
 	}
@@ -484,7 +484,7 @@
 
 	p->num_songs = in->readByte();
 	if (p->num_songs > 16) {
-		printf ("playMultipleSMF: %d is too many songs to keep track of!\n", (int)p->num_songs);
+		warning("playMultipleSMF: %d is too many songs to keep track of", (int)p->num_songs);
 		return;
 	}
 
@@ -496,7 +496,7 @@
 		// Make sure there's a MThd
 		in->read(buf, 4);
 		if (memcmp(buf, "MThd", 4)) {
-			printf("Expected MThd but found '%c%c%c%c' instead!\n", buf[0], buf[1], buf[2], buf[3]);
+			warning("Expected MThd but found '%c%c%c%c' instead", buf[0], buf[1], buf[2], buf[3]);
 			return;
 		}
 		in->seek(in->readUint32BE(), SEEK_CUR);

Modified: scummvm/trunk/engines/agos/subroutine.cpp
===================================================================
--- scummvm/trunk/engines/agos/subroutine.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/agos/subroutine.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -570,7 +570,7 @@
 				_codePtr += 8;
 
 			if (_dumpOpcodes)
-				printf("; %d\n", sub->id);
+				debug("; %d", sub->id);
 			result = runScript();
 			if (result != 0) {
 				break;

Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/agos/vga.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -155,7 +155,7 @@
 
 		if (_dumpVgaOpcodes) {
 			if (_vcPtr != (const byte *)&_vcGetOutOfCode) {
-				printf("%.5d %.5X: %5d %4d ", _vgaTickCounter, (unsigned int)(_vcPtr - _curVgaFile1), _vgaCurSpriteId, _vgaCurZoneNum);
+				debugN("%.5d %.5X: %5d %4d ", _vgaTickCounter, (unsigned int)(_vcPtr - _curVgaFile1), _vgaCurSpriteId, _vgaCurZoneNum);
 				dumpVideoScript(_vcPtr, true);
 			}
 		}
@@ -383,7 +383,7 @@
 	}
 
 	if (_dumpVgaOpcodes)
-		printf("; skipped\n");
+		debugN("; skipped\n");
 }
 
 // VGA Script commands

Modified: scummvm/trunk/engines/agos/vga_ff.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_ff.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/agos/vga_ff.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -405,9 +405,9 @@
 	if (getBitFlag(100)) {
 		startOverlayAnims();
 	} else if (getBitFlag(103)) {
-		printf("NameAndTime\n");
+		debug("vc63_fastFadeIn: NameAndTime");
 	} else if (getBitFlag(104)) {
-		printf("HiScoreTable\n");
+		debug("vc63_fastFadeIn: HiScoreTable");
 	}
 }
 

Modified: scummvm/trunk/engines/parallaction/font.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/font.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/parallaction/font.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -574,7 +574,7 @@
 }
 
 uint16 AmigaFont::width(byte c) {
-//	printf("kern(%i) = %i, space(%i) = %i\t", c, getKerning(c), c, getSpacing(c));
+//	debug("kern(%i) = %i, space(%i) = %i\t", c, getKerning(c), c, getSpacing(c));
 	return getKerning(c) + getSpacing(c);
 }
 
@@ -642,7 +642,7 @@
 }
 
 Font *DosDisk_br::createFont(const char *name, Common::ReadStream &stream) {
-//	printf("DosDisk_br::createFont(%s)\n", name);
+//	debug("DosDisk_br::createFont(%s)", name);
 	Font *font;
 
 	if (_vm->getFeatures() & GF_DEMO) {

Modified: scummvm/trunk/engines/parallaction/parser_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser_ns.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/parallaction/parser_ns.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -23,7 +23,6 @@
  *
  */
 
-
 #include "parallaction/parallaction.h"
 #include "parallaction/parser.h"
 #include "parallaction/sound.h"
@@ -1284,7 +1283,7 @@
 DECLARE_ZONE_PARSER(label)  {
 	debugC(7, kDebugParser, "ZONE_PARSER(label) ");
 
-//			printf("label: %s", _tokens[1]);
+//			debug("label: %s", _tokens[1]);
 	ctxt.z->_label = _vm->_gfx->renderFloatingLabel(_vm->_labelFont, _tokens[1]);
 	ctxt.z->_flags &= ~kFlagsNoName;
 }

Modified: scummvm/trunk/engines/queen/logic.cpp
===================================================================
--- scummvm/trunk/engines/queen/logic.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/queen/logic.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -1550,7 +1550,7 @@
 	while (n--) {
 		_vm->update();
 	}
-//	printf("Game completed.");
+//	debug("Game completed.");
 	_vm->quitGame();
 }
 
@@ -2004,7 +2004,7 @@
 }
 
 void Logic::asmEndDemo() {
-//	printf("Flight of the Amazon Queen, released January 95.");
+//	debug("Flight of the Amazon Queen, released January 95.");
 	_vm->quitGame();
 }
 
@@ -2049,7 +2049,7 @@
 }
 
 void Logic::asmEndInterview() {
-//	printf("Interactive Interview copyright (c) 1995, IBI.");
+//	debug("Interactive Interview copyright (c) 1995, IBI.");
 	_vm->quitGame();
 }
 

Modified: scummvm/trunk/engines/scumm/boxes.cpp
===================================================================
--- scummvm/trunk/engines/scumm/boxes.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/scumm/boxes.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -921,32 +921,32 @@
 static void printMatrix(byte *boxm, int num) {
 	int i;
 	for (i = 0; i < num; i++) {
-		printf("%d: ", i);
+		debugN("%d: ", i);
 		while (*boxm != 0xFF) {
-			printf("%d, ", *boxm);
+			debug("%d, ", *boxm);
 			boxm++;
 		}
 		boxm++;
-		printf("\n");
+		debug("\n");
 	}
 }
 
 static void printMatrix2(byte *matrix, int num) {
 	int i, j;
-	printf("    ");
+	debug("    ");
 	for (i = 0; i < num; i++)
-		printf("%2d ", i);
-	printf("\n");
+		debug("%2d ", i);
+	debug("\n");
 	for (i = 0; i < num; i++) {
-		printf("%2d: ", i);
+		debug("%2d: ", i);
 		for (j = 0; j < num; j++) {
 			int val = matrix[i * num + j];
 			if (val == Actor::kInvalidBox)
-				printf(" ? ");
+				debug(" ? ");
 			else
-				printf("%2d ", val);
+				debug("%2d ", val);
 		}
-		printf("\n");
+		debug("\n");
 	}
 }
 #endif
@@ -1053,9 +1053,9 @@
 
 
 #if BOX_DEBUG
-	printf("Itinerary matrix:\n");
+	debug("Itinerary matrix:\n");
 	printMatrix2(itineraryMatrix, num);
-	printf("compressed matrix:\n");
+	debug("compressed matrix:\n");
 	printMatrix(getBoxMatrixBaseAddr(), num);
 #endif
 

Modified: scummvm/trunk/engines/scumm/charset-fontdata.cpp
===================================================================
--- scummvm/trunk/engines/scumm/charset-fontdata.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/scumm/charset-fontdata.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -589,20 +589,20 @@
 			b = data[offset+3];
 			len = data[offset+4];
 			while (len--) {
-				printf("0x%02x, ", b);
+				debugN("0x%02x, ", b);
 				count++;
 				if (count % 8 == 0)
-					printf("\n");
+					debugN("\n");
 			}
 			offset += 6;
 		} else {
-			printf("0x%02x, ", data[offset]);
+			debugN("0x%02x, ", data[offset]);
 			count++;
 			if (count % 8 == 0)
-				printf("\n");
+				debugN("\n");
 		}
 	}
-	printf("\n");
+	debugN("\n");
 	_vm->_system->quit();
 #endif
 }

Modified: scummvm/trunk/engines/scumm/costume.cpp
===================================================================
--- scummvm/trunk/engines/scumm/costume.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/scumm/costume.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -648,7 +648,7 @@
 				}
 			}
 			if (index != 128) {
-				printf("%d\n", index);
+				warning("ClassicCostumeRenderer::procPCEngine: index %d != 128\n", index);
 			}
 
 			for (int row = 0; row < 16; ++row) {

Modified: scummvm/trunk/engines/scumm/he/resource_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/resource_he.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/scumm/he/resource_he.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -358,7 +358,7 @@
 		WinResource *fwr;
 
 		RETURN_IF_BAD_POINTER(NULL, icondir->entries[c]);
-		/*printf("%d. bytes_in_res=%d width=%d height=%d planes=%d bit_count=%d\n", c,
+		/*debug("%d. bytes_in_res=%d width=%d height=%d planes=%d bit_count=%d", c,
 			FROM_LE_32(icondir->entries[c].bytes_in_res),
 			(is_icon ? icondir->entries[c].res_info.icon.width : FROM_LE_16(icondir->entries[c].res_info.cursor.width)),
 			(is_icon ? icondir->entries[c].res_info.icon.height : FROM_LE_16(icondir->entries[c].res_info.cursor.height)),

Modified: scummvm/trunk/engines/scumm/resource_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource_v2.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/scumm/resource_v2.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -23,8 +23,6 @@
  *
  */
 
-
-
 #include "scumm/file.h"
 #include "scumm/scumm_v2.h"
 #include "scumm/resource.h"
@@ -175,24 +173,24 @@
 
 	switch (magic) {
 		case 0x0100:
-			printf("Enhanced V2 game detected\n");
+			debug("Enhanced V2 game detected");
 			assert(_game.version == 2);
 			readEnhancedIndexFile();
 			break;
 		case 0x0A31:
-			printf("Classic V1 game detected\n");
+			debug("Classic V1 game detected");
 			assert(_game.version == 1);
 			readClassicIndexFile();
 			break;
 		case 0x4643:
 			if (!(_game.platform == Common::kPlatformNES))
 				error("Use maniac target");
-			printf("NES V1 game detected\n");
+			debug("NES V1 game detected");
 			assert(_game.version == 1);
 			readClassicIndexFile();
 			break;
 		case 0x132:
-			printf("C64 V1 game detected\n");
+			debug("C64 V1 game detected");
 			if (_game.id == GID_MANIAC) {
 				assert(_game.version == 0);
 			} else {
@@ -201,7 +199,7 @@
 			readClassicIndexFile();
 			break;
 		case 0x032:
-			printf("Apple II V1 game detected\n");
+			debug("Apple II V1 game detected");
 			assert(_game.version == 0);
 			readClassicIndexFile();
 			break;

Modified: scummvm/trunk/engines/scumm/script.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/scumm/script.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -467,11 +467,11 @@
 	while (_currentScript != 0xFF) {
 
 		if (_showStack == 1) {
-			printf("Stack:");
+			debugN("Stack:");
 			for (c = 0; c < _scummStackPos; c++) {
-				printf(" %d", _vmStack[c]);
+				debugN(" %d", _vmStack[c]);
 			}
-			printf("\n");
+			debugN("\n");
 		}
 		_opcode = fetchScriptByte();
 		if (_game.version > 2) // V0-V2 games didn't use the didexec flag
@@ -483,9 +483,9 @@
 				getOpcodeDesc(_opcode));
 		if (_hexdumpScripts == true) {
 			for (c = -1; c < 15; c++) {
-				printf(" %02x", *(_scriptPointer + c));
+				debugN(" %02x", *(_scriptPointer + c));
 			}
-			printf("\n");
+			debugN("\n");
 		}
 
 		executeOpcode(_opcode);

Modified: scummvm/trunk/engines/scumm/script_v8.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v8.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/scumm/script_v8.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -766,7 +766,6 @@
 
 	if (subOp == 0x7A) {
 		_curActor = pop();
-		//printf("Setting current actor to %d\n", _curActor);
 		return;
 	}
 
@@ -937,7 +936,6 @@
 		_curVerb = pop();
 		_curVerbSlot = getVerbSlot(_curVerb, 0);
 		assertRange(0, _curVerbSlot, _numVerbs - 1, "new verb slot");
-		//printf("Setting current actor to %d\n", _curActor);
 		return;
 	}
 

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -485,7 +485,8 @@
 	if (ConfMan.getBool("demo_mode"))
 		_game.features |= GF_DEMO;
 	if (ConfMan.hasKey("nosubtitles")) {
-		printf("Configuration key 'nosubtitles' is deprecated. Use 'subtitles' instead\n");
+		// We replaced nosubtitles *ages* ago. Just convert it silently
+		debug("Configuration key 'nosubtitles' is deprecated. Converting to 'subtitles'");
 		if (!ConfMan.hasKey("subtitles"))
 			ConfMan.setBool("subtitles", !ConfMan.getBool("nosubtitles"));
 	}

Modified: scummvm/trunk/engines/sky/disk.cpp
===================================================================
--- scummvm/trunk/engines/sky/disk.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/sky/disk.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -59,7 +59,7 @@
 	if (!_dataDiskHandle->isOpen())
 		error("Error opening %s", dataFilename);
 
-	printf("Found BASS version v0.0%d (%d dnr entries)\n", determineGameVersion(), _dinnerTableEntries);
+	debug("Found BASS version v0.0%d (%d dnr entries)", determineGameVersion(), _dinnerTableEntries);
 
 	memset(_buildList, 0, 60 * 2);
 	memset(_loadedFilesList, 0, 60 * 4);

Modified: scummvm/trunk/engines/sky/logic.cpp
===================================================================
--- scummvm/trunk/engines/sky/logic.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/sky/logic.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -2510,7 +2510,7 @@
 }
 
 bool Logic::fnPrintf(uint32 a, uint32 b, uint32 c) {
-	printf("fnPrintf: %d\n", a);
+	debug("fnPrintf(%d, %d, %d)", a, b, c);
 	return true;
 }
 

Modified: scummvm/trunk/engines/toon/script_func.cpp
===================================================================
--- scummvm/trunk/engines/toon/script_func.cpp	2010-11-01 21:36:39 UTC (rev 54030)
+++ scummvm/trunk/engines/toon/script_func.cpp	2010-11-01 21:37:47 UTC (rev 54031)
@@ -1072,25 +1072,25 @@
 }
 
 int32 ScriptFunc::sys_Cmd_Set_Ambient_Sfx(EMCState *state) {
-	//printf("Ambient Sfx : %d %d %d %d\n", stackPos(0), stackPos(1), stackPos(2), stackPos(3));
+	//debug("Ambient Sfx : %d %d %d %d", stackPos(0), stackPos(1), stackPos(2), stackPos(3));
 	_vm->getAudioManager()->startAmbientSFX(stackPos(0), stackPos(1), stackPos(2), stackPos(3));
 	return 0;
 }
 
 int32 ScriptFunc::sys_Cmd_Kill_Ambient_Sfx(EMCState *state) {
-	//printf("Kill Sfx : %d \n", stackPos(0));
+	//debug("Kill Sfx : %d", stackPos(0));
 	_vm->getAudioManager()->killAmbientSFX(stackPos(0));
 	return 0;
 }
 
 int32 ScriptFunc::sys_Cmd_Set_Ambient_Sfx_Plus(EMCState *state) {
-	//printf("Ambient Sfx Plus: %d %d %d %d %d %d %d %d\n", stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7));
+	//debug("Ambient Sfx Plus: %d %d %d %d %d %d %d %d", stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7));
 	_vm->getAudioManager()->startAmbientSFX(stackPos(0), stackPos(1), stackPos(2), stackPos(3));
 	return 0;
 }
 
 int32 ScriptFunc::sys_Cmd_Set_Ambient_Volume(EMCState *state) {
-	//printf("Ambient Volume : %d %d \n", stackPos(0), stackPos(1));
+	//debug("Ambient Volume : %d %d", stackPos(0), stackPos(1));
 	_vm->getAudioManager()->setAmbientSFXVolume(stackPos(0), stackPos(1));
 	return 0;
 }


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