TILE.H 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /***************************************************************************
  15. ** C O N F I D E N T I A L --- W E S T W O O D A S S O C I A T E S **
  16. ***************************************************************************
  17. * *
  18. * Project Name : Part of the TILE Library *
  19. * *
  20. * File Name : TILE.H *
  21. * *
  22. * Programmer : Barry W. Green *
  23. * *
  24. * Start Date : February 2, 1995 *
  25. * *
  26. * Last Update : February 2, 1995 [BWG] *
  27. * *
  28. *-------------------------------------------------------------------------*
  29. * Functions: *
  30. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  31. #ifndef TILE_H
  32. #define TILE_H
  33. /*=========================================================================*/
  34. /* The following prototypes are for the file: ICONSET.CPP */
  35. /*=========================================================================*/
  36. void * Load_Icon_Set(char const *filename, void *iconsetptr, long buffsize);
  37. void Free_Icon_Set(void const *iconset);
  38. long Get_Icon_Set_Size(void const *iconset);
  39. int Get_Icon_Set_Width(void const *iconset);
  40. int Get_Icon_Set_Height(void const *iconset);
  41. void * Get_Icon_Set_Icondata(void const *iconset);
  42. void * Get_Icon_Set_Trans(void const *iconset);
  43. void * Get_Icon_Set_Remapdata(void const *iconset);
  44. void * Get_Icon_Set_Palettedata(void const *iconset);
  45. int Get_Icon_Set_Count(void const *iconset);
  46. void * Get_Icon_Set_Map(void const *iconset);
  47. #if (1)
  48. /*
  49. ** This is the control structure at the start of a loaded icon set. It must match
  50. ** the structure in WWLIB.I! This structure MUST be a multiple of 16 bytes long.
  51. */
  52. // C&C version of struct
  53. typedef struct {
  54. short Width; // Width of icons (pixels).
  55. short Height; // Height of icons (pixels).
  56. short Count; // Number of (logical) icons in this set.
  57. // BOOL Allocated; // Was this iconset allocated?
  58. short Allocated; // Was this iconset allocated?
  59. long Size; // Size of entire iconset memory block.
  60. unsigned char *Icons; // Offset from buffer start to icon data.
  61. long Palettes; // Offset from buffer start to palette data.
  62. long Remaps; // Offset from buffer start to remap index data.
  63. long TransFlag; // Offset for transparency flag table.
  64. unsigned char *Map; // Icon map offset (if present).
  65. } IControl_Type;
  66. #else
  67. // RA version of struct
  68. typedef struct {
  69. short Width; // Width of icons (pixels).
  70. short Height; // Height of icons (pixels).
  71. short Count; // Number of (logical) icons in this set.
  72. short Allocated; // Was this iconset allocated?
  73. short MapWidth; // Width of map (in icons).
  74. short MapHeight; // Height of map (in icons).
  75. long Size; // Size of entire iconset memory block.
  76. long Icons; // Offset from buffer start to icon data.
  77. // unsigned char * Icons; // Offset from buffer start to icon data.
  78. long Palettes; // Offset from buffer start to palette data.
  79. long Remaps; // Offset from buffer start to remap index data.
  80. long TransFlag; // Offset for transparency flag table.
  81. long ColorMap; // Offset for color control value table.
  82. long Map; // Icon map offset (if present).
  83. // unsigned char * Map; // Icon map offset (if present).
  84. } IControl_Type;
  85. #endif
  86. #endif //TILE_H