aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBen Castricum2016-12-06 09:25:00 +0100
committerBen Castricum2016-12-06 09:38:25 +0100
commit1cf3f50b7429483409e16994a21c040235abd261 (patch)
treeb9312aa2fe7536be282f9911468386b7f4440236 /engines
parenteb7ffb1e2cce1c77bebc156563d6d46d223b3885 (diff)
downloadscummvm-rg350-1cf3f50b7429483409e16994a21c040235abd261.tar.gz
scummvm-rg350-1cf3f50b7429483409e16994a21c040235abd261.tar.bz2
scummvm-rg350-1cf3f50b7429483409e16994a21c040235abd261.zip
ALL: Unify 'wrong version of engine data' message
Diffstat (limited to 'engines')
-rw-r--r--engines/access/resources.cpp4
-rw-r--r--engines/drascula/drascula.cpp4
-rw-r--r--engines/hugo/hugo.cpp4
-rw-r--r--engines/lure/lure.cpp2
-rw-r--r--engines/mortevielle/mortevielle.cpp11
-rw-r--r--engines/tony/tony.cpp4
-rw-r--r--engines/toon/toon.cpp4
7 files changed, 23 insertions, 10 deletions
diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp
index 78d0b013a3..05dfd3fe56 100644
--- a/engines/access/resources.cpp
+++ b/engines/access/resources.cpp
@@ -58,8 +58,8 @@ bool Resources::load(Common::String &errorMessage) {
uint version = f.readUint16LE();
if (version != expectedVersion) {
errorMessage = Common::String::format(
- "Incorrect version of access.dat found. Expected %d but got %d",
- expectedVersion, version);
+ _("Incorrect version of the '%s' file found. Expected %d.%d but got %d.%d. Get it from the ScummVM website"),
+ filename.c_str(), expectedVersion, 0, version, 0);
return false;
}
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index c5ee4cf360..7333d352b3 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -986,7 +986,9 @@ bool DrasculaEngine::loadDrasculaDat() {
ver = in.readByte();
if (ver != DRASCULA_DAT_VER) {
- Common::String errorMessage = Common::String::format("File 'drascula.dat' is wrong version. Expected %d but got %d. Get it from the ScummVM website", DRASCULA_DAT_VER, ver);
+ Common::String errorMessage = Common::String::format(
+ _("Incorrect version of the '%s' file found. Expected %d.%d but got %d.%d. Get it from the ScummVM website"),
+ filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
GUIErrorMessage(errorMessage);
warning("%s", errorMessage.c_str());
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 0b4ed33bae..b7af8cbd1d 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -454,7 +454,9 @@ bool HugoEngine::loadHugoDat() {
int minVer = in.readByte();
if ((majVer != HUGO_DAT_VER_MAJ) || (minVer != HUGO_DAT_VER_MIN)) {
- Common::String errorMessage = Common::String::format("File 'hugo.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from the ScummVM website", HUGO_DAT_VER_MAJ, HUGO_DAT_VER_MIN, majVer, minVer);
+ Common::String errorMessage = Common::String::format(
+ _("Incorrect version of the '%s' file found. Expected %d.%d but got %d.%d. Get it from the ScummVM website"),
+ filename.c_str(),HUGO_DAT_VER_MAJ, HUGO_DAT_VER_MIN, majVer, minVer);
GUIErrorMessage(errorMessage);
return false;
}
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index f798ddbdb8..9d3722cab7 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -73,7 +73,7 @@ Common::Error LureEngine::init() {
GUIError(_("File '%s' is corrupt. Get it from the ScummVM website"), SUPPORT_FILENAME);
return Common::kUnknownError;
} else if ((version.vMajor != LURE_DAT_MAJOR) || (version.vMinor != LURE_DAT_MINOR)) {
- GUIError("Incorrect version of %s file - expected %d.%d but got %d.%d",
+ GUIError(_("Incorrect version of the '%s' file found. Expected %d.%d but got %d.%d. Get it from the ScummVM website"),
SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR,
version.vMajor, version.vMinor);
return Common::kUnknownError;
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 14391a2241..fbfde901ca 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -318,11 +318,16 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
}
// Check the version
- if (f.readByte() < MORT_DAT_REQUIRED_VERSION) {
- GUIErrorMessage("The located mort.dat data file is too old, please download an updated version on scummvm.org");
+ int majVer = f.readByte();
+ int minVer = f.readByte();
+
+ if (majVer < MORT_DAT_REQUIRED_VERSION) {
+ Common::String msg = Common::String::format(
+ _("Incorrect version of the '%s' file found. Expected %d.%d but got %d.%d. Get it from the ScummVM website"),
+ MORT_DAT, MORT_DAT_REQUIRED_VERSION, 0, majVer, minVer);
+ GUIErrorMessage(msg);
return Common::kReadingFailed;
}
- f.readByte(); // Minor version
// Loop to load resources from the data file
while (f.pos() < f.size()) {
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index c3ae24b70d..ec42a1d927 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -217,7 +217,9 @@ bool TonyEngine::loadTonyDat() {
int minVer = in.readByte();
if ((majVer != TONY_DAT_VER_MAJ) || (minVer != TONY_DAT_VER_MIN)) {
- msg = Common::String::format("File 'tony.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from the ScummVM website", TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
+ msg = Common::String::format(
+ _("Incorrect version of the '%s' file found. Expected %d.%d but got %d.%d. Get it from the ScummVM website"),
+ filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
GUIErrorMessage(msg);
warning("%s", msg.c_str());
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 25eb7ad1d4..ae1f8f1050 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -4937,7 +4937,9 @@ bool ToonEngine::loadToonDat() {
minVer = in.readByte();
if ((majVer != TOON_DAT_VER_MAJ) || (minVer != TOON_DAT_VER_MIN)) {
- msg = Common::String::format(_("File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from the ScummVM website"), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
+ msg = Common::String::format(
+ _("Incorrect version of the '%s' file found. Expected %d.%d but got %d.%d. Get it from the ScummVM website"),
+ filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
GUIErrorMessage(msg);
warning("%s", msg.c_str());