-
Notifications
You must be signed in to change notification settings - Fork 6
/
BLP.h
40 lines (34 loc) · 818 Bytes
/
BLP.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
#ifndef BLP_H
#define BLP_H
///////////////////////////////////////////////////////////////////////////////
// BLP Stuff
const char BLPID[4] = {'B', 'L', 'P', '2'};
struct BLPHeader
{
char id[4];
unsigned int version;
unsigned char encoding; // 1 = palettized, 2 = DXT, 3 = raw BGRA?
unsigned char alphaBitDepth; // so far, 0, 1, or 8
unsigned char alphaEncoding; // 7 indicates DXT5, 1 is DXT3.
unsigned char hasMips; // 0 = no mips, 1 = has mips
unsigned int xResolution;
unsigned int yResolution;
unsigned int mipOffsets[16];
unsigned int mipSizes[16];
};
enum
{
BLP_ENCODING_INVALID,
BLP_ENCODING_PALETTIZED,
BLP_ENCODING_COMPRESSED,
BLP_ENCODING_BGRA,
BLP_ENCODING_COUNT
};
static const char* encodingStrings[] =
{
"[Invalid]",
"Palettized",
"Compressed",
"BGRA",
};
#endif // BLP_H