aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle
diff options
context:
space:
mode:
authorCameron Cawley2018-12-19 06:31:26 +0000
committerFilippos Karapetis2018-12-19 08:31:26 +0200
commitf6015086e18360659552ec4f7ca898f20fad1d16 (patch)
tree3f132ccbeb663e74d6b408c2ce2d608d3e2b27d8 /engines/mortevielle
parente94ccdbe6b0d650e04872ee3cc68fe13272f81a4 (diff)
downloadscummvm-rg350-f6015086e18360659552ec4f7ca898f20fad1d16.tar.gz
scummvm-rg350-f6015086e18360659552ec4f7ca898f20fad1d16.tar.bz2
scummvm-rg350-f6015086e18360659552ec4f7ca898f20fad1d16.zip
ENGINES: Add GUIErrorMessageFormat to replace duplicated functions (#1455)
Diffstat (limited to 'engines/mortevielle')
-rw-r--r--engines/mortevielle/mortevielle.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 92d1ca8839..21e96e6766 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -303,8 +303,7 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
// Open the mort.dat file
if (!f.open(MORT_DAT)) {
- Common::String msg = Common::String::format(_("Unable to locate the '%s' engine data file."), MORT_DAT);
- GUIErrorMessage(msg);
+ GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file."), MORT_DAT);
return Common::kReadingFailed;
}
@@ -312,8 +311,7 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
char fileId[4];
f.read(fileId, 4);
if (strncmp(fileId, "MORT", 4) != 0) {
- Common::String msg = Common::String::format(_("The '%s' engine data file is corrupt."), MORT_DAT);
- GUIErrorMessage(msg);
+ GUIErrorMessageFormat(_("The '%s' engine data file is corrupt."), MORT_DAT);
return Common::kReadingFailed;
}
@@ -322,10 +320,9 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
int minVer = f.readByte();
if (majVer < MORT_DAT_REQUIRED_VERSION) {
- Common::String msg = Common::String::format(
+ GUIErrorMessageFormat(
_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
MORT_DAT, MORT_DAT_REQUIRED_VERSION, 0, majVer, minVer);
- GUIErrorMessage(msg);
return Common::kReadingFailed;
}