DEADSOFTWARE

mostly remove game dependency on low level part of render
[flatwaifu.git] / src / error.c
index 8c8eee9d4890a3f8956a73224b3ab117ee4bc53e..ef9c388774b7c453b30ffb65dd63be6bb80edfc4 100644 (file)
 #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 <SDL.h>
-
-
-void close_all(void) {
+static void close_all (void) {
   S_done();
   S_donemusic();
   K_done();
-  V_done();
+  R_done();
   M_shutdown();
 }
 
-void ERR_failinit(char *s,...) {
+void ERR_failinit (char *s, ...) {
   va_list ap;
-
   close_all();
-  va_start(ap,s);
-  vprintf(s,ap);
+  va_start(ap, s);
+  vprintf(s, ap);
   va_end(ap);
   puts("");
   exit(1);
@@ -59,17 +52,16 @@ void ERR_failinit(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 ERR_quit (void) {
   void *p;
   //V_done();
   //if(!(p=malloc(4000)))