aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
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
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')
-rw-r--r--engines/lure/lure.cpp18
-rw-r--r--engines/lure/lure.h1
2 files changed, 3 insertions, 16 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();
}
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index d395d00c03..dd9fb18f5b 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -111,7 +111,6 @@ public:
bool saveGame(uint8 slotNumber, Common::String &caption);
Common::String *detectSave(int slotNumber);
uint8 saveVersion() { return _saveVersion; }
- void GUIError(const char *msg, ...) GCC_PRINTF(2, 3);
uint32 getFeatures() const;
LureLanguage getLureLanguage() const;