readtex.h 1017 Bytes

/* 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);