CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

TILE.H (4727B)


      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 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 /***************************************************************************
     17  **   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   **
     18  ***************************************************************************
     19  *                                                                         *
     20  *                 Project Name : Part of the TILE Library                 *
     21  *                                                                         *
     22  *                    File Name : TILE.H                                   *
     23  *                                                                         *
     24  *                   Programmer : Barry W. Green                           *
     25  *                                                                         *
     26  *                   Start Date : February 2, 1995                         *
     27  *                                                                         *
     28  *                  Last Update : February 2, 1995 [BWG]                   *
     29  *                                                                         *
     30  *-------------------------------------------------------------------------*
     31  * Functions:                                                              *
     32  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
     33 
     34 #ifndef TILE_H
     35 #define TILE_H
     36 
     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 
     52 
     53 
     54 #if (1)
     55 /*
     56 ** This is the control structure at the start of a loaded icon set.  It must match
     57 ** the structure in WWLIB.I!  This structure MUST be a multiple of 16 bytes long.
     58 */
     59 
     60 // C&C version of struct
     61 typedef struct {
     62 	short	Width;			// Width of icons (pixels).
     63 	short	Height;			// Height of icons (pixels).
     64 	short	Count;			// Number of (logical) icons in this set.
     65 //	BOOL	Allocated;		// Was this iconset allocated?
     66 	short	Allocated;		// Was this iconset allocated?
     67 	long	Size;				// Size of entire iconset memory block.
     68 	unsigned char *Icons;			// Offset from buffer start to icon data.
     69 	long	Palettes;		// Offset from buffer start to palette data.
     70 	long	Remaps;			// Offset from buffer start to remap index data.
     71 	long	TransFlag;		// Offset for transparency flag table.
     72 	unsigned char *Map;				// Icon map offset (if present).
     73 } IControl_Type;
     74 
     75 
     76 #else
     77 
     78 // RA version of struct
     79 typedef struct {
     80 	short	Width;			// Width of icons (pixels).
     81 	short	Height;			// Height of icons (pixels).
     82 	short	Count;			// Number of (logical) icons in this set.
     83 	short	Allocated;		// Was this iconset allocated?
     84 	short MapWidth;		// Width of map (in icons).
     85 	short MapHeight;		// Height of map (in icons).
     86 	long	Size;				// Size of entire iconset memory block.
     87 	long	Icons;			// Offset from buffer start to icon data.
     88 //	unsigned char * Icons;	// Offset from buffer start to icon data.
     89 	long	Palettes;		// Offset from buffer start to palette data.
     90 	long	Remaps;			// Offset from buffer start to remap index data.
     91 	long	TransFlag;		// Offset for transparency flag table.
     92 	long	ColorMap;		// Offset for color control value table.
     93 	long	Map;				// Icon map offset (if present).
     94 //	unsigned char * Map;				// Icon map offset (if present).
     95 } IControl_Type;
     96 
     97 #endif
     98 
     99 
    100 #endif //TILE_H