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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Nov 1 17:02:28 CET 2010


Revision: 54004
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54004&view=rev
Author:   fingolfin
Date:     2010-11-01 16:02:28 +0000 (Mon, 01 Nov 2010)

Log Message:
-----------
COMMON: Rename String::printf() to String::format()

This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.

The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/wii/options.cpp
    scummvm/trunk/base/commandLine.cpp
    scummvm/trunk/common/str.cpp
    scummvm/trunk/common/str.h
    scummvm/trunk/engines/agos/animation.cpp
    scummvm/trunk/engines/agos/saveload.cpp
    scummvm/trunk/engines/groovie/script.cpp
    scummvm/trunk/engines/hugo/file.cpp
    scummvm/trunk/engines/kyra/resource_intern.cpp
    scummvm/trunk/engines/kyra/saveload.cpp
    scummvm/trunk/engines/kyra/staticres.cpp
    scummvm/trunk/engines/lastexpress/data/scene.cpp
    scummvm/trunk/engines/lastexpress/entities/august.cpp
    scummvm/trunk/engines/lastexpress/entities/entity.h
    scummvm/trunk/engines/lastexpress/game/action.cpp
    scummvm/trunk/engines/lastexpress/game/entities.cpp
    scummvm/trunk/engines/lastexpress/game/inventory.cpp
    scummvm/trunk/engines/lastexpress/game/inventory.h
    scummvm/trunk/engines/lastexpress/game/object.cpp
    scummvm/trunk/engines/lastexpress/game/savepoint.h
    scummvm/trunk/engines/lastexpress/game/scenes.cpp
    scummvm/trunk/engines/lastexpress/game/state.h
    scummvm/trunk/engines/lastexpress/helpers.h
    scummvm/trunk/engines/parallaction/detection.cpp
    scummvm/trunk/engines/sci/detection.cpp
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/engine/kfile.cpp
    scummvm/trunk/engines/sci/engine/kmisc.cpp
    scummvm/trunk/engines/sci/engine/kvideo.cpp
    scummvm/trunk/engines/sci/engine/message.cpp
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/engine/workarounds.cpp
    scummvm/trunk/engines/sci/resource.cpp
    scummvm/trunk/engines/sci/sci.cpp
    scummvm/trunk/engines/scumm/he/logic_he.cpp
    scummvm/trunk/engines/scumm/imuse/imuse.cpp
    scummvm/trunk/engines/teenagent/detection.cpp
    scummvm/trunk/engines/teenagent/teenagent.cpp
    scummvm/trunk/engines/testbed/graphics.cpp
    scummvm/trunk/engines/testbed/misc.cpp
    scummvm/trunk/engines/testbed/sound.cpp
    scummvm/trunk/engines/testbed/testbed.cpp
    scummvm/trunk/engines/testbed/testsuite.cpp
    scummvm/trunk/engines/toon/audio.cpp
    scummvm/trunk/engines/toon/detection.cpp
    scummvm/trunk/engines/toon/toon.cpp
    scummvm/trunk/gui/about.cpp
    scummvm/trunk/test/common/str.h

Modified: scummvm/trunk/backends/platform/wii/options.cpp
===================================================================
--- scummvm/trunk/backends/platform/wii/options.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/backends/platform/wii/options.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -183,7 +183,7 @@
 			break;
 
 		default:
-			label = String::printf(_("Network not initialised (%d)"), status);
+			label = String::format(_("Network not initialised (%d)"), status);
 			break;
 		}
 

Modified: scummvm/trunk/base/commandLine.cpp
===================================================================
--- scummvm/trunk/base/commandLine.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/base/commandLine.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -613,7 +613,7 @@
 				description = g.description();
 		}
 
-		targets.push_back(Common::String::printf("%-20s %s", name.c_str(), description.c_str()));
+		targets.push_back(Common::String::format("%-20s %s", name.c_str(), description.c_str()));
 	}
 
 	Common::sort(targets.begin(), targets.end());

Modified: scummvm/trunk/common/str.cpp
===================================================================
--- scummvm/trunk/common/str.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/common/str.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -430,7 +430,7 @@
 }
 
 // static
-String String::printf(const char *fmt, ...) {
+String String::format(const char *fmt, ...) {
 	String output;
 	assert(output.isStorageIntern());
 

Modified: scummvm/trunk/common/str.h
===================================================================
--- scummvm/trunk/common/str.h	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/common/str.h	2010-11-01 16:02:28 UTC (rev 54004)
@@ -218,7 +218,7 @@
 	/**
 	 * Printf-like function. Returns a formatted String.
 	 */
-	static Common::String printf(const char *fmt, ...) GCC_PRINTF(1,2);
+	static Common::String format(const char *fmt, ...) GCC_PRINTF(1,2);
 
 public:
 	typedef char *        iterator;

Modified: scummvm/trunk/engines/agos/animation.cpp
===================================================================
--- scummvm/trunk/engines/agos/animation.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/agos/animation.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -250,7 +250,7 @@
 		}
 	}
 
-	Common::String videoName = Common::String::printf("%s.dxa", baseName);
+	Common::String videoName = Common::String::format("%s.dxa", baseName);
 	if (!loadFile(videoName))
 		error("Failed to load video file %s", videoName.c_str());
 
