X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Ferror.c;h=0ba3d3bb8f98120f69722a703df53d6e0debefa2;hb=de05b18ef2a99168b0a1a8a921a4b18ec7023833;hp=8c8eee9d4890a3f8956a73224b3ab117ee4bc53e;hpb=a2115940e7643dcb1b87286f3d19fe95f7b79bd3;p=flatwaifu.git diff --git a/src/error.c b/src/error.c index 8c8eee9..0ba3d3b 100644 --- a/src/error.c +++ b/src/error.c @@ -23,61 +23,58 @@ #include "glob.h" #include #include -//#include #include #include -#include -#include "keyb.h" #include "sound.h" -#include "vga.h" +#include "render.h" #include "memory.h" -#include "files.h" #include "error.h" #include "config.h" +#include "music.h" -#include +void logo (const char *s, ...) { + va_list ap; + va_start(ap, s); + vprintf(s, ap); + va_end(ap); + fflush(stdout); +} +void logo_gas (int cur, int all) { + // stub +} -void close_all(void) { +static void close_all (void) { S_done(); S_donemusic(); - K_done(); - V_done(); M_shutdown(); + R_done(); } -void ERR_failinit(char *s,...) { +void ERR_failinit (char *s, ...) { va_list ap; - - close_all(); - va_start(ap,s); - vprintf(s,ap); + //close_all(); + va_start(ap, s); + vprintf(s, ap); va_end(ap); puts(""); exit(1); } -void ERR_fatal(char *s,...) { +void ERR_fatal (char *s,...) { va_list ap; - close_all(); puts("\nКРИТИЧЕСКАЯ ОШИБКА:"); - va_start(ap,s); - vprintf(s,ap); + va_start(ap, s); + vprintf(s, ap); va_end(ap); puts(""); exit(2); } -void ERR_quit(void) { - void *p; - //V_done(); - //if(!(p=malloc(4000))) - puts("Спасибо за то, что вы играли в Операцию \"Смятка\"!"); - //else { -// F_loadres(F_getresid("ENDOOM"),p,0,4000); - // memcpy((void*)0xB8000,p,4000);free(p);gotoxy(1,24); - //} +void ERR_quit (void) { + puts("Спасибо за то, что вы играли в Операцию \"Смятка\"!"); + //F_loadres(F_getresid("ENDOOM"),p,0,4000); close_all(); CFG_save(); exit(0);