diff --git a/src/error.c b/src/error.c
index 0e3e2afebbe0c5978cf3bbbc931fd52a1f7e3b72..0ba3d3bb8f98120f69722a703df53d6e0debefa2 100644 (file)
--- a/src/error.c
+++ b/src/error.c
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
-#include "keyb.h"
#include "sound.h"
#include "sound.h"
-#include "vga.h"
+#include "render.h"
#include "memory.h"
#include "error.h"
#include "config.h"
#include "memory.h"
#include "error.h"
#include "config.h"
+#include "music.h"
-void close_all(void) {
+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
+}
+
+static void close_all (void) {
S_done();
S_donemusic();
S_done();
S_donemusic();
- K_done();
- V_done();
M_shutdown();
M_shutdown();
+ R_done();
}
}
-void ERR_failinit(char *s,...) {
+void ERR_failinit (char *s, ...) {
va_list ap;
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);
}
va_end(ap);
puts("");
exit(1);
}
-void ERR_fatal(char *s,...) {
+void ERR_fatal (char *s,...) {
va_list ap;
va_list ap;
-
close_all();
puts("\nКРИТИЧЕСКАЯ ОШИБКА:");
close_all();
puts("\nКРИТИЧЕСКАЯ ОШИБКА:");
- va_start(ap,s);
- vprintf(s,ap);
+ va_start(ap, s);
+ vprintf(s, ap);
va_end(ap);
puts("");
exit(2);
}
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);
close_all();
CFG_save();
exit(0);