@@ -410,7 +410,7 @@
 }
 
 bool MoviePlayerSMK::load() {
-	Common::String videoName = Common::String::printf("%s.smk", baseName);
+	Common::String videoName = Common::String::format("%s.smk", baseName);
 
 	if (!loadFile(videoName))
 		error("Failed to load video file %s", videoName.c_str());

Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/agos/saveload.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -154,7 +154,7 @@
 		Subroutine *sub;
 		success = loadGame(genSaveName(_saveLoadSlot));
 		if (!success) {
-			buf = Common::String::printf(_("Failed to load game state from file:\n\n%s"), filename);
+			buf = Common::String::format(_("Failed to load game state from file:\n\n%s"), filename);
 		} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
 			drawIconArray(2, me(), 0, 0);
 			setBitFlag(97, true);
@@ -189,7 +189,7 @@
 	} else {
 		success = saveGame(_saveLoadSlot, _saveLoadName);
 		if (!success)
-			buf = Common::String::printf(_("Failed to save game state to file:\n\n%s"), filename);
+			buf = Common::String::format(_("Failed to save game state to file:\n\n%s"), filename);
 	}
 
 	if (!success) {
@@ -197,7 +197,7 @@
 		dialog.runModal();
 
 	} else if (_saveLoadType == 1) {
-		buf = Common::String::printf(_("Successfully saved game state in file:\n\n%s"), filename);
+		buf = Common::String::format(_("Successfully saved game state in file:\n\n%s"), filename);
 		GUI::TimedMessageDialog dialog(buf, 1500);
 		dialog.runModal();
 

Modified: scummvm/trunk/engines/groovie/script.cpp
===================================================================
--- scummvm/trunk/engines/groovie/script.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/groovie/script.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -214,7 +214,7 @@
 
 void Script::step() {
 	// Prepare the base debug string
-	_debugString = _scriptFile + Common::String::printf("@0x%04X: ", _currentInstruction);
+	_debugString = _scriptFile + Common::String::format("@0x%04X: ", _currentInstruction);
 
 	// Get the current opcode
 	byte opcode = readScript8bits();
@@ -222,7 +222,7 @@
 	opcode = opcode & 0x7F;
 
 	// Show the opcode debug string
-	_debugString += Common::String::printf("op 0x%02X: ", opcode);
+	_debugString += Common::String::format("op 0x%02X: ", opcode);
 
 	// Only output if we're not re-doing the previous instruction
 	if (_currentInstruction != _oldInstruction) {

Modified: scummvm/trunk/engines/hugo/file.cpp
===================================================================
--- scummvm/trunk/engines/hugo/file.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/hugo/file.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -294,7 +294,7 @@
 	if (slot == -1)
 		path = _vm->_initFilename;
 	else
-		path = Common::String::printf(_vm->_saveFilename.c_str(), slot);
+		path = Common::String::format(_vm->_saveFilename.c_str(), slot);
 
 	Common::WriteStream *out = _vm->getSaveFileManager()->openForSaving(path);
 	if (!out) {
@@ -366,7 +366,7 @@
 	if (slot == -1)
 		path = _vm->_initFilename;
 	else
-		path = Common::String::printf(_vm->_saveFilename.c_str(), slot);
+		path = Common::String::format(_vm->_saveFilename.c_str(), slot);
 
 	Common::SeekableReadStream *in = _vm->getSaveFileManager()->openForLoading(path);
 	if (!in)

Modified: scummvm/trunk/engines/kyra/resource_intern.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource_intern.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/kyra/resource_intern.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -102,7 +102,7 @@
 	uint count = 0;
 
 	for (; count < _entryCount; ++count) {
-		const Common::String name = Common::String::printf("%08u.AUD", _fileEntries[count * 2 + 0]);
+		const Common::String name = Common::String::format("%08u.AUD", _fileEntries[count * 2 + 0]);
 		list.push_back(Common::ArchiveMemberList::value_type(new Common::GenericArchiveMember(name, this)));
 	}
 

Modified: scummvm/trunk/engines/kyra/saveload.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/kyra/saveload.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -230,7 +230,7 @@
 
 Common::String KyraEngine_v1::getSavegameFilename(const Common::String &target, int num) {
 	assert(num >= 0 && num <= 999);
-	return target + Common::String::printf(".%03d", num);
+	return target + Common::String::format(".%03d", num);
 }
 
 bool KyraEngine_v1::saveFileLoadable(int slot) {

Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/kyra/staticres.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -209,7 +209,7 @@
 		return false;
 
 	// load the ID map for our game
-	const Common::String filenamePattern = Common::String::printf("0%01X%01X%01X000%01X", game, platform, special, lang);
+	const Common::String filenamePattern = Common::String::format("0%01X%01X%01X000%01X", game, platform, special, lang);
 	Common::SeekableReadStream *idMap = _vm->resource()->createReadStream(filenamePattern);
 	if (!idMap)
 		return false;
@@ -328,7 +328,7 @@
 	ResData data;
 	data.id = id;
 	data.type = dDesc->_value.type;
-	Common::SeekableReadStream *fileStream = _vm->resource()->createReadStream(Common::String::printf("%08X", dDesc->_value.filename));
+	Common::SeekableReadStream *fileStream = _vm->resource()->createReadStream(Common::String::format("%08X", dDesc->_value.filename));
 	if (!fileStream)
 		return false;
 

Modified: scummvm/trunk/engines/lastexpress/data/scene.cpp
===================================================================
--- scummvm/trunk/engines/lastexpress/data/scene.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/data/scene.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -79,7 +79,7 @@
 Common::String SceneHotspot::toString() const {
 	Common::String output = "";
 
-	output += Common::String::printf("    hotspot: scene=%d location=%02d action=%d param1=%02d param2=%02d param3=%02d cursor=%02d rect=(%d, %d)x(%d, %d)",
+	output += Common::String::format("    hotspot: scene=%d location=%02d action=%d param1=%02d param2=%02d param3=%02d cursor=%02d rect=(%d, %d)x(%d, %d)",
 	                                   scene, location, action, param1, param2, param3, cursor, rect.left, rect.top, rect.right, rect.bottom);
 
 	return output;
@@ -209,9 +209,9 @@
 Common::String Scene::toString() {
 	Common::String output = "";
 
-	output += Common::String::printf("Scene:  name=%s, sig=%02d, entityPosition=%d, location=%d\n", _name, _sig, entityPosition, location);
-	output += Common::String::printf("        car=%02d, position=%02d, type=%02d, param1=%02d\n", car, position, type, param1);
-	output += Common::String::printf("        param2=%02d, param3=%02d, hotspot=%d\n", param2, param3, _hotspot);
+	output += Common::String::format("Scene:  name=%s, sig=%02d, entityPosition=%d, location=%d\n", _name, _sig, entityPosition, location);
+	output += Common::String::format("        car=%02d, position=%02d, type=%02d, param1=%02d\n", car, position, type, param1);
+	output += Common::String::format("        param2=%02d, param3=%02d, hotspot=%d\n", param2, param3, _hotspot);
 
 	// Hotspots
 	if (_hotspots.size() != 0) {

Modified: scummvm/trunk/engines/lastexpress/entities/august.cpp
===================================================================
--- scummvm/trunk/engines/lastexpress/entities/august.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/entities/august.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -455,11 +455,11 @@
 		}
 
 		if (params->param1) {
-			strcpy((char *)&parameters->seq2, Common::String::printf("%s%s", (char *)&parameters->seq1, "Gc").c_str());
+			strcpy((char *)&parameters->seq2, Common::String::format("%s%s", (char *)&parameters->seq1, "Gc").c_str());
 
 			getObjects()->update(kObjectCompartment3, kEntityPlayer, kObjectLocation1, kCursorKeepValue, kCursorKeepValue);
 		} else {
-			strcpy((char *)&parameters->seq2, Common::String::printf("%s%s", (char *)&parameters->seq1, "Ec").c_str());
+			strcpy((char *)&parameters->seq2, Common::String::format("%s%s", (char *)&parameters->seq1, "Ec").c_str());
 		}
 
 		setCallback(1);
@@ -474,7 +474,7 @@
 		case 1: {
 			getData()->location = kLocationOutsideCompartment;
 
-			Common::String sequence2 = Common::String::printf("%s%s", (char *)&parameters->seq2, "Pc");
+			Common::String sequence2 = Common::String::format("%s%s", (char *)&parameters->seq2, "Pc");
 			strcpy((char *)&parameters->seq2, (char *)&parameters->seq1);
 
 			getEntities()->drawSequenceLeft(kEntityAugust, sequence2.c_str());
@@ -493,7 +493,7 @@
 		case 2:
 		case 3:
 			getSavePoints()->push(kEntityAugust, kEntityMertens, kAction269436673);
-			strcpy((char *)&parameters->seq2, Common::String::printf("%s%s", (char *)&parameters->seq1, "Qc").c_str());
+			strcpy((char *)&parameters->seq2, Common::String::format("%s%s", (char *)&parameters->seq1, "Qc").c_str());
 
 			getEntities()->drawSequenceLeft(kEntityAugust, (char *)&parameters->seq2);
 			break;

Modified: scummvm/trunk/engines/lastexpress/entities/entity.h
===================================================================
--- scummvm/trunk/engines/lastexpress/entities/entity.h	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/entities/entity.h	2010-11-01 16:02:28 UTC (rev 54004)
@@ -79,7 +79,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("IIII: %d %d %d %d %d %d %d %d\n", param1, param2, param3, param4, param5, param6, param7, param8);
+			return Common::String::format("IIII: %d %d %d %d %d %d %d %d\n", param1, param2, param3, param4, param5, param6, param7, param8);
 		}
 
 		void update(uint32 index) {
@@ -128,7 +128,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("SIII: %s %d %d %d %d %d\n", seq, param4, param5, param6, param7, param8);
+			return Common::String::format("SIII: %s %d %d %d %d %d\n", seq, param4, param5, param6, param7, param8);
 		}
 
 		void update(uint32 index) {
@@ -168,7 +168,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("SIIS: %s %d %d %s\n", seq1, param4, param5, seq2);
+			return Common::String::format("SIIS: %s %d %d %s\n", seq1, param4, param5, seq2);
 		}
 
 		void update(uint32 index) {
@@ -203,7 +203,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("ISSI: %d %s %s %d\n", param1, seq1, seq2, param8);
+			return Common::String::format("ISSI: %d %s %s %d\n", param1, seq1, seq2, param8);
 		}
 
 		void update(uint32 index) {
@@ -242,7 +242,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("ISII: %d %s %d %d %d %d\n", param1, seq, param5, param6, param7, param8);
+			return Common::String::format("ISII: %d %s %d %d %d %d\n", param1, seq, param5, param6, param7, param8);
 		}
 
 		void update(uint32 index) {
@@ -282,7 +282,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("SSII: %s %s %d %d\n", seq1, seq2, param7, param8);
+			return Common::String::format("SSII: %s %s %d %d\n", seq1, seq2, param7, param8);
 		}
 
 		void update(uint32 index) {
@@ -315,7 +315,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("SSS: %s %s %s\n", seq1, seq2, seq3);
+			return Common::String::format("SSS: %s %s %s\n", seq1, seq2, seq3);
 		}
 
 		void update(uint32) {
@@ -343,7 +343,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("IISS: %d %d %s %s\n", param1, param2, seq1, seq2);
+			return Common::String::format("IISS: %d %d %s %s\n", param1, param2, seq1, seq2);
 		}
 
 		void update(uint32 index) {
@@ -382,7 +382,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("IISI: %d %d %s %d %d %d\n", param1, param2, seq, param6, param7, param8);
+			return Common::String::format("IISI: %d %d %s %d %d %d\n", param1, param2, seq, param6, param7, param8);
 		}
 
 		void update(uint32 index) {
@@ -426,7 +426,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("IIIS: %d %d %d %s %d %d\n", param1, param2, param3, seq, param7, param8);
+			return Common::String::format("IIIS: %d %d %d %s %d %d\n", param1, param2, param3, seq, param7, param8);
 		}
 
 		void update(uint32 index) {
@@ -579,20 +579,20 @@
 		Common::String toString() {
 			Common::String str = "";
 
-			str += Common::String::printf("Entity position: %d    - Location: %d       - Car: %d\n", entityPosition, location, car);
-			str += Common::String::printf("Entity: %d             - Item: %d          - Direction: %d\n", entity, inventoryItem, direction);
-			str += Common::String::printf("Clothes: %d            - Position: %d      - Direction switch: %d\n", clothes, position, directionSwitch);
+			str += Common::String::format("Entity position: %d    - Location: %d       - Car: %d\n", entityPosition, location, car);
+			str += Common::String::format("Entity: %d             - Item: %d          - Direction: %d\n", entity, inventoryItem, direction);
+			str += Common::String::format("Clothes: %d            - Position: %d      - Direction switch: %d\n", clothes, position, directionSwitch);
 			str += "\n";
-			str += Common::String::printf("field_497: %02d        - field_49B: %i     - field_4A1: %i\n", field_497, field_49B, field_4A1);
-			str += Common::String::printf("field_4A9: %02d        - field_4AA: %i     - Car 2: %d\n", field_4A9, field_4AA, car2);
+			str += Common::String::format("field_497: %02d        - field_49B: %i     - field_4A1: %i\n", field_497, field_49B, field_4A1);
+			str += Common::String::format("field_4A9: %02d        - field_4AA: %i     - Car 2: %d\n", field_4A9, field_4AA, car2);
 			str += "\n";
 			str += "Sequence: " + sequenceName + "                 - Sequence 2: " + sequenceName2 + "\n";
 			str += "Sequence prefix: " + sequenceNamePrefix + "    - Sequence copy: " + sequenceNameCopy + "\n";
-			str += Common::String::printf("Current frame: %i    - Current frame 2: %i       - Process entity: %d\n", currentFrame, currentFrame2, doProcessEntity);
+			str += Common::String::format("Current frame: %i    - Current frame 2: %i       - Process entity: %d\n", currentFrame, currentFrame2, doProcessEntity);
 			str += "\n";
-			str += Common::String::printf("Current call: %d\n", currentCall);
-			str += Common::String::printf("Functions: %d %d %d %d %d %d %d %d\n", callbacks[0], callbacks[1], callbacks[2], callbacks[3], callbacks[4], callbacks[5], callbacks[6], callbacks[7]);
-			str += Common::String::printf("Callbacks: %d %d %d %d %d %d %d %d\n", callbacks[8], callbacks[9], callbacks[10], callbacks[11], callbacks[12], callbacks[13], callbacks[14], callbacks[15]);
+			str += Common::String::format("Current call: %d\n", currentCall);
+			str += Common::String::format("Functions: %d %d %d %d %d %d %d %d\n", callbacks[0], callbacks[1], callbacks[2], callbacks[3], callbacks[4], callbacks[5], callbacks[6], callbacks[7]);
+			str += Common::String::format("Callbacks: %d %d %d %d %d %d %d %d\n", callbacks[8], callbacks[9], callbacks[10], callbacks[11], callbacks[12], callbacks[13], callbacks[14], callbacks[15]);
 
 			return str;
 		}

Modified: scummvm/trunk/engines/lastexpress/game/action.cpp
===================================================================
--- scummvm/trunk/engines/lastexpress/game/action.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/game/action.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -454,7 +454,7 @@
 IMPLEMENT_ACTION(playSound)
 
 	// Check that the file is not already buffered
-	if (hotspot.param2 || !getSound()->isBuffered(Common::String::printf("LIB%03d", hotspot.param1), true))
+	if (hotspot.param2 || !getSound()->isBuffered(Common::String::format("LIB%03d", hotspot.param1), true))
 		getSound()->playSoundEvent(kEntityPlayer, hotspot.param1, hotspot.param2);
 
 	return kSceneInvalid;
@@ -464,7 +464,7 @@
 // Action 4
 IMPLEMENT_ACTION(playMusic)
 	// Check that the file is not already buffered
-	Common::String filename = Common::String::printf("MUS%03d", hotspot.param1);
+	Common::String filename = Common::String::format("MUS%03d", hotspot.param1);
 
 	if (!getSound()->isBuffered(filename) && (hotspot.param1 != 50 || getProgress().chapter == kChapter5))
 		getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault, hotspot.param2);
@@ -1182,7 +1182,7 @@
 	getProgress().field_C = 1;
 	getSound()->playSoundEvent(kEntityPlayer, hotspot.param1, hotspot.param2);
 
-	Common::String filename = Common::String::printf("MUS%03d", hotspot.param3);
+	Common::String filename = Common::String::format("MUS%03d", hotspot.param3);
 	if (!getSound()->isBuffered(filename))
 		getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault);
 
@@ -1407,7 +1407,7 @@
 	}
 
 	if (id) {
-		Common::String filename = Common::String::printf("MUS%03d", id);
+		Common::String filename = Common::String::format("MUS%03d", id);
 
 		if (!getSound()->isBuffered(filename))
 			getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault);
@@ -1439,7 +1439,7 @@
 		break;
 	}
 
-	Common::String filename = Common::String::printf("MUS%03d", hotspot.param1);
+	Common::String filename = Common::String::format("MUS%03d", hotspot.param1);
 
 	if (!getSound()->isBuffered(filename) && hotspot.param3 & id) {
 		getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault);

Modified: scummvm/trunk/engines/lastexpress/game/entities.cpp
===================================================================
--- scummvm/trunk/engines/lastexpress/game/entities.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/game/entities.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -1532,7 +1532,7 @@
 
 		case 1:
 			if (data->entityPosition < kPosition_2587)
-				sequence1 = Common::String::printf("%02d%01d-01u.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-01u.seq", index, data->clothes);
 			break;
 
 		case 2:
@@ -1554,22 +1554,22 @@
 				break;
 
 			if (data->entityPosition >= kPosition_8513) {
-				sequence1 = Common::String::printf("%02d%01d-%02deu.seq", index, data->clothes, position);
+				sequence1 = Common::String::format("%02d%01d-%02deu.seq", index, data->clothes, position);
 			} else {
-				sequence1 = Common::String::printf("%02d%01d-03u.seq", index, data->clothes);
-				sequence2 = Common::String::printf("%02d%01d-%02deu.seq", index, data->clothes, position);
+				sequence1 = Common::String::format("%02d%01d-03u.seq", index, data->clothes);
+				sequence2 = Common::String::format("%02d%01d-%02deu.seq", index, data->clothes, position);
 				data->field_4A9 = true;
 			}
 			break;
 
 		case 18:
 			if (data->entityPosition < kPosition_9270)
-				sequence1 = Common::String::printf("%02d%01d-18u.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-18u.seq", index, data->clothes);
 			break;
 
 		case 22:
 			if (getData(kEntityPlayer)->entityPosition > data->entityPosition)
-				sequence1 = Common::String::printf("%02d%01d-22u.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-22u.seq", index, data->clothes);
 			break;
 
 		case 23:
@@ -1592,18 +1592,18 @@
 				break;
 
 			if (data->entityPosition >= kPosition_2087) {
-				sequence1 = Common::String::printf("%02d%01d-38u.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-38u.seq", index, data->clothes);
 				data->field_4A9 = true;
 			} else {
-				sequence1 = Common::String::printf("%02d%01d-%02deu.seq", index, data->clothes, position);
-				sequence2 = Common::String::printf("%02d%01d-38u.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-%02deu.seq", index, data->clothes, position);
+				sequence2 = Common::String::format("%02d%01d-38u.seq", index, data->clothes);
 				data->field_4AA = true;
 			}
 			break;
 
 		case 40:
 			if (getData(kEntityPlayer)->entityPosition > data->entityPosition)
-				sequence1 = Common::String::printf("%02d%01d-40u.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-40u.seq", index, data->clothes);
 			break;
 		}
 		break;
@@ -1615,7 +1615,7 @@
 
 		case 1:
 			if (getData(kEntityPlayer)->entityPosition < data->entityPosition)
-				sequence1 = Common::String::printf("%02d%01d-01d.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-01d.seq", index, data->clothes);
 			break;
 
 		case 2:
@@ -1637,23 +1637,23 @@
 				break;
 
 			if (data->entityPosition <= kPosition_8513) {
-				sequence1 = Common::String::printf("%02d%01d-03d.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-03d.seq", index, data->clothes);
 				data->field_4A9 = true;
 			} else {
-				sequence1 = Common::String::printf("%02d%01d-%02ded.seq", index, data->clothes, position);
-				sequence2 = Common::String::printf("%02d%01d-03d.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-%02ded.seq", index, data->clothes, position);
+				sequence2 = Common::String::format("%02d%01d-03d.seq", index, data->clothes);
 				data->field_4AA = true;
 			}
 			break;
 
 		case 18:
 			if (getData(kEntityPlayer)->entityPosition < data->entityPosition)
-				sequence1 = Common::String::printf("%02d%01d-18d.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-18d.seq", index, data->clothes);
 			break;
 
 		case 22:
 			if (data->entityPosition > kPosition_850)
-				sequence1 = Common::String::printf("%02d%01d-22d.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-22d.seq", index, data->clothes);
 			break;
 
 		case 23:
@@ -1676,17 +1676,17 @@
 				break;
 
 			if (data->entityPosition <= kPosition_2087) {
-				sequence1 = Common::String::printf("%02d%01d-%02ded.seq", index, data->clothes, position);
+				sequence1 = Common::String::format("%02d%01d-%02ded.seq", index, data->clothes, position);
 			} else {
-				sequence1 = Common::String::printf("%02d%01d-38d.seq", index, data->clothes);
-				sequence2 = Common::String::printf("%02d%01d-%02ded.seq", index, data->clothes, position);
+				sequence1 = Common::String::format("%02d%01d-38d.seq", index, data->clothes);
+				sequence2 = Common::String::format("%02d%01d-%02ded.seq", index, data->clothes, position);
 				data->field_4A9 = true;
 			}
 			break;
 
 		case 40:
 			if (getData(kEntityPlayer)->entityPosition > kPosition_8013)
-				sequence1 = Common::String::printf("%02d%01d-40d.seq", index, data->clothes);
+				sequence1 = Common::String::format("%02d%01d-40d.seq", index, data->clothes);
 			break;
 		}
 		break;
@@ -1694,7 +1694,7 @@
 	// First part of sequence is already set
 	case kDirectionLeft:
 	case kDirectionRight:
-		sequence1 = Common::String::printf("%s%02d.seq", data->sequenceNamePrefix.c_str(), position);
+		sequence1 = Common::String::format("%s%02d.seq", data->sequenceNamePrefix.c_str(), position);
 		break;
 	}
 }

Modified: scummvm/trunk/engines/lastexpress/game/inventory.cpp
===================================================================
--- scummvm/trunk/engines/lastexpress/game/inventory.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/game/inventory.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -422,7 +422,7 @@
 	Common::String ret = "";
 
 	for (int i = 0; i < kPortraitOriginal; i++)
-		ret += Common::String::printf("%d : %s\n", i, _entries[i].toString().c_str());
+		ret += Common::String::format("%d : %s\n", i, _entries[i].toString().c_str());
 
 	return ret;
 }

