DEADSOFTWARE

5433bfc15b16acb69580b2b73aa0a0822b18fe07
[flatwaifu.git] / src / files.h
1 /* Copyright (C) 1996-1997 Aleksey Volynskov
2 * Copyright (C) 2011 Rambo
3 * Copyright (C) 2020 SovietPony
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License ONLY.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
18 #ifndef FILES_H_INCLUDED
19 #define FILES_H_INCLUDED
21 #include "glob.h"
22 #include <stdio.h> // FILE
23 #include "map.h" // map_block_t
25 #define MAX_WADS 20
26 #define MAX_WAD 2000
28 typedef char wadname[8];
30 typedef struct {
31 int o, l;
32 char n[8];
33 } wad_t;
35 typedef struct {
36 int o, l;
37 char n[8];
38 int f;
39 } mwad_t;
41 extern int d_start, d_end;
42 extern mwad_t wad[MAX_WAD];
43 extern char wads[MAX_WADS][__MAX_PATH];
44 extern FILE* wadh[MAX_WADS];
46 void F_startup (void);
47 void F_addwad (const char *fn);
48 void F_initwads (void);
49 void F_allocres (void);
50 void F_loadres (int r, void *p, dword o, dword l);
51 int F_findres (const char n[8]);
52 int F_getresid (const char n[8]);
53 void F_getresname (char n[8], int r);
54 int F_getsprid (const char n[4], int s, int d, char *dir);
55 int F_getreslen (int r);
56 void F_nextmus (char *s);
57 void F_randmus (char *s);
58 void F_readstr (FILE* h, char *s, int m);
60 #endif /* FILES_H_INCLUDED */