1 //-----------------------------------------------------------------------------
2 //
3 // ImageLib Sources
4 // Copyright (C) 2000-2002 by Denton Woods
5 // Last modified: 05/25/2001 <--Y2K Compliant! =]
6 //
7 // Filename: src-IL/include/il_pal.h
8 //
9 // Description: Loads palettes from different file formats
10 //
11 //-----------------------------------------------------------------------------
12 
13 
14 #ifndef IL_PAL_H
15 #define IL_PAL_H
16 
17 #include "il_internal.h"
18 
19 #define BUFFLEN	256
20 #define PALBPP	3
21 
22 #ifdef _MSC_VER
23 #pragma pack(push, packed_struct, 1)
24 #endif
25 typedef struct HALOHEAD
26 {
27 	ILushort	Id;  // 'AH'
28 	ILshort		Version;
29 	ILshort		Size;
30 	ILbyte		Filetype;
31 	ILbyte		Subtype;
32 	//ILshort	Brdid, Grmode;
33 	ILint		Ignored;
34 	ILushort	MaxIndex;  // Colors = maxindex + 1
35 	ILushort	MaxRed;
36 	ILushort	MaxGreen;
37 	ILushort	MaxBlue;
38 	/*ILbyte	Signature[8];
39 	ILbyte		Filler[12];*/
40 	ILbyte		Filler[20];  // Always 0 by PSP 4
41 } IL_PACKSTRUCT HALOHEAD;
42 #ifdef _MSC_VER
43 #pragma pack(pop,  packed_struct)
44 #endif
45 
46 ILboolean	ilLoadJascPal(ILconst_string FileName);
47 ILboolean	ilSaveJascPal(ILconst_string FileName);
48 char		*iFgetw(ILubyte *Buff, ILint MaxLen, FILE *File);
49 ILboolean	ilLoadHaloPal(ILconst_string FileName);
50 ILboolean	ilLoadColPal(ILconst_string FileName);
51 ILboolean	ilLoadActPal(ILconst_string FileName);
52 ILboolean	ilLoadPltPal(ILconst_string FileName);
53 
54 #endif//IL_PAL_H
55