Modified: scummvm/trunk/engines/lastexpress/game/inventory.h
===================================================================
--- scummvm/trunk/engines/lastexpress/game/inventory.h	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/game/inventory.h	2010-11-01 16:02:28 UTC (rev 54004)
@@ -76,7 +76,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf("{ %d - %d - %d - %d - %d - %d - %d }", cursor, scene, field_2, isSelectable, isPresent, manualSelect, location);
+			return Common::String::format("{ %d - %d - %d - %d - %d - %d - %d }", cursor, scene, field_2, isSelectable, isPresent, manualSelect, location);
 		}
 
 		void saveLoadWithSerializer(Common::Serializer &s) {

Modified: scummvm/trunk/engines/lastexpress/game/object.cpp
===================================================================
--- scummvm/trunk/engines/lastexpress/game/object.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/game/object.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -35,7 +35,7 @@
 namespace LastExpress {
 
 Common::String Objects::Object::toString() {
-	return Common::String::printf("{ %s - %d - %d - %d - %d }", ENTITY_NAME(entity), location, cursor, cursor2, location2);
+	return Common::String::format("{ %s - %d - %d - %d - %d }", ENTITY_NAME(entity), location, cursor, cursor2, location2);
 }
 
 Objects::Objects(LastExpressEngine *engine) : _engine(engine) {}
@@ -101,7 +101,7 @@
 	Common::String ret = "";
 
 	for (int i = 0; i < ARRAYSIZE(_objects); i++)
-		ret += Common::String::printf("%d : %s\n", i, _objects[i].toString().c_str());
+		ret += Common::String::format("%d : %s\n", i, _objects[i].toString().c_str());
 
 	return ret;
 }

Modified: scummvm/trunk/engines/lastexpress/game/savepoint.h
===================================================================
--- scummvm/trunk/engines/lastexpress/game/savepoint.h	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/game/savepoint.h	2010-11-01 16:02:28 UTC (rev 54004)
@@ -73,7 +73,7 @@
 	}
 
 	Common::String toString() {
-		return Common::String::printf("{ %s - %d - %s - %s }", ENTITY_NAME(entity1), action, ENTITY_NAME(entity2), param.charValue);
+		return Common::String::format("{ %s - %d - %s - %s }", ENTITY_NAME(entity1), action, ENTITY_NAME(entity2), param.charValue);
 	}
 };
 
