diff --git a/src/error.c b/src/error.c
index 8c8eee9d4890a3f8956a73224b3ab117ee4bc53e..0ba3d3bb8f98120f69722a703df53d6e0debefa2 100644 (file)
--- a/src/error.c
+++ b/src/error.c
#include "glob.h"
#include <stdio.h>
#include <string.h>
-//#include <conio.h>
#include <stdarg.h>
#include <stdlib.h>
-#include <malloc.h>
-#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 <SDL.h>
+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);