il_pal.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #ifndef IL_PAL_H
  13. #define IL_PAL_H
  14. #include "il_internal.h"
  15. #define BUFFLEN 256
  16. #define PALBPP 3
  17. #ifdef _MSC_VER
  18. #pragma pack(push, packed_struct, 1)
  19. #endif
  20. typedef struct HALOHEAD
  21. {
  22. ILushort Id; // 'AH'
  23. ILshort Version;
  24. ILshort Size;
  25. ILbyte Filetype;
  26. ILbyte Subtype;
  27. //ILshort Brdid, Grmode;
  28. ILint Ignored;
  29. ILushort MaxIndex; // Colors = maxindex + 1
  30. ILushort MaxRed;
  31. ILushort MaxGreen;
  32. ILushort MaxBlue;
  33. /*ILbyte Signature[8];
  34. ILbyte Filler[12];*/
  35. ILbyte Filler[20]; // Always 0 by PSP 4
  36. } IL_PACKSTRUCT HALOHEAD;
  37. #ifdef _MSC_VER
  38. #pragma pack(pop, packed_struct)
  39. #endif
  40. ILboolean ilLoadJascPal(ILconst_string FileName);
  41. ILboolean ilSaveJascPal(ILconst_string FileName);
  42. char *iFgetw(ILubyte *Buff, ILint MaxLen, FILE *File);
  43. ILboolean ilLoadHaloPal(ILconst_string FileName);
  44. ILboolean ilLoadColPal(ILconst_string FileName);
  45. ILboolean ilLoadActPal(ILconst_string FileName);
  46. ILboolean ilLoadPltPal(ILconst_string FileName);
  47. #endif//IL_PAL_H