TILE.H 4.5 KB

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