CnC_Remastered_Collection

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

COMPAT.H (5872B)


      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 /* $Header:   F:\projects\c&c\vcs\code\compat.h_v   2.19   16 Oct 1995 16:46:02   JOE_BOSTIC  $ */
     17 /***********************************************************************************************
     18  ***              C O N F I D E N T I A L  ---  W E S T W O O D  S T U D I O S               ***
     19  ***********************************************************************************************
     20  *                                                                                             *
     21  *                 Project Name : Command & Conquer                                            *
     22  *                                                                                             *
     23  *                    File Name : COMPAT.H                                                     *
     24  *                                                                                             *
     25  *                   Programmer : Joe L. Bostic                                                *
     26  *                                                                                             *
     27  *                   Start Date : 03/02/95                                                     *
     28  *                                                                                             *
     29  *                  Last Update : March 2, 1995 [JLB]                                          *
     30  *                                                                                             *
     31  *---------------------------------------------------------------------------------------------*
     32  * Functions:                                                                                  *
     33  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
     34 
     35 #ifndef COMPAT_H
     36 #define COMPAT_H
     37 
     38 
     39 //#include "i86.h"
     40 
     41 #define  KeyNumType	int
     42 #define  KeyASCIIType	int
     43 
     44 
     45 
     46 #define	BuffType		BufferClass
     47 #define movmem(a,b,c) memmove(b,a,c)
     48 #define ShapeBufferSize	_ShapeBufferSize
     49 extern "C" {
     50 	extern	long ShapeBufferSize;
     51 	extern	char *ShapeBuffer;
     52 }
     53 
     54 /*=========================================================================*/
     55 /* Define some equates for the different graphic routines we will install	*/
     56 /*		later.																					*/
     57 /*=========================================================================*/
     58 #define HIDBUFF	  ((void *)(0xA0000))
     59 //#define Size_Of_Region(a, b) a*b
     60 
     61 /*=========================================================================*/
     62 /* Define some Graphic Routines which will only be fixed by these defines	*/
     63 /*=========================================================================*/
     64 #define Set_Font_Palette(a) 		Set_Font_Palette_Range(a, 0, 15)
     65 
     66 /*
     67 **	These are the Open_File, Read_File, and Seek_File constants.
     68 */
     69 #define READ						1	// Read access.
     70 #define WRITE						2	// Write access.
     71 
     72 #ifndef SEEK_SET
     73 #define SEEK_SET					0	// Seek from start of file.
     74 #define SEEK_CUR					1	// Seek relative from current location.
     75 #define SEEK_END					2	// Seek from end of file.
     76 #endif
     77 
     78 #define ERROR_WINDOW 			1
     79 #define ErrorWindow 			1
     80 
     81 
     82 extern unsigned char *Palette;
     83 extern unsigned char MDisabled;			// Is mouse disabled?
     84 extern WORD Hard_Error_Occured;
     85 
     86 /*
     87 **	This is the menu control structures.
     88 */
     89 typedef enum MenuIndexType {
     90 	MENUX,
     91 	MENUY,
     92 	ITEMWIDTH,
     93 	ITEMSHIGH,
     94 	MSELECTED,
     95 	NORMCOL,
     96 	HILITE,
     97 	MENUPADDING=0x1000
     98 } MenuIndexType;
     99 
    100 
    101 #define BITSPERBYTE 8
    102 #define MAXSHORT    0x7fff
    103 #define HIBITS      0x8000
    104 //#define MAXLONG     0x7fffffffL
    105 #define HIBITL      0x80000000
    106 
    107 //PG_TO_FIX
    108 #ifndef MAXINT
    109 #define MAXINT      MAXLONG
    110 #endif
    111 #define HIBITI      HIBITL
    112 
    113 #define DMAXEXP     308
    114 #define FMAXEXP     38
    115 #define DMINEXP     -307
    116 #define FMINEXP     -37
    117 
    118 #define MAXDOUBLE   1.797693E+308
    119 #define MAXFLOAT    3.37E+38F
    120 #define MINDOUBLE   2.225074E-308
    121 #define MINFLOAT    8.43E-37F
    122 
    123 #define DSIGNIF     53
    124 #define FSIGNIF     24
    125 
    126 #define DMAXPOWTWO  0x3FF
    127 #define FMAXPOWTWO  0x7F
    128 #define DEXPLEN     11
    129 #define FEXPLEN     8
    130 #define EXPBASE     2
    131 #define IEEE        1
    132 #define LENBASE     1
    133 #define HIDDENBIT   1
    134 #define LN_MAXDOUBLE    7.0978E+2
    135 #define LN_MINDOUBLE    -7.0840E+2
    136 
    137 /* These defines handle the various names given to the same color. */
    138 #define	DKGREEN	GREEN
    139 #define	DKBLUE	BLUE
    140 #define	GRAY		GREY
    141 #define	DKGREY	GREY
    142 #define	DKGRAY	GREY
    143 #define	LTGRAY	LTGREY
    144 
    145 #if 0
    146 typedef struct {
    147 	short	Width;			// Width of icons (pixels).
    148 	short	Height;			// Height of icons (pixels).
    149 	short	Count;			// Number of (logical) icons in this set.
    150 	short	Allocated;		// Was this iconset allocated?
    151 	long	Size;				// Size of entire iconset memory block.
    152 	unsigned char * Icons;			// Offset from buffer start to icon data.
    153 	long	Palettes;		// Offset from buffer start to palette data.
    154 	long	Remaps;			// Offset from buffer start to remap index data.
    155 	long	TransFlag;		// Offset for transparency flag table.
    156 	unsigned char * Map;				// Icon map offset (if present).
    157 } IControl_Type;
    158 #endif
    159 
    160 
    161 
    162 void Stuff_Key_Num ( int );
    163 
    164 
    165 extern "C"{
    166 extern int MouseQX;
    167 extern int MouseQY;
    168 }
    169 
    170 #endif