1 #ifndef _INCLUDED_CHNKTEXI_H_
2 #define _INCLUDED_CHNKTEXI_H_
3 
4 #ifdef __cplusplus
5 	extern "C" {
6 #endif /* __cplusplus */
7 
8 /* image number for already loaded image - really an internal function */
9 #define GEI_NOTLOADED (-1)
10 extern int GetExistingImageNum(char const * pszActualFileName);
11 
12 enum /* flags, etc */
13 {
14 	/* destination surface type */
15 	LIO_CHIMAGE      = 0x00000000U, /* Chris Humphries texture */
16 	LIO_DDSURFACE    = 0x00000001U, /* Direct Draw Surface */
17 	LIO_D3DTEXTURE   = 0x00000002U, /* Direct 3D Texture */
18 	_LIO_SURFTYPEMASK= 0x00000003U,
19 	/* target memory type for DDSURFACE only - D3DTextures dest depends on driver */
20 	LIO_SYSMEM       = 0x00000000U, /* system memory */
21 	LIO_VIDMEM       = 0x00000004U, /* video memory */
22 	/* transparency flags - unless specified in the file */
23 	LIO_NONTRANSP    = 0x00000000U, /* no transparency */
24 	LIO_TRANSPARENT  = 0x00000008U, /* has transparency */
25 	/* alpha or chroma key? */
26 	LIO_USEALPHA     = 0x00000000U, /* use alpha mask if available instead of chroma keying */
27 	LIO_CHROMAKEY    = 0x00000010U, /* use chroma key even if surface has alpha channel */
28 	/* path flags */
29 	LIO_ABSOLUTEPATH = 0x00000000U, /* path is correct */
30 	LIO_RELATIVEPATH = 0x00000020U, /* path is relative to a textures directory */
31 	LIO_RIFFPATH     = 0x00000040U, /* current RIF file used to build path and extension */
32 	_LIO_PATHTYPEMASK= 0x00000060U,
33 	/* mip maps? */
34 	LIO_NOMIPMAPS    = 0x00000000U, /* no mip maps */
35 	LIO_LOADMIPMAPS  = 0x00000080U, /* load mip maps if available */
36 	/* restorable ? */
37 	LIO_NORESTORE    = 0x00000000U, /* not going to be restorable */
38 	LIO_RESTORABLE   = 0x00000100U, /* put something in imageheader to allow restoring */
39 };
40 
41 /* CL_LoadImageOnce relies on this value to be 1 greater
42    than the index of the last loaded image */
43 extern int NumImages;
44 
45 /* directories used with the LIO_RIFFPATH flag */
46 extern char const * GameTex_Directory;
47 extern char const * SubShps_Directory;
48 extern char const * GenTex_Directory;
49 extern char const * FixTex_Directory;
50 extern char const * ToolsTex_Directory;
51 
52 /* game mode for use with the above */
53 extern char const * cl_pszGameMode;
54 
55 /* directories used with the LIO_RELATIVEPATH flag
56    these are searched in order*/
57 extern char const * FirstTex_Directory;
58 extern char const * SecondTex_Directory;
59 
60 /* returns GEI_NOTLOADED on failure */
61 extern int CL_LoadImageOnce(char const * pszFileName, unsigned fFlagsEtc);
62 
63 /* returns NULL on failure, or pointer to pszDestBuf on success, nBufSize includes nul terminator */
64 extern char * CL_GetImageFileName(char * pszDestBuf, unsigned nBufSize, char const * pszFileName, unsigned fFlagsEtc);
65 
66 #ifdef __cplusplus
67 	}
68 #endif /* __cplusplus */
69 
70 #endif /* !_INCLUDED_CHNKTEXI_H_ */
71