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/titanic | |
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/titanic')
-rw-r--r-- | engines/titanic/support/files_manager.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/titanic.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/titanic.h | 5 |
3 files changed, 3 insertions, 20 deletions
diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp index 9a07b68e35..63fde3aaba 100644 --- a/engines/titanic/support/files_manager.cpp +++ b/engines/titanic/support/files_manager.cpp @@ -39,19 +39,19 @@ CFilesManager::~CFilesManager() { bool CFilesManager::loadResourceIndex() { if (!_datFile.open("titanic.dat")) { - g_vm->GUIError("Could not find titanic.dat data file"); + GUIErrorMessage("Could not find titanic.dat data file"); return false; } uint headerId = _datFile.readUint32BE(); _version = _datFile.readUint16LE(); if (headerId != MKTAG('S', 'V', 'T', 'N')) { - g_vm->GUIError("titanic.dat has invalid contents"); + GUIErrorMessage("titanic.dat has invalid contents"); return false; } if (_version != 5) { - g_vm->GUIError("titanic.dat is out of date"); + GUIErrorMessage("titanic.dat is out of date"); return false; } diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp index 0931d91806..33184599fe 100644 --- a/engines/titanic/titanic.cpp +++ b/engines/titanic/titanic.cpp @@ -276,18 +276,6 @@ void TitanicEngine::syncSoundSettings() { } } -void TitanicEngine::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 TitanicEngine::showScummVMSaveDialog() { if (!canSaveGameStateCurrently()) diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h index 5efefe41bd..ce2188ed1e 100644 --- a/engines/titanic/titanic.h +++ b/engines/titanic/titanic.h @@ -196,11 +196,6 @@ public: CString getSavegameName(int slot); /** - * Displays an error message in a GUI dialog - */ - void GUIError(const char *msg, ...) GCC_PRINTF(2, 3); - - /** * Shows the ScummVM GMM save dialog */ void showScummVMSaveDialog(); |