X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fsdl%2Fmain.c;h=7bc04d0eaa5dc659769d21a0d3d159b1f0fd9675;hb=HEAD;hp=057c82ec2123842550a3ab41bf69df1e14b86aed;hpb=4a99fe51561ca331df54512eb25c502d0fcd2b55;p=flatwaifu.git diff --git a/src/sdl/main.c b/src/sdl/main.c index 057c82e..2243ce0 100644 --- a/src/sdl/main.c +++ b/src/sdl/main.c @@ -1,24 +1,17 @@ -/* - Copyright (C) Prikol Software 1996-1997 - Copyright (C) Aleksey Volynskov 1996-1997 - Copyright (C) 2011 - - This file is part of the Doom2D:Rembo project. - - Doom2D:Rembo is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - Doom2D:Rembo is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see or - write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +/* Copyright (C) 2020 SovietPony + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3 of the License ONLY. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #ifdef __EMSCRIPTEN__ # include @@ -32,7 +25,6 @@ #include "system.h" #include "input.h" -#include "my.h" // fexists #include "player.h" // pl1 pl2 #include "menu.h" // G_keyf #include "error.h" // logo @@ -132,7 +124,7 @@ void ERR_failinit (char *s, ...) { vprintf(s, ap); va_end(ap); puts(""); - exit(1); + abort(); } void ERR_fatal (char *s, ...) { @@ -140,14 +132,13 @@ void ERR_fatal (char *s, ...) { R_done(); MUS_done(); 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) { @@ -489,7 +480,6 @@ static void step (void) { } int main (int argc, char *argv[]) { - char *pw; logo("main: initialize SDL\n"); if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) == -1) { logo("main: failed to init SDL: %s\n", SDL_GetError()); @@ -517,22 +507,10 @@ int main (int argc, char *argv[]) { pl2.kwr = KEY_2; pl2.kp = KEY_E; srand(SDL_GetTicks()); - F_startup(); -#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"); CFG_args(argc, argv); CFG_load(); F_initwads(); - M_startup(); - F_allocres(); S_init(); MUS_init(); R_init(); @@ -549,7 +527,6 @@ int main (int argc, char *argv[]) { R_done(); MUS_done(); S_done(); - M_shutdown(); SDL_Quit(); return 0; }