aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lastexpress')
-rw-r--r--engines/lastexpress/data/scene.cpp8
-rw-r--r--engines/lastexpress/entities/august.cpp8
-rw-r--r--engines/lastexpress/entities/entity.h38
-rw-r--r--engines/lastexpress/game/action.cpp10
-rw-r--r--engines/lastexpress/game/entities.cpp42
-rw-r--r--engines/lastexpress/game/inventory.cpp2
-rw-r--r--engines/lastexpress/game/inventory.h2
-rw-r--r--engines/lastexpress/game/object.cpp4
-rw-r--r--engines/lastexpress/game/savepoint.h4
-rw-r--r--engines/lastexpress/game/scenes.cpp4
-rw-r--r--engines/lastexpress/game/state.h18
-rw-r--r--engines/lastexpress/helpers.h2
12 files changed, 71 insertions, 71 deletions
diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp
index 4c8cb9bd17..8e90d93828 100644
--- a/engines/lastexpress/data/scene.cpp
+++ b/engines/lastexpress/data/scene.cpp
@@ -79,7 +79,7 @@ SceneHotspot *SceneHotspot::load(Common::SeekableReadStream *stream) {
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::Rect Scene::draw(Graphics::Surface *surface) {
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) {
diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index 36d8ed4fe4..e9aff248e4 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -455,11 +455,11 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
}
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 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
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 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
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;
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h
index 3e12df8612..33ca244c5e 100644
--- a/engines/lastexpress/entities/entity.h
+++ b/engines/lastexpress/entities/entity.h
@@ -79,7 +79,7 @@ public:
}
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 @@ public:
}
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 @@ public:
}
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 @@ public:
}
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 @@ public:
}
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 @@ public:
}
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 @@ public:
}
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 @@ public:
}
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 @@ public:
}
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 @@ public:
}
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 @@ public:
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;
}
diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp
index 84f406931d..8058d22f05 100644
--- a/engines/lastexpress/game/action.cpp
+++ b/engines/lastexpress/game/action.cpp
@@ -454,7 +454,7 @@ IMPLEMENT_ACTION(savePoint)
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 @@ IMPLEMENT_ACTION(playSound)
// 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 @@ IMPLEMENT_ACTION(29)
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 @@ IMPLEMENT_ACTION(playMusicChapter)
}
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 @@ IMPLEMENT_ACTION(playMusicChapterSetupTrain)
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);
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;
}
}
diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp
index 0223176cb6..ae9aca56b6 100644
--- a/engines/lastexpress/game/inventory.cpp
+++ b/engines/lastexpress/game/inventory.cpp
@@ -422,7 +422,7 @@ Common::String Inventory::toString() {
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;
}
diff --git a/engines/lastexpress/game/inventory.h b/engines/lastexpress/game/inventory.h
index af3478bfae..bae6c8d261 100644
--- a/engines/lastexpress/game/inventory.h
+++ b/engines/lastexpress/game/inventory.h
@@ -76,7 +76,7 @@ public:
}
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) {
diff --git a/engines/lastexpress/game/object.cpp b/engines/lastexpress/game/object.cpp
index f0e81781b6..4f296debcb 100644
--- a/engines/lastexpress/game/object.cpp
+++ b/engines/lastexpress/game/object.cpp
@@ -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 Objects::toString() {
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;
}
diff --git a/engines/lastexpress/game/savepoint.h b/engines/lastexpress/game/savepoint.h
index 6b2c12751d..ca507ab8ab 100644
--- a/engines/lastexpress/game/savepoint.h
+++ b/engines/lastexpress/game/savepoint.h
@@ -73,7 +73,7 @@ struct SavePoint {
}
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 @@ public:
}
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);
}
};
diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp
index 7fd0a3f0ac..cf50d3e425 100644
--- a/engines/lastexpress/game/scenes.cpp
+++ b/engines/lastexpress/game/scenes.cpp
@@ -78,7 +78,7 @@ void SceneManager::loadSceneDataFile(ArchiveIndex archive) {
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 @@ void SceneManager::updateDoorsAndClock() {
// 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
diff --git a/engines/lastexpress/game/state.h b/engines/lastexpress/game/state.h
index 135ee6bb4e..da81794ce1 100644
--- a/engines/lastexpress/game/state.h
+++ b/engines/lastexpress/game/state.h
@@ -466,7 +466,7 @@ public:
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 @@ public:
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 @@ public:
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;
}
diff --git a/engines/lastexpress/helpers.h b/engines/lastexpress/helpers.h
index eb54a1a3ce..fa8eeb25e5 100644
--- a/engines/lastexpress/helpers.h
+++ b/engines/lastexpress/helpers.h
@@ -94,7 +94,7 @@ extern const char *g_actionNames[];
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])