aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/lure.cpp
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/lure/lure.cpp
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/lure/lure.cpp')
-rw-r--r--engines/lure/lure.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 13417b3251..6512caa049 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -61,7 +61,7 @@ Common::Error LureEngine::init() {
Common::File f;
VersionStructure version;
if (!f.open(SUPPORT_FILENAME)) {
- GUIError(_("Unable to locate the '%s' engine data file."), SUPPORT_FILENAME);
+ GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file."), SUPPORT_FILENAME);
return Common::kUnknownError;
}
@@ -70,10 +70,10 @@ Common::Error LureEngine::init() {
f.close();
if (READ_LE_UINT16(&version.id) != 0xffff) {
- GUIError(_("The '%s' engine data file is corrupt."), SUPPORT_FILENAME);
+ GUIErrorMessageFormat(_("The '%s' engine data file is corrupt."), SUPPORT_FILENAME);
return Common::kUnknownError;
} else if ((version.vMajor != LURE_DAT_MAJOR) || (version.vMinor != LURE_DAT_MINOR)) {
- GUIError(_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+ GUIErrorMessageFormat(_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR,
version.vMajor, version.vMinor);
return Common::kUnknownError;
@@ -248,18 +248,6 @@ bool LureEngine::loadGame(uint8 slotNumber) {
return true;
}
-void LureEngine::GUIError(const char *msg, ...) {
- char buffer[STRINGBUFLEN];
- va_list va;
-
- // Generate the full error message
- va_start(va, msg);
- vsnprintf(buffer, STRINGBUFLEN, msg, va);
- va_end(va);
-
- GUIErrorMessage(buffer);
-}
-
GUI::Debugger *LureEngine::getDebugger() {
return !Game::isCreated() ? NULL : &Game::getReference().debugger();
}