diff options
Diffstat (limited to 'StarsEx/Starshatter.cpp')
-rw-r--r-- | StarsEx/Starshatter.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/StarsEx/Starshatter.cpp b/StarsEx/Starshatter.cpp index 62b728f..dc60533 100644 --- a/StarsEx/Starshatter.cpp +++ b/StarsEx/Starshatter.cpp @@ -171,14 +171,9 @@ chat_mode(0), exit_time(1.2), cutscene(0) loader = DataLoader::GetLoader(); int loadstat = loader->EnableDatafile("shatter.dat"); - if (loadstat != DataLoader::DATAFILE_OK) { - const char* err_msg = loadstat == DataLoader::DATAFILE_INVALID ? - "The file 'shatter.dat' appears to have been damaged. Please re-install Starshatter." : - "Starshatter cannot open the file 'shatter.dat'. Please re-install Starshatter."; - - ::MessageBox(hwnd, err_msg, "Starshatter - Error", MB_OK); - ::Print(err_msg); - ::Print("\n\nFATAL ERROR: EXIT."); + if (loadstat == DataLoader::FAILED) { + ::MessageBox(hwnd, loader->LastError(), "Starshatter - Error", MB_OK); + ::Print("FATAL ERROR: %s\n", loader->LastError()); exit(-1); } @@ -191,17 +186,6 @@ chat_mode(0), exit_time(1.2), cutscene(0) if (loader->FindFile("content.dat")) loader->EnableDatafile("content.dat"); - //if (loadstat != DataLoader::DATAFILE_OK) { - // const char* err_msg = loadstat == DataLoader::DATAFILE_INVALID ? - // "The file 'content.dat' appears to have been damaged. Please re-install the latest Starshatter update." : - // "Starshatter cannot open the file 'content.dat'. Please re-install the latest Starshatter update."; - - // ::MessageBox(hwnd, err_msg, "Starshatter - Error", MB_OK); - // ::Print(err_msg); - // ::Print("\n\nFATAL ERROR: EXIT."); - // exit(-1); - //} - LoadVideoConfig("video.cfg"); // create the fonts |