-
Notifications
You must be signed in to change notification settings - Fork 7
/
brfToken.h
54 lines (46 loc) · 1.08 KB
/
brfToken.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* OpenBRF -- by marco tarini. Provided under GNU General Public License */
#ifndef BRFTOKEN_H
#define BRFTOKEN_H
typedef enum{
MESH,
TEXTURE,
SHADER,
MATERIAL,
SKELETON,
ANIMATION,
BODY,
N_TOKEN,
NONE
} TokenEnum;
// used to identify an object (a mesh, or a texture, or...) in a iniFile
class ObjCoord{
public:
ObjCoord(int _fi,int _oi, int _t):fi(_fi),oi(_oi),t(_t){}
ObjCoord():fi(0),oi(0),t(NONE){}
static ObjCoord Invalid(){return ObjCoord(-1,-1,NONE);}
bool isValid() const {return fi!=-1;}
int fi; // file index
int oi; // object index inside that file
int t; // token index
};
typedef enum{
TXTFILE_ACTIONS,
TXTFILE_SKIN,
TXTFILE_ITEM,
TXTFILE_MESHES,
TXTFILE_ICONS,
TXTFILE_PROP,
TXTFILE_PARTICLE,
TXTFILE_TABLEAU,
TXTFILE_FLORA_KINDS,
TXTFILE_GROUND_SPECS,
TXTFILE_SKYBOXES,
TXTFILE_SCENES,
N_TXTFILES,
TXTFILE_CORE,
TXTFILE_NONE,
} FileTxtEnum;
inline static unsigned int bitMask(int txt){return 1<<txt;}
extern const char * txtFileName[TXTFILE_NONE+1];
extern const char * tokenBrfName[N_TOKEN];
#endif // BRFTOKEN_H