readtex.h
1017 Bytes
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
/* For tex[].fmt: */
#define RGBA 0
#define YUV 1
#define CI 2
#define IA 3
#define I 4
#define A 5
#define MASK 6
#define C 0
#define RAW 1
#define MIPMAP 2
#define NONE 3
#define COLOR 0
#define INTENSITY 1
struct texture {
char name[64]; /* Name of the array */
int index; /* Texture index */
int width; /* X dimention */
int height; /* Y dimention */
int fmt; /* RGBA, IA, I, etc. */
int siz; /* Number of bits */
};
#define FLIP_FLAG (1)
#define PAD_FLAG (2)
#define XTRA_FLAG (4)
#define QUAD_FLAG (8)
extern int autoscale;
int readtex (char *fn, struct texture *tex, int fmt, int siz, int makestatic,
int lr, int lg, int lb, int hr, int hg, int hb, int output, int flags);
int readtexFile (FILE *fout, char *fn, struct texture *tex, int fmt, int siz, int makestatic,
int lr, int lg, int lb, int hr, int hg, int hb, int output, int flags);
char *fmtstr (int fmt);
char *cmbstr (int fmt);
char *sizstr (int siz);