7 #include "../3rdParty/Storm/Source/storm.h"
33 void MsgBox(
const char *pszFmt, va_list va)
37 vsnprintf(text, 256, pszFmt, va);
39 UiErrorOkDialog(
"Error", text);
64 vsnprintf(text, 256, pszFmt, va);
67 UiErrorOkDialog(PROJECT_NAME, text,
false);
71 void assert_fail(
int nLineNo,
const char *pszFile,
const char *pszFail)
73 app_fatal(
"assertion failed (%d:%s)\n%s", nLineNo, pszFile, pszFail);
77 void ErrDlg(
const char *title,
const char *error,
char *log_file_path,
int log_line_nr)
83 snprintf(text, 1024,
"%s\n\nThe error occurred at: %s line %d", error, log_file_path, log_line_nr);
85 UiErrorOkDialog(title, text);
100 "Unable to open a required file.\n"
102 "Verify that the MD5 of diabdat.mpq matches one of the following values\n"
103 "011bc6518e6166206231080a4440b373\n"
104 "68f049866b44688a7af65ba766bef75a\n"
106 "The problem occurred when loading:\n%s",
109 UiErrorOkDialog(
"Data File Error", text);
119 "Unable to open %s.\n"
121 "Make sure that it is in the game folder and that the file name is in all lowercase.",
124 UiErrorOkDialog(
"Data File Error", text);
132 snprintf(text, 1024,
"Unable to write to location:\n%s", error);
134 UiErrorOkDialog(
"Read-Only Directory Error", text);