From e27b05ef358102fd60235a5f78d7d51e9f25a5f4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 1 Nov 2010 16:02:28 +0000 Subject: 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. svn-id: r54004 --- engines/lastexpress/game/entities.cpp | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'engines/lastexpress/game/entities.cpp') diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index 40fae3ae9b..adba0f1b4c 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -1532,7 +1532,7 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com 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 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com 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 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com 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 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com 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 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com 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 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com 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 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com // 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; } } -- cgit v1.2.3