From: DeaDDooMER Date: Thu, 8 Apr 2021 12:27:17 +0000 (+0300) Subject: files: cleanup X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=cf509314ff0bc57488cbeeec0b1c98d88fb027a4;p=flatwaifu.git files: cleanup --- diff --git a/src/files.c b/src/files.c index 2eab3a8..b46856d 100644 --- a/src/files.c +++ b/src/files.c @@ -43,10 +43,6 @@ char savok[SAVE_MAX]; static int m_start, m_end; static int s_start, s_end; -void F_startup (void) { - logo("F_startup: setup file system\n"); -} - void F_addwad (const char *fn) { static int i = 0; static FILE_Stream wadh[MAX_WADS]; @@ -69,9 +65,6 @@ void F_initwads (void) { if (!WADRES_rehash()) { ERR_failinit("F_initwads: failed rehash"); } -} - -void F_allocres (void) { d_start = F_getresid("D_START"); d_end = F_getresid("D_END"); m_start = F_getresid("M_START"); @@ -80,10 +73,6 @@ void F_allocres (void) { s_end = F_getresid("S_END"); } -void F_loadres (int r, void *p) { - WADRES_getdata(r, p); -} - int F_findres (const char n[8]) { return WADRES_find(n); } @@ -126,6 +115,7 @@ int F_getreslen (int r) { return WADRES_getsize(r); } +/* void F_nextmus (char *s) { int i = F_findres(s); if (i <= m_start || i >= m_end) { @@ -154,6 +144,7 @@ void F_randmus (char *s) { F_nextmus(s); } } +*/ void F_loadmap (char n[8]) { int id = F_getresid(n); diff --git a/src/files.h b/src/files.h index 1fa7db8..5603209 100644 --- a/src/files.h +++ b/src/files.h @@ -27,19 +27,16 @@ extern char savname[SAVE_MAX][SAVE_MAXLEN]; extern char savok[SAVE_MAX]; extern int d_start, d_end; -void F_startup (void); void F_addwad (const char *fn); void F_initwads (void); -void F_allocres (void); -void F_loadres (int r, void *p); int F_findres (const char n[8]); int F_getresid (const char n[8]); void F_getresname (char n[8], int r); int F_getsprid (const char n[4], int s, int d, char *dir); int F_getreslen (int r); -void F_nextmus (char *s); -void F_randmus (char *s); +// void F_nextmus (char *s); +// void F_randmus (char *s); void F_loadmap (char n[8]); diff --git a/src/kos32/main.c b/src/kos32/main.c index c9ebfff..dc29252 100644 --- a/src/kos32/main.c +++ b/src/kos32/main.c @@ -138,7 +138,6 @@ void ERR_fatal (char *s, ...) { R_done(); MUS_done(); S_done(); - M_shutdown(); puts("\nCRITICAL ERROR:"); va_start(ap, s); vprintf(s, ap); @@ -568,12 +567,9 @@ int main (int argc, char **argv) { pl2.kwr = KEY_2; pl2.kp = KEY_E; srand(GetIdleCount()); - F_startup(); CFG_load(); F_addwad("doom2d.wad"); F_initwads(); - M_startup(); - F_allocres(); S_init(); MUS_init(); R_init(); @@ -585,7 +581,6 @@ int main (int argc, char **argv) { R_done(); MUS_done(); S_done(); - M_shutdown(); logo("system: halt\n"); return 0; } diff --git a/src/memory.c b/src/memory.c index bd3c609..9019586 100644 --- a/src/memory.c +++ b/src/memory.c @@ -18,14 +18,6 @@ #include "memory.h" #include "common/wadres.h" -void M_startup (void) { - // stub -} - -void M_shutdown (void) { - // stub -} - void *M_lock (int id) { return WADRES_lock(id); } diff --git a/src/memory.h b/src/memory.h index 90585d0..4174f76 100644 --- a/src/memory.h +++ b/src/memory.h @@ -18,8 +18,6 @@ #ifndef MEMORY_H_INCLULDED #define MEMORY_H_INCLULDED -void M_startup (void); -void M_shutdown (void); void *M_lock (int h); void M_unlock (void *p); int M_locked (int h); diff --git a/src/sdl/main.c b/src/sdl/main.c index 23f3311..2243ce0 100644 --- a/src/sdl/main.c +++ b/src/sdl/main.c @@ -132,7 +132,6 @@ void ERR_fatal (char *s, ...) { R_done(); MUS_done(); S_done(); - M_shutdown(); SDL_Quit(); puts("\nCRITICAL ERROR:"); va_start(ap, s); @@ -508,13 +507,10 @@ int main (int argc, char *argv[]) { pl2.kwr = KEY_2; pl2.kp = KEY_E; srand(SDL_GetTicks()); - F_startup(); F_addwad("doom2d.wad"); CFG_args(argc, argv); CFG_load(); F_initwads(); - M_startup(); - F_allocres(); S_init(); MUS_init(); R_init(); @@ -531,7 +527,6 @@ int main (int argc, char *argv[]) { R_done(); MUS_done(); S_done(); - M_shutdown(); SDL_Quit(); return 0; } diff --git a/src/sdl2/main.c b/src/sdl2/main.c index 9533040..3f149b5 100644 --- a/src/sdl2/main.c +++ b/src/sdl2/main.c @@ -133,7 +133,6 @@ void ERR_fatal (char *s, ...) { R_done(); MUS_done(); S_done(); - M_shutdown(); SDL_Quit(); puts("\nCRITICAL ERROR:"); va_start(ap, s); @@ -594,12 +593,9 @@ int main (int argc, char **argv) { pl2.kwr = KEY_2; pl2.kp = KEY_E; srand(SDL_GetTicks()); - F_startup(); CFG_load(); F_addwad("doom2d.wad"); F_initwads(); - M_startup(); - F_allocres(); S_init(); MUS_init(); R_init(); @@ -616,7 +612,6 @@ int main (int argc, char **argv) { R_done(); MUS_done(); S_done(); - M_shutdown(); SDL_Quit(); return 0; }