@@ -97,7 +97,7 @@
 		}
 
 		Common::String toString() {
-			return Common::String::printf(" { %s - %d - %s - %d }", ENTITY_NAME(entity1), action, ENTITY_NAME(entity2), param);
+			return Common::String::format(" { %s - %d - %s - %d }", ENTITY_NAME(entity1), action, ENTITY_NAME(entity2), param);
 		}
 	};
 

Modified: scummvm/trunk/engines/lastexpress/game/scenes.cpp
===================================================================
--- scummvm/trunk/engines/lastexpress/game/scenes.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/game/scenes.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -78,7 +78,7 @@
 	case kArchiveCd1:
 	case kArchiveCd2:
 	case kArchiveCd3:
-		if (!_sceneLoader->load(getArchive(Common::String::printf("CD%iTRAIN.DAT", archive))))
+		if (!_sceneLoader->load(getArchive(Common::String::format("CD%iTRAIN.DAT", archive))))
 			error("SceneManager::loadSceneDataFile: cannot load data file CD%iTRAIN.DAT", archive);
 		break;
 
@@ -586,7 +586,7 @@
 
 			// Load door sequence
 			Scene *scene = getScenes()->get(getState()->scene);
-			Common::String name = Common::String::printf("633X%c-%02d.seq", (index - firstIndex) + 65, scene->position);
+			Common::String name = Common::String::format("633X%c-%02d.seq", (index - firstIndex) + 65, scene->position);
 			Sequence *sequence = loadSequence1(name, 255);
 
 			// If the sequence doesn't exists, skip

