DEADSOFTWARE

portability: avoid errors on some compilers
[flatwaifu.git] / src / common / wadres.h
1 #ifndef COMMON_WADRES_H_INCLUDED
2 #define COMMON_WADRES_H_INCLUDED
4 #include "common/streams.h"
6 #define MAX_WADS 20
7 #define MAX_RESOURCES 2000
9 int WADRES_addwad (Stream *r);
10 int WADRES_rehash (void);
12 int WADRES_find (const char name[8]);
13 int WADRES_maxids (void);
15 // Get sprite resource id.
16 // Sprite name has following format:
17 // (nnnn)('A'+s)('0'+d)[('A'+s)('0'+d)]
18 // Letter means animation frame
19 // A for first, B for second...
20 // Number means direction
21 // 0 = front
22 // 1 = left
23 // 2 = right
24 // Optional part means that this file can be used for differnt frame/direction.
25 // Note that if found FRONT direction for this frame than it UNCONDITIONALLY used.
26 // Note that search performed between markers S_START and S_END in order as paced in wad.
27 // int n[4] -- sprite name
28 // int s -- sprite frame
29 // int d -- sprite direction
30 // char *dir -- out flag "alternative used"
31 int WADRES_findsprite (const char n[4], int s, int d, char *dir);
33 Stream *WADRES_getbasereader (int id);
34 long WADRES_getoffset (int id);
35 long WADRES_getsize (int id);
36 void WADRES_getname (int id, char *name);
37 void WADRES_getdata (int id, void *data);
39 void *WADRES_lock (int id);
40 void WADRES_unlock (void *data);
41 int WADRES_locked (int id);
42 int WADRES_was_locked (int id);
44 #endif /* COMMON_WADRES_H_INCLUDED */