1 /* Copyright (C) 1996-1997 Aleksey Volynskov
2 * Copyright (C) 2011 Rambo
3 * Copyright (C) 2020 SovietPony
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.
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.
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/>.
18 #ifndef FILES_H_INCLUDED
19 #define FILES_H_INCLUDED
24 #define SAVE_MAXLEN 24
26 extern char savname
[SAVE_MAX
][SAVE_MAXLEN
];
27 extern char savok
[SAVE_MAX
];
28 extern int d_start
, d_end
;
30 void F_addwad (const char *fn
);
31 void F_initwads (void);
32 int F_findres (const char n
[8]);
33 int F_getresid (const char n
[8]);
34 void F_getresname (char n
[8], int r
);
35 int F_getreslen (int r
);
37 // Get sprite resource id.
38 // Sprite name has following format:
39 // (nnnn)('A'+s)('0'+d)[('A'+s)('0'+d)]
40 // Letter means animation frame
41 // A for first, B for second...
42 // Number means direction
46 // Optional part means that this file can be used for differnt frame/direction.
47 // Note that if found FRONT direction for this frame than it UNCONDITIONALLY used.
48 // Note that search performed between markers S_START and S_END in order as paced in wad.
49 // int n[4] -- sprite name
50 // int s -- sprite frame
51 // int d -- sprite direction
52 // char *dir -- out flag "alternative used"
53 int F_getsprid (const char n
[4], int s
, int d
, char *dir
);
55 // void F_nextmus (char *s);
56 // void F_randmus (char *s);
58 void F_loadmap (char n
[8]);
60 void F_getsavnames (void);
61 void F_savegame (int n
, char *s
);
62 void F_loadgame (int n
);
64 #endif /* FILES_H_INCLUDED */