Modified: scummvm/trunk/engines/lastexpress/game/state.h
===================================================================
--- scummvm/trunk/engines/lastexpress/game/state.h	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/game/state.h	2010-11-01 16:02:28 UTC (rev 54004)
@@ -466,7 +466,7 @@
 			for (uint i = 0; i < 128; i++) {
 				Common::String name = "";
 				uint val = getValueName(i, &name);
-				ret += Common::String::printf("(%03d) %s = %d\n", i, name.c_str(), val);
+				ret += Common::String::format("(%03d) %s = %d\n", i, name.c_str(), val);
 			}
 
 			return ret;
@@ -527,9 +527,9 @@
 			uint8 minutes = 0;
 			getHourMinutes(time, &hours, &minutes);
 
-			ret += Common::String::printf("Time: %d (%d:%d)   - Time delta: %d    - Ticks: %d\n", time, hours, minutes, timeDelta, timeTicks);
-			ret += Common::String::printf("Brightness: %d    - Volume: %d    - UseBackup: %d\n", brightness, volume, sceneUseBackup);
-			ret += Common::String::printf("Scene: %d    - Scene backup: %d    - Scene backup 2: %d\n", scene, sceneBackup, sceneBackup2);
+			ret += Common::String::format("Time: %d (%d:%d)   - Time delta: %d    - Ticks: %d\n", time, hours, minutes, timeDelta, timeTicks);
+			ret += Common::String::format("Brightness: %d    - Volume: %d    - UseBackup: %d\n", brightness, volume, sceneUseBackup);
+			ret += Common::String::format("Scene: %d    - Scene backup: %d    - Scene backup 2: %d\n", scene, sceneBackup, sceneBackup2);
 
 			return ret;
 		}
@@ -598,11 +598,11 @@
 		Common::String toString() {
 			Common::String ret = "";
 
-			ret += Common::String::printf("Unknown: 0:%02d  -  3:%02d  -  4:%02d  -  5:%02d\n", flag_0, flag_3, flag_4, flag_5);
-			ret += Common::String::printf("FrameInterval: %02d  -  ShouldRedraw:%02d  -  ShouldDrawEggOrHourGlass:%02d\n", frameInterval, shouldRedraw, shouldDrawEggOrHourGlass);
-			ret += Common::String::printf("IsGameRunning: %02d\n", isGameRunning);
-			ret += Common::String::printf("Mouse: RightClick:%02d  - LeftClick:%02d\n", mouseRightClick, mouseLeftClick);
-			ret += Common::String::printf("Entities: 0:%02d  -  1:%02d\n", flag_entities_0, flag_entities_1);
+			ret += Common::String::format("Unknown: 0:%02d  -  3:%02d  -  4:%02d  -  5:%02d\n", flag_0, flag_3, flag_4, flag_5);
+			ret += Common::String::format("FrameInterval: %02d  -  ShouldRedraw:%02d  -  ShouldDrawEggOrHourGlass:%02d\n", frameInterval, shouldRedraw, shouldDrawEggOrHourGlass);
+			ret += Common::String::format("IsGameRunning: %02d\n", isGameRunning);
+			ret += Common::String::format("Mouse: RightClick:%02d  - LeftClick:%02d\n", mouseRightClick, mouseLeftClick);
+			ret += Common::String::format("Entities: 0:%02d  -  1:%02d\n", flag_entities_0, flag_entities_1);
 
 			return ret;
 		}

Modified: scummvm/trunk/engines/lastexpress/helpers.h
===================================================================
--- scummvm/trunk/engines/lastexpress/helpers.h	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/lastexpress/helpers.h	2010-11-01 16:02:28 UTC (rev 54004)
@@ -94,7 +94,7 @@
 extern const char *g_directionNames[];
 extern const char *g_entityNames[];
 
-#define ACTION_NAME(action) (action > 18 ? Common::String::printf("%d", action).c_str() : g_actionNames[action])
+#define ACTION_NAME(action) (action > 18 ? Common::String::format("%d", action).c_str() : g_actionNames[action])
 #define DIRECTION_NAME(direction) (direction >= 6 ? "INVALID" : g_directionNames[direction])
 #define ENTITY_NAME(index) (index >= 40 ? "INVALID" : g_entityNames[index])
 

Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/parallaction/detection.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -325,7 +325,7 @@
 
 void ParallactionMetaEngine::removeSaveState(const char *target, int slot) const {
 	Common::String filename = ConfMan.getDomain(target)->getVal("gameid");
-	filename += Common::String::printf(".0%02d", slot);
+	filename += Common::String::format(".0%02d", slot);
 
 	g_system->getSavefileManager()->removeSavefile(filename);
 }

Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/detection.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -676,7 +676,7 @@
 }
 
 SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
-	Common::String fileName = Common::String::printf("%s.%03d", target, slot);
+	Common::String fileName = Common::String::format("%s.%03d", target, slot);
 	Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName);
 
 	if (in) {
@@ -727,12 +727,12 @@
 int SciMetaEngine::getMaximumSaveSlot() const { return 99; }
 
 void SciMetaEngine::removeSaveState(const char *target, int slot) const {
-	Common::String fileName = Common::String::printf("%s.%03d", target, slot);
+	Common::String fileName = Common::String::format("%s.%03d", target, slot);
 	g_system->getSavefileManager()->removeSavefile(fileName);
 }
 
 Common::Error SciEngine::loadGameState(int slot) {
-	Common::String fileName = Common::String::printf("%s.%03d", _targetName.c_str(), slot);
+	Common::String fileName = Common::String::format("%s.%03d", _targetName.c_str(), slot);
 	Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
 	Common::SeekableReadStream *in = saveFileMan->openForLoading(fileName);
 
@@ -751,7 +751,7 @@
 }
 
 Common::Error SciEngine::saveGameState(int slot, const char *desc) {
-	Common::String fileName = Common::String::printf("%s.%03d", _targetName.c_str(), slot);
+	Common::String fileName = Common::String::format("%s.%03d", _targetName.c_str(), slot);
 	Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
 	Common::OutSaveFile *out = saveFileMan->openForSaving(fileName);
 	const char *version = "";

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -66,12 +66,12 @@
 		//  We need this for proper workaround tables
 		// TODO: maybe check, if there is a fixed selector-table and error() out in that case
 		for (uint loopSelector = _selectorNames.size(); loopSelector <= selector; ++loopSelector)
-			_selectorNames.push_back(Common::String::printf("<noname%d>", loopSelector));
+			_selectorNames.push_back(Common::String::format("<noname%d>", loopSelector));
 	}
 
 	// Ensure that the selector has a name
 	if (_selectorNames[selector].empty())
-		_selectorNames[selector] = Common::String::printf("<noname%d>", selector);
+		_selectorNames[selector] = Common::String::format("<noname%d>", selector);
 
 	return _selectorNames[selector];
 }

Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -584,7 +584,7 @@
 			g_system->getTimeAndDate(curTime);
 			curTime.tm_year += 1900; // fixup year
 			curTime.tm_mon++; // fixup month
-			game_description = Common::String::printf("%02d.%02d.%04d / %02d:%02d:%02d", curTime.tm_mday, curTime.tm_mon, curTime.tm_year, curTime.tm_hour, curTime.tm_min, curTime.tm_sec);
+			game_description = Common::String::format("%02d.%02d.%04d / %02d:%02d:%02d", curTime.tm_mday, curTime.tm_mon, curTime.tm_year, curTime.tm_hour, curTime.tm_min, curTime.tm_sec);
 		}
 		delete dialog;
 		g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save)

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -424,12 +424,12 @@
 	}
 
 	Common::String warningMsg = "Dummy function k" + kernel->getKernelName(kernelCallNr) +
-								Common::String::printf("[%x]", kernelCallNr) +
+								Common::String::format("[%x]", kernelCallNr) +
 								" invoked. Params: " +
-								Common::String::printf("%d", argc) + " (";
+								Common::String::format("%d", argc) + " (";
 
 	for (int i = 0; i < argc; i++) {
-		warningMsg +=  Common::String::printf("%04x:%04x", PRINT_REG(argv[i]));
+		warningMsg +=  Common::String::format("%04x:%04x", PRINT_REG(argv[i]));
 		warningMsg += (i == argc - 1 ? ")" : ", ");
 	}
 

Modified: scummvm/trunk/engines/sci/engine/kvideo.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kvideo.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/engine/kvideo.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -287,10 +287,10 @@
 		// Looks to be setting the video size and position. Called with 4 extra integer
 		// parameters (e.g. 86, 41, 235, 106)
 	default:
-		warningMsg = Common::String::printf("PlayVMD - unsupported subop %d. Params: %d (", operation, argc);
+		warningMsg = Common::String::format("PlayVMD - unsupported subop %d. Params: %d (", operation, argc);
 
 		for (int i = 0; i < argc; i++) {
-			warningMsg +=  Common::String::printf("%04x:%04x", PRINT_REG(argv[i]));
+			warningMsg +=  Common::String::format("%04x:%04x", PRINT_REG(argv[i]));
 			warningMsg += (i == argc - 1 ? ")" : ", ");
 		}
 

Modified: scummvm/trunk/engines/sci/engine/message.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/message.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/engine/message.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -218,7 +218,7 @@
 			return record.talker;
 		} else {
 			MessageTuple &t = _cursorStack.top();
-			outputString(buf, Common::String::printf("Msg %d: %d %d %d %d not found", _cursorStack.getModule(), t.noun, t.verb, t.cond, t.seq));
+			outputString(buf, Common::String::format("Msg %d: %d %d %d %d not found", _cursorStack.getModule(), t.noun, t.verb, t.cond, t.seq));
 			return 0;
 		}
 	} else {

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -144,13 +144,13 @@
 	const char *names[4] = {"global", "local", "temp", "param"};
 
 	if (index < 0 || index >= max) {
-		Common::String txt = Common::String::printf(
+		Common::String txt = Common::String::format(
 							"[VM] Attempt to use invalid %s variable %04x ",
 							names[type], index);
 		if (max == 0)
 			txt += "(variable type invalid)";
 		else
-			txt += Common::String::printf("(out of range [%d..%d])", 0, max - 1);
+			txt += Common::String::format("(out of range [%d..%d])", 0, max - 1);
 
 		if (type == VAR_PARAM || type == VAR_TEMP) {
 			int total_offset = r - stack_base;

Modified: scummvm/trunk/engines/sci/engine/workarounds.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/workarounds.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/engine/workarounds.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -463,7 +463,7 @@
 			curMethodName = g_sci->getKernel()->getSelectorName(lastCall->debugSelector);
 		} else if (lastCall->debugExportId != -1) {
 			curObjectName = "";
-			curMethodName = curMethodName.printf("export %d", lastCall->debugExportId);
+			curMethodName = Common::String::format("export %d", lastCall->debugExportId);
 		}
 	}
 

Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/resource.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -779,7 +779,7 @@
 }
 
 void ResourceManager::addResourcesFromChunk(uint16 id) {
-	addSource(new ChunkResourceSource(Common::String::printf("Chunk %d", id), id));
+	addSource(new ChunkResourceSource(Common::String::format("Chunk %d", id), id));
 	scanNewSources();
 }
 

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/sci/sci.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -743,7 +743,7 @@
 }
 
 Common::String SciEngine::getSavegameName(int nr) const {
-	return _targetName + Common::String::printf(".%03d", nr);
+	return _targetName + Common::String::format(".%03d", nr);
 }
 
 Common::String SciEngine::getSavegamePattern() const {

Modified: scummvm/trunk/engines/scumm/he/logic_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/logic_he.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/scumm/he/logic_he.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -77,11 +77,11 @@
 #if 1
 	Common::String str;
 
-	str = Common::String::printf("LogicHE::dispatch(%d, %d, [", op, numArgs);
+	str = Common::String::format("LogicHE::dispatch(%d, %d, [", op, numArgs);
 	if (numArgs > 0)
-		str += Common::String::printf("%d", args[0]);
+		str += Common::String::format("%d", args[0]);
 	for (int i = 1; i < numArgs; i++) {
-		str += Common::String::printf(", %d", args[i]);
+		str += Common::String::format(", %d", args[i]);
 	}
 	str += "])";
 

Modified: scummvm/trunk/engines/scumm/imuse/imuse.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse/imuse.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/scumm/imuse/imuse.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -700,9 +700,9 @@
 
 	{
 		Common::String string = "doCommand - ";
-		string += Common::String::printf("%d (%d/%d)", a[0], (int)param, (int)cmd);
+		string += Common::String::format("%d (%d/%d)", a[0], (int)param, (int)cmd);
 		for (i = 1; i < numargs; ++i)
-			string += Common::String::printf(", %d", a[i]);
+			string += Common::String::format(", %d", a[i]);
 		debugC(DEBUG_IMUSE, "%s", string.c_str());
 	}
 

Modified: scummvm/trunk/engines/teenagent/detection.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/detection.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/teenagent/detection.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -137,7 +137,7 @@
 //	}
 
 	static Common::String generateGameStateFileName(const char *target, int slot) {
-		return Common::String::printf("%s.%02d", target, slot);
+		return Common::String::format("%s.%02d", target, slot);
 	}
 
 	virtual SaveStateList listSaves(const char *target) const {

Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -197,9 +197,9 @@
 Common::Error TeenAgentEngine::loadGameState(int slot) {
 	debug(0, "loading from slot %d", slot);
 	Common::ScopedPtr<Common::InSaveFile> 
-		in(_saveFileMan->openForLoading(Common::String::printf("teenagent.%02d", slot)));
+		in(_saveFileMan->openForLoading(Common::String::format("teenagent.%02d", slot)));
 	if (!in)
-		in.reset(_saveFileMan->openForLoading(Common::String::printf("teenagent.%d", slot)));
+		in.reset(_saveFileMan->openForLoading(Common::String::format("teenagent.%d", slot)));
 
 	if (!in)
 		return Common::kReadPermissionDenied;
@@ -232,7 +232,7 @@
 
 Common::Error TeenAgentEngine::saveGameState(int slot, const char *desc) {
 	debug(0, "saving to slot %d", slot);
-	Common::ScopedPtr<Common::OutSaveFile> out(_saveFileMan->openForSaving(Common::String::printf("teenagent.%02d", slot)));
+	Common::ScopedPtr<Common::OutSaveFile> out(_saveFileMan->openForSaving(Common::String::format("teenagent.%02d", slot)));
 	if (!out)
 		return Common::kWritingFailed;
 

Modified: scummvm/trunk/engines/testbed/graphics.cpp
===================================================================
--- scummvm/trunk/engines/testbed/graphics.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/testbed/graphics.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -769,7 +769,7 @@
 		// Switch Graphics mode
 		// FIXME: Crashes with "3x" mode now.:
 		
-		info = Common::String::printf("Testing : Scaled cursors with GFX Mode %s\n", gfxMode->name);
+		info = Common::String::format("Testing : Scaled cursors with GFX Mode %s\n", gfxMode->name);
 		if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
 			Testsuite::logPrintf("\tInfo! Skipping sub-test : Scaled Cursors :: GFX Mode %s\n", gfxMode->name);
 			gfxMode++;
@@ -1104,7 +1104,7 @@
 
 		Common::Point pt(0, 170);
 		Common::String msg;
-		msg = Common::String::printf("Testing Pixel Formats, %d of %d", numFormatsTested, pfList.size());
+		msg = Common::String::format("Testing Pixel Formats, %d of %d", numFormatsTested, pfList.size());
 		Testsuite::writeOnScreen(msg, pt, true);
 
 		// CopyRectToScreen could have been used, but that may involve writing code which

Modified: scummvm/trunk/engines/testbed/misc.cpp
===================================================================
--- scummvm/trunk/engines/testbed/misc.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/testbed/misc.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -28,7 +28,7 @@
 namespace Testbed {
 
 Common::String MiscTests::getHumanReadableFormat(TimeDate &td) {
-	return Common::String::printf("%d:%d:%d on %d/%d/%d (dd/mm/yyyy)", td.tm_hour, td.tm_min, td.tm_sec, td.tm_mday, td.tm_mon + 1, td.tm_year + 1900);
+	return Common::String::format("%d:%d:%d on %d/%d/%d (dd/mm/yyyy)", td.tm_hour, td.tm_min, td.tm_sec, td.tm_mday, td.tm_mon + 1, td.tm_year + 1900);
 }
 
 void MiscTests::timerCallback(void *arg) {

Modified: scummvm/trunk/engines/testbed/sound.cpp
===================================================================
--- scummvm/trunk/engines/testbed/sound.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/testbed/sound.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -193,7 +193,7 @@
 		AudioCD.play(i, 1, 0, 0);
 		while (AudioCD.isPlaying()) {
 			g_system->delayMillis(500);
-			Testsuite::writeOnScreen(Common::String::printf("Playing Now: track%02d", i), pt);
+			Testsuite::writeOnScreen(Common::String::format("Playing Now: track%02d", i), pt);
 		}
 		g_system->delayMillis(500);
 	}
@@ -234,19 +234,19 @@
 	Common::Point pt(0, 100);
 
 	mixer->playStream(Audio::Mixer::kPlainSoundType, &handle, s1);
-	Testsuite::writeOnScreen(Common::String::printf("Playing at smaple rate: %d", s1->getRate()), pt);
+	Testsuite::writeOnScreen(Common::String::format("Playing at smaple rate: %d", s1->getRate()), pt);
 	g_system->delayMillis(1000);
 	mixer->stopHandle(handle);
 	g_system->delayMillis(1000);
 
 	mixer->playStream(Audio::Mixer::kSpeechSoundType, &handle, s2);
-	Testsuite::writeOnScreen(Common::String::printf("Playing at sample rate : %d", s2->getRate()), pt);
+	Testsuite::writeOnScreen(Common::String::format("Playing at sample rate : %d", s2->getRate()), pt);
 	g_system->delayMillis(1000);
 	mixer->stopHandle(handle);
 	g_system->delayMillis(1000);
 
 	mixer->playStream(Audio::Mixer::kSFXSoundType, &handle, s3);
-	Testsuite::writeOnScreen(Common::String::printf("Playing at sample rate : %d", s3->getRate()), pt);
+	Testsuite::writeOnScreen(Common::String::format("Playing at sample rate : %d", s3->getRate()), pt);
 	g_system->delayMillis(1000);
 	mixer->stopHandle(handle);
 	g_system->delayMillis(1000);

Modified: scummvm/trunk/engines/testbed/testbed.cpp
===================================================================
--- scummvm/trunk/engines/testbed/testbed.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/testbed/testbed.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -48,10 +48,10 @@
 	GUI::ListWidget::ColorList colors;
 
 	for (Common::Array<Testsuite *>::const_iterator i = _testsuiteList.begin(); i != _testsuiteList.end(); ++i) {
-		strArray.push_back(Common::String::printf("%s :", (*i)->getDescription()));
+		strArray.push_back(Common::String::format("%s :", (*i)->getDescription()));
 		colors.push_back(GUI::ThemeEngine::kFontColorNormal);
 		if ((*i)->isEnabled()) {
-			strArray.push_back(Common::String::printf("Passed: %d  Failed: %d Skipped: %d", (*i)->getNumTestsPassed(), (*i)->getNumTestsFailed(), (*i)->getNumTestsSkipped()));
+			strArray.push_back(Common::String::format("Passed: %d  Failed: %d Skipped: %d", (*i)->getNumTestsPassed(), (*i)->getNumTestsFailed(), (*i)->getNumTestsSkipped()));
 		} else {
 			strArray.push_back("Skipped");
 		}

Modified: scummvm/trunk/engines/testbed/testsuite.cpp
===================================================================
--- scummvm/trunk/engines/testbed/testsuite.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/testbed/testsuite.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -233,7 +233,7 @@
 }
 
 void Testsuite::updateStats(const char *prefix, const char *info, uint testNum, uint numTests, Common::Point pt) {
-	Common::String text = Common::String::printf(" Running %s: %s (%d of %d) ", prefix, info, testNum, numTests);
+	Common::String text = Common::String::format(" Running %s: %s (%d of %d) ", prefix, info, testNum, numTests);
 	writeOnScreen(text, pt);
 	uint barColor = kColorSpecial;
 	// below the text a rectangle denoting the progress in the testsuite can be drawn.

Modified: scummvm/trunk/engines/toon/audio.cpp
===================================================================
--- scummvm/trunk/engines/toon/audio.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/toon/audio.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -98,7 +98,7 @@
 	debugC(1, kDebugAudio, "playMusic(%s, %s)", dir.c_str(), music.c_str());
 
 	// two musics can be played at same time
-	Common::String path = Common::String::printf("act%d/%s/%s.mus", _vm->state()->_currentChapter, dir.c_str(), music.c_str());
+	Common::String path = Common::String::format("act%d/%s/%s.mus", _vm->state()->_currentChapter, dir.c_str(), music.c_str());
 
 	if (_currentMusicName == music)
 		return;

Modified: scummvm/trunk/engines/toon/detection.cpp
===================================================================
--- scummvm/trunk/engines/toon/detection.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/toon/detection.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -159,7 +159,7 @@
 }
 
 void ToonMetaEngine::removeSaveState(const char *target, int slot) const {
-	Common::String fileName = Common::String::printf("%s.%03d", target, slot);
+	Common::String fileName = Common::String::format("%s.%03d", target, slot);
 	g_system->getSavefileManager()->removeSavefile(fileName);
 }
 
@@ -209,7 +209,7 @@
 }
 
 SaveStateDescriptor ToonMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
-	Common::String fileName = Common::String::printf("%s.%03d", target, slot);
+	Common::String fileName = Common::String::format("%s.%03d", target, slot);
 	Common::InSaveFile *file = g_system->getSavefileManager()->openForLoading(fileName);
 
 	if (file) {

Modified: scummvm/trunk/engines/toon/toon.cpp
===================================================================
--- scummvm/trunk/engines/toon/toon.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/engines/toon/toon.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -948,7 +948,7 @@
 
 
 	// load package
-	strcpy(temp, createRoomFilename(Common::String::printf("%s.pak", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str());
+	strcpy(temp, createRoomFilename(Common::String::format("%s.pak", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str());
 	resources()->openPackage(temp, true);
 
 	strcpy(temp, state()->_locations[SceneId]._name);
@@ -993,7 +993,7 @@
 
 	strcpy(temp, state()->_locations[SceneId]._name);
 	strcat(temp, ".svi");
-	strcpy(temp2, createRoomFilename(Common::String::printf("%s.svl", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str());
+	strcpy(temp2, createRoomFilename(Common::String::format("%s.svl", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str());
 	_audioManager->loadAudioPack(1, temp, temp2);
 	strcpy(temp, state()->_locations[SceneId]._name);
 	strcpy(temp2, state()->_locations[SceneId]._name);
@@ -1580,7 +1580,7 @@
 	_currentTextLineCharacterId = 0;
 
 	char temp[256];
-	strcpy(temp, createRoomFilename(Common::String::printf("%s.pak", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str());
+	strcpy(temp, createRoomFilename(Common::String::format("%s.pak", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str());
 	resources()->closePackage(temp);
 
 
@@ -2808,7 +2808,7 @@
 }
 
 Common::String ToonEngine::getSavegameName(int nr) {
-	return _targetName + Common::String::printf(".%03d", nr);
+	return _targetName + Common::String::format(".%03d", nr);
 }
 
 bool ToonEngine::saveGame(int32 slot, Common::String saveGameDesc) {
@@ -2828,7 +2828,7 @@
 		if (!saveGameDesc.empty()) {
 			savegameDescription = saveGameDesc;
 		} else {
-			savegameDescription = Common::String::printf("Quick save #%d", slot);
+			savegameDescription = Common::String::format("Quick save #%d", slot);
 		}
 	}
 
@@ -4329,7 +4329,7 @@
 }
 
 Common::String ToonEngine::createRoomFilename(Common::String name) {
-	Common::String file = Common::String::printf("ACT%d/%s/%s", _gameState->_currentChapter, _gameState->_locations[_gameState->_currentScene]._name, name.c_str());
+	Common::String file = Common::String::format("ACT%d/%s/%s", _gameState->_currentChapter, _gameState->_locations[_gameState->_currentScene]._name, name.c_str());
 	return file;
 }
 

Modified: scummvm/trunk/gui/about.cpp
===================================================================
--- scummvm/trunk/gui/about.cpp	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/gui/about.cpp	2010-11-01 16:02:28 UTC (rev 54004)
@@ -93,7 +93,7 @@
 	version += gScummVMVersion;
 	_lines.push_back(version);
 
-	Common::String date = Common::String::printf(_("(built on %s)"), gScummVMBuildDate);
+	Common::String date = Common::String::format(_("(built on %s)"), gScummVMBuildDate);
 	_lines.push_back("C2" + date);
 
 	for (i = 0; i < ARRAYSIZE(copyright_text); i++)

Modified: scummvm/trunk/test/common/str.h
===================================================================
--- scummvm/trunk/test/common/str.h	2010-11-01 16:00:53 UTC (rev 54003)
+++ scummvm/trunk/test/common/str.h	2010-11-01 16:02:28 UTC (rev 54004)
@@ -316,12 +316,12 @@
 	}
 
 	void test_string_printf() {
-		TS_ASSERT_EQUALS( Common::String::printf(""), "" );
-		TS_ASSERT_EQUALS( Common::String::printf("%s", "test"), "test" );
-		TS_ASSERT_EQUALS( Common::String::printf("%s.s%.02d", "monkey", 1), "monkey.s01" );
-		TS_ASSERT_EQUALS( Common::String::printf("Some %s to make this string longer than the default built-in %s %d", "text", "capacity", 123456), "Some text to make this string longer than the default built-in capacity 123456" );
+		TS_ASSERT_EQUALS( Common::String::format(""), "" );
+		TS_ASSERT_EQUALS( Common::String::format("%s", "test"), "test" );
+		TS_ASSERT_EQUALS( Common::String::format("%s.s%.02d", "monkey", 1), "monkey.s01" );
+		TS_ASSERT_EQUALS( Common::String::format("Some %s to make this string longer than the default built-in %s %d", "text", "capacity", 123456), "Some text to make this string longer than the default built-in capacity 123456" );
 
-		Common::String s = Common::String::printf("%s%X", "test", 1234);
+		Common::String s = Common::String::format("%s%X", "test", 1234);
 		TS_ASSERT_EQUALS(s, "test4D2");
 		TS_ASSERT_EQUALS(s.size(), 7U);
 	}


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