CnC_Remastered_Collection

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

SPECIAL.H (8133B)


      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\special.h_v   2.15   16 Oct 1995 16:47:36   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 : SPECIAL.H                                                    *
     24  *                                                                                             *
     25  *                   Programmer : Joe L. Bostic                                                *
     26  *                                                                                             *
     27  *                   Start Date : 02/27/95                                                     *
     28  *                                                                                             *
     29  *                  Last Update : February 27, 1995 [JLB]                                      *
     30  *                                                                                             *
     31  *---------------------------------------------------------------------------------------------*
     32  * Functions:                                                                                  *
     33  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
     34 
     35 #ifndef SPECIAL_H
     36 #define SPECIAL_H
     37 
     38 class SpecialClass
     39 {
     40 	public:
     41 		void Init(void) {
     42 			IsScrollMod = false;
     43 			IsGross = false;
     44 			IsEasy = false;
     45 			IsDifficult = false;
     46 			IsSpeedBuild = false;
     47 			IsDefenderAdvantage = true;
     48 			IsVisibleTarget = false;
     49 			IsVariation = false;
     50 			IsJurassic = false;
     51 			IsJuvenile = false;
     52 			IsSmartDefense = false;
     53 			IsTreeTarget = false;
     54 			IsMCVDeploy = false;
     55 			IsVisceroids = false;
     56 			IsMonoEnabled = false;
     57 			IsInert = false;
     58 			IsShowPath = false;
     59 			IsThreePoint = false;
     60 			IsTGrowth = true;
     61 			IsTSpread = true;
     62 			IsTFast = true;
     63 			IsRoad = false;
     64 			IsScatter = false;
     65 			IsCaptureTheFlag = false;
     66 			IsNamed = false;
     67 			IsFromInstall = false;
     68 			IsSeparate = false;
     69 			IsFromWChat = false;
     70 			IsEarlyWin = false;
     71 			HealthBarDisplayMode = HB_SELECTED;
     72 			ResourceBarDisplayMode = RB_SELECTED;
     73 			ModernBalance = false;
     74 		}
     75 
     76 		/*
     77 		**	Is the game flagged for easy mode?
     78 		*/
     79 		unsigned IsEasy:1;
     80 
     81 		/*
     82 		**	Is the game flagged for difficult?
     83 		*/
     84 		unsigned IsDifficult:1;
     85 
     86 		/*
     87 		**	Controls the speedy build option -- used for testing.
     88 		*/
     89 		unsigned IsSpeedBuild:1;
     90 
     91 		/*
     92 		**	If the player can build the helipad separate from the helipad and
     93 		**	helicopter combo, then this flag will be true.
     94 		*/
     95 		unsigned IsSeparate:1;
     96 
     97 		/*
     98 		**	If the defender has the advantage then this will be true. This flag
     99 		**	allows the defender to have a better advantage in combat than the
    100 		**	attacker. Moving units will not be able to dish out or take as much
    101 		**	damage when this flag is true.
    102 		*/
    103 		unsigned IsDefenderAdvantage:1;
    104 
    105 		/*
    106 		**	If civilian structures are to have a name, then this flag will be
    107 		**	set to true. The default case is to just use generic names for
    108 		**	civilians.
    109 		*/
    110 		unsigned IsNamed:1;
    111 
    112 		/*
    113 		** If from install, then play the special installation movie and
    114 		** skip asking them what type of game they want to play.
    115 		*/
    116 		unsigned IsFromInstall:1;
    117 
    118 		/*
    119 		**	If capture the flag mode is on, this flag will be true. With this
    120 		**	flag enabled, then the flag is initially placed at the start of
    121 		**	the scenario.
    122 		*/
    123 		unsigned IsCaptureTheFlag:1;
    124 
    125 		/*
    126 		**	Is target selecting by other human opponents visible to the player?
    127 		*/
    128 		unsigned IsVisibleTarget:1;
    129 
    130 		/*
    131 		**	If human generated sound effects are to be used, then this
    132 		**	flag will be true.
    133 		*/
    134 		unsigned IsJuvenile:1;
    135 
    136 		/*
    137 		**	If friendly units should return fire when fired upon, set this
    138 		**	flag to true. The default is only for the enemy units to do this.
    139 		*/
    140 		unsigned IsSmartDefense:1;
    141 
    142 		/*
    143 		**	If targeting of trees is allowed, then this flag will be true.
    144 		*/
    145 		unsigned IsTreeTarget:1;
    146 
    147 		/*
    148 		**	If this flag is true, then the construction yard can undeploy back into an MCV.
    149 		*/
    150 		unsigned IsMCVDeploy:1;
    151 
    152 		/*
    153 		**	Controls whether or not visceroids spawn
    154 		*/
    155 		unsigned IsVisceroids:1;
    156 
    157 		/*
    158 		**	If the monochrome debugging output is enabled, then this flag will be true.
    159 		*/
    160 		unsigned IsMonoEnabled:1;
    161 
    162 		/*
    163 		**	This flags controls whether weapons are inert. An inert weapon doesn't do any
    164 		**	damage. Effectively, if this is true, then the units never die.
    165 		*/
    166 		unsigned IsInert:1;
    167 
    168 		/*
    169 		**	When this flag is true, the computer findpath algorithm reveals the route being
    170 		**	examined. This is used to trace findpath bugs.
    171 		*/
    172 		unsigned IsShowPath:1;
    173 
    174 		/*
    175 		**	If wheeled vehicles should do a 3-point turn when rotating in place, then
    176 		**	this flag is true.
    177 		*/
    178 		unsigned IsThreePoint:1;
    179 
    180 		/*
    181 		**	If Tiberium is allowed to grow, then this flag will be true.
    182 		*/
    183 		unsigned IsTGrowth:1;
    184 
    185 		/*
    186 		**	If Tiberium is allowed to spread, then this flag will be true.
    187 		*/
    188 		unsigned IsTSpread:1;
    189 
    190 		/*
    191 		**	This controls whether Tiberium grows&spreads quickly or not.
    192 		*/
    193 		unsigned IsTFast:1;
    194 
    195 		/*
    196 		**	This flag controls whether the road additional pieces are added to
    197 		**	the bottom of buildings. If true, then the roads are NOT added.
    198 		*/
    199 		unsigned IsRoad:1;
    200 
    201 		/*
    202 		**	Controls whether units (especially infantry) will scatter when there
    203 		**	is an immediate threat. This gives infantry a "mind of their own" when
    204 		**	it comes to self preservation. If set to false, then units will not
    205 		**	scatter.
    206 		*/
    207 		unsigned IsScatter:1;
    208 
    209 		/*
    210 		**	Special bonus scenario enabled.
    211 		*/
    212 		unsigned IsJurassic:1;
    213 
    214 		/*
    215 		**	Are score variations allowed?
    216 		*/
    217 		unsigned IsVariation:1;
    218 
    219 		/*
    220 		**	If the gross human splatter marks should be present.
    221 		*/
    222 		unsigned IsGross:1;
    223 
    224 		/*
    225 		**	Disables scrolling over the "options" and "sidebar" tabs.
    226 		*/
    227 		unsigned IsScrollMod:1;
    228 
    229 		/*
    230 		** Flag that we were spawned from WChat.
    231 		*/
    232 		unsigned IsFromWChat:1;
    233 
    234 		/*
    235 		** New anti-griefing early win mode. ST - 1/31/2020 3:42PM
    236 		*/
    237 		unsigned IsEarlyWin:1;
    238 
    239 		/*
    240 		** Health bar display mode
    241 		*/
    242 		enum eHealthBarDisplayMode
    243 		{
    244 			HB_DAMAGED = 0,
    245 			HB_ALWAYS,
    246 			HB_SELECTED
    247 		} HealthBarDisplayMode;
    248 
    249 		/*
    250 		** Resource bar display mode
    251 		*/
    252 		enum eResourceBarDisplayMode
    253 		{
    254 			RB_SELECTED = 0,
    255 			RB_ALWAYS,
    256 		} ResourceBarDisplayMode;
    257 
    258 		/*
    259 		** New modern balance setting.
    260 		*/
    261 		unsigned ModernBalance:1;
    262 
    263 		/*
    264 		** Some additional padding in case we need to add data to the class and maintain backwards compatibility for save/load
    265 		*/
    266 		// MBL 07.21.2020 - https://jaas.ea.com/browse/TDRA-7537
    267 		// Loading save files from Live and July Patch 3 Beta versions results in a crash
    268 		// Fixes issue from Change 738397 2020/07/17 14:06:03
    269 		// 
    270 		// unsigned char SaveLoadPadding[127];
    271 		//
    272 		unsigned char SaveLoadPadding[124]; 
    273 };
    274 
    275 
    276 #endif