diff --git a/src/sdl2/main.c b/src/sdl2/main.c
index 8f89012d628db67e3712c1d4a3ebcfec4f851a1e..9533040a3454bf9ae127a4651619ece810a5f1a0 100644 (file)
--- a/src/sdl2/main.c
+++ b/src/sdl2/main.c
#include "system.h"
#include "input.h"
-#include "cp866.h"
-
-#include "my.h" // fexists
#include "player.h" // pl1 pl2
#include "menu.h" // G_keyf
#include "error.h" // logo
#include "music.h" // S_initmusic S_updatemusic S_donemusic
#include "render.h" // R_init R_draw R_done
+#include "common/cp866.h"
+
#define TITLE_STR "Doom 2D (SDL2)"
static Uint32 ticks;
vprintf(s, ap);
va_end(ap);
puts("");
- exit(1);
+ abort()
}
void ERR_fatal (char *s, ...) {
S_done();
M_shutdown();
SDL_Quit();
- puts("\nКРИТИЧЕСКАЯ ОШИБКА:");
+ puts("\nCRITICAL ERROR:");
va_start(ap, s);
vprintf(s, ap);
va_end(ap);
puts("");
- exit(1);
+ abort();
}
void ERR_quit (void) {
}
int main (int argc, char **argv) {
- char *pw;
CFG_args(argc, argv);
logo("system: initialize SDL2\n");
if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO | SDL_INIT_EVENTS) == -1) {
srand(SDL_GetTicks());
F_startup();
CFG_load();
-#ifndef WIN32
- pw = "/usr/share/doom2d-rembo/doom2d.wad";
-#else
- pw = "doom2d.wad";
-#endif
- if (fexists(pw)) {
- F_addwad(pw);
- } else {
- F_addwad("doom2d.wad");
- }
+ F_addwad("doom2d.wad");
F_initwads();
M_startup();
F_allocres();