TILE.H 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 (0)
  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. typedef struct {
  53. short Width; // Width of icons (pixels).
  54. short Height; // Height of icons (pixels).
  55. short Count; // Number of (logical) icons in this set.
  56. // BOOL Allocated; // Was this iconset allocated?
  57. short Allocated; // Was this iconset allocated?
  58. long Size; // Size of entire iconset memory block.
  59. unsigned char *Icons; // Offset from buffer start to icon data.
  60. long Palettes; // Offset from buffer start to palette data.
  61. long Remaps; // Offset from buffer start to remap index data.
  62. long TransFlag; // Offset for transparency flag table.
  63. unsigned char *Map; // Icon map offset (if present).
  64. } IControl_Type;
  65. #endif //(0)
  66. typedef struct {
  67. short Width; // Width of icons (pixels).
  68. short Height; // Height of icons (pixels).
  69. short Count; // Number of (logical) icons in this set.
  70. short Allocated; // Was this iconset allocated?
  71. short MapWidth; // Width of map (in icons).
  72. short MapHeight; // Height of map (in icons).
  73. long Size; // Size of entire iconset memory block.
  74. long Icons; // Offset from buffer start to icon data.
  75. // unsigned char * Icons; // Offset from buffer start to icon data.
  76. long Palettes; // Offset from buffer start to palette data.
  77. long Remaps; // Offset from buffer start to remap index data.
  78. long TransFlag; // Offset for transparency flag table.
  79. long ColorMap; // Offset for color control value table.
  80. long Map; // Icon map offset (if present).
  81. // unsigned char * Map; // Icon map offset (if present).
  82. } IControl_Type;
  83. #endif //TILE_H