diff options
| author | Cameron Cawley | 2018-12-19 06:31:26 +0000 |
|---|---|---|
| committer | Filippos Karapetis | 2018-12-19 08:31:26 +0200 |
| commit | f6015086e18360659552ec4f7ca898f20fad1d16 (patch) | |
| tree | 3f132ccbeb663e74d6b408c2ce2d608d3e2b27d8 /engines/xeen | |
| parent | e94ccdbe6b0d650e04872ee3cc68fe13272f81a4 (diff) | |
| download | scummvm-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/xeen')
| -rw-r--r-- | engines/xeen/files.cpp | 4 | ||||
| -rw-r--r-- | engines/xeen/xeen.cpp | 12 | ||||
| -rw-r--r-- | engines/xeen/xeen.h | 5 |
3 files changed, 2 insertions, 19 deletions
diff --git a/engines/xeen/files.cpp b/engines/xeen/files.cpp index ecac2c5b2b..284f91be2b 100644 --- a/engines/xeen/files.cpp +++ b/engines/xeen/files.cpp @@ -255,14 +255,14 @@ bool FileManager::setup() { // Ensure the custom CC archive is present File f; if (!f.exists("xeen.ccs")) { - g_vm->GUIError("Could not find xeen.ccs data file"); + GUIErrorMessage("Could not find xeen.ccs data file"); return false; } // Verify the version of the CC is correct CCArchive *dataCc = new CCArchive("xeen.ccs", "data", true); if (!f.open("VERSION", *dataCc) || f.readUint32LE() != 1) { - g_vm->GUIError("xeen.ccs is out of date"); + GUIErrorMessage("xeen.ccs is out of date"); return false; } SearchMan.add("data", dataCc); diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp index 371f437172..1952dc16c0 100644 --- a/engines/xeen/xeen.cpp +++ b/engines/xeen/xeen.cpp @@ -310,18 +310,6 @@ void XeenEngine::syncSoundSettings() { _sound->updateSoundSettings(); } -void XeenEngine::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); -} - void XeenEngine::saveSettings() { if (_gameWon[0]) ConfMan.setBool("game_won", true); diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h index 98b09e7f23..dfe2c79eec 100644 --- a/engines/xeen/xeen.h +++ b/engines/xeen/xeen.h @@ -218,11 +218,6 @@ public: int getRandomNumber(int minNumber, int maxNumber); /** - * Displays an error message in a GUI dialog - */ - void GUIError(const char *msg, ...) GCC_PRINTF(2, 3); - - /** * Returns true if the game should be exited (either quitting, exiting to the main menu, or loading a savegame) */ bool shouldExit() const { return _gameMode != GMODE_NONE || isLoadPending() || shouldQuit(); } |
