diff options
Diffstat (limited to 'engines/hugo/util.cpp')
-rw-r--r-- | engines/hugo/util.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp index a3e778e228..bad97d80c5 100644 --- a/engines/hugo/util.cpp +++ b/engines/hugo/util.cpp @@ -136,51 +136,6 @@ char *Utils::Box(box_t dismiss, const char *s, ...) { } /** - * Fatal error handler. Reset environment, print error and exit - * Arguments are same as printf - */ -void Utils::Error(int error_type, const char *format, ...) { - char buffer[ERRLEN + 1]; - bool fatal = true; // Fatal error, else continue - - switch (error_type) { - case FILE_ERR: - strcpy(buffer, HugoEngine::get()._textUtil[kErr1]); - break; - case WRITE_ERR: - strcpy(buffer, HugoEngine::get()._textUtil[kErr2]); - fatal = false; // Allow continuation - break; - case PCCH_ERR: - strcpy(buffer, HugoEngine::get()._textUtil[kErr3]); - break; - case HEAP_ERR: - strcpy(buffer, HugoEngine::get()._textUtil[kErr4]); - break; - case SOUND_ERR: - strcpy(buffer, HugoEngine::get()._textUtil[kErr5]); - break; - default: - strcpy(buffer, HugoEngine::get()._textUtil[kErr6]); - break; - } - - if (fatal) - HugoEngine::get().shutdown(); // Restore any devices before exit - - va_list marker; - va_start(marker, format); - vsnprintf(&buffer[strlen(buffer)], ERRLEN - strlen(buffer), format, marker); - va_end(marker); - //MessageBeep(MB_ICONEXCLAMATION); - //MessageBox(hwnd, buffer, "HugoWin Error", MB_OK | MB_ICONEXCLAMATION); - warning("Hugo Error: %s", buffer); - - if (fatal) - exit(1); -} - -/** * Print options for user when dead */ void Utils::gameOverMsg(void) { |