SCENARIO.H (10827B)
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: /CounterStrike/SCENARIO.H 1 3/03/97 10:25a 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 : SCENARIO.H * 24 * * 25 * Programmer : Joe L. Bostic * 26 * * 27 * Start Date : 02/26/96 * 28 * * 29 * Last Update : February 26, 1996 [JLB] * 30 * * 31 *---------------------------------------------------------------------------------------------* 32 * Functions: * 33 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 34 35 36 #ifndef SCENARIO_H 37 #define SCENARIO_H 38 39 40 /* 41 ** This class holds the information about the current game being played. This information is 42 ** global to the scenario and is generally of a similar nature to the information that was held 43 ** in the controlling scenario INI file. It is safe to write this structure out as a whole since 44 ** it doesn't contain any embedded pointers. 45 */ 46 class ScenarioClass { 47 public: 48 49 // Constructor. 50 ScenarioClass(void); 51 void Set_Scenario_Name(int scenario, ScenarioPlayerType player, ScenarioDirType dir = SCEN_DIR_NONE, ScenarioVarType var = SCEN_VAR_NONE); 52 void Set_Scenario_Name(char const * name); 53 54 bool Set_Global_To(int global, bool value); 55 void Do_BW_Fade(void); 56 void Do_Fade_AI(void); 57 58 /* 59 ** This is the source of the random numbers used in the game. This controls 60 ** the game logic and thus must be in sync with any networked machines. 61 */ 62 RandomClass RandomNumber; 63 64 /* 65 ** This is the difficulty setting of the game. 66 */ 67 DiffType Difficulty; // For human player. 68 DiffType CDifficulty; // For computer players. 69 70 /* 71 ** This is the main mission timer. This is the timer that is reset at the 72 ** start of the mission. It, effectively, holds the elapsed time of the 73 ** mission. 74 */ 75 TTimerClass<FrameTimerClass> Timer; 76 77 /* 78 ** This is an array of waypoints; each waypoint corresponds to a letter of 79 ** the alphabet, and points to a cell number. -1 means unassigned. 80 ** The CellClass has a bit that tells if that cell has a waypoint attached to 81 ** it; the only way to find which waypoint it is, is to scan this array. This 82 ** shouldn't be needed often; usually, you know the waypoint & you want the CELL. 83 */ 84 CELL Waypoint[WAYPT_COUNT]; 85 86 /* 87 ** This holds the system wide mission countdown timer. Time based missions 88 ** are governed by this timer. Various trigger events can modify and examine 89 ** this timer. The current value of this timer will display on the game 90 ** screen. 91 */ 92 CDTimerClass<FrameTimerClass> MissionTimer; 93 94 /* 95 ** The shroud regrowth (if enabled) is regulated by this timer. When the 96 ** timer expires, the shroud will regrow one step. 97 */ 98 CDTimerClass<FrameTimerClass> ShroudTimer; 99 100 /* 101 ** The scenario number. 102 */ 103 int Scenario; 104 105 /* 106 ** The theater of the current scenario. 107 */ 108 TheaterType Theater; 109 110 /* 111 ** The full name of the scenario (as it exists on disk). 112 */ 113 char ScenarioName[_MAX_FNAME+_MAX_EXT]; 114 115 /* 116 ** Description of the scenario. 117 */ 118 char Description[DESCRIP_MAX]; 119 120 /* 121 ** The filename of the introduction movie. 122 */ 123 VQType IntroMovie; 124 125 /* 126 ** The filename of the briefing movie. 127 */ 128 VQType BriefMovie; 129 130 /* 131 ** The filename of the movie to play if the scenario is won. 132 */ 133 VQType WinMovie; 134 /* 135 ** The filename of the movie to play if the scenario is won. 136 */ 137 VQType WinMovie2; 138 /* 139 ** The filename of the movie to play if the scenario is won. 140 */ 141 VQType WinMovie3; 142 /* 143 ** The filename of the movie to play if the scenario is won. 144 */ 145 VQType WinMovie4; 146 147 /* 148 ** The filename of the movie to play if the scenario is lost. 149 */ 150 VQType LoseMovie; 151 152 /* 153 ** The filename of the movie to play right after the briefing and 154 ** just before the game. 155 */ 156 VQType ActionMovie; 157 158 /* 159 ** This is the full text of the briefing. This text will be 160 ** displayed when the player commands the "restate mission 161 ** objectives" operation. 162 */ 163 char BriefingText[1024]; 164 165 /* 166 ** This is the theme to start playing at the beginning of the action 167 ** movie. A score started in this fashion will continue to play as 168 ** the game progresses. 169 */ 170 ThemeType TransitTheme; 171 172 /* 173 ** The house that the player is to be (obsolete). 174 */ 175 HousesType PlayerHouse; 176 177 /* 178 ** The percentage of money that is allowed to be carried over into the 179 ** following scenario. 180 */ 181 fixed CarryOverPercent; 182 183 /* 184 ** This is the amount of money that was left over in the previous 185 ** scenario. 186 */ 187 int CarryOverMoney; 188 189 /* 190 ** This specifies the maximum amount of money that is allowed to be 191 ** carried over from the previous scenario. This limits the amount 192 ** regardless of what the carry over percentage is set to. 193 */ 194 int CarryOverCap; 195 196 /* 197 ** This is the percent that the computer controlled base is to be 198 ** built up to at the scenario start. 199 */ 200 int Percent; 201 202 /* 203 ** Global flags that are used in the trigger system and are persistent 204 ** over the course of the game. 205 */ 206 bool GlobalFlags[30]; 207 208 /* 209 ** This records the bookmark view locations the player has recorded. 210 */ 211 CELL Views[4]; 212 213 /* 214 ** This is the number of active passable bridges in the current game. 215 */ 216 int BridgeCount; 217 218 /* 219 ** This records the carry over timer value that is used when the mission 220 ** starts (presuming the appropriate flag is set) and also used when the 221 ** scenario restarts. 222 */ 223 int CarryOverTimer; 224 225 /* 226 ** If a bridge has been destroyed, then this flag will be set to true. 227 ** If there is a trigger that depends on this, it might be triggered. 228 */ 229 unsigned IsBridgeChanged:1; 230 231 /* 232 ** If a global has changed and global change trigger events must be 233 ** processed, then this flag will be set to true. 234 */ 235 unsigned IsGlobalChanged:1; 236 237 /* 238 ** Are the buildings and units in this scenario to carry over into 239 ** some (unspecified) later scenario and thus have to be recorded 240 ** at the end? 241 */ 242 unsigned IsToCarryOver:1; 243 244 /* 245 ** Is this scenario to begin by taking the previously recorded 246 ** carryover objects and creating them onto the map? 247 */ 248 unsigned IsToInherit:1; 249 250 /* 251 ** If Tanya or a civilian is to be automatically evacuated when they enter 252 ** a transport vehicle, then this flag will be true. 253 */ 254 unsigned IsTanyaEvac:1; 255 256 /* 257 ** These variables are assigned to the chronosphere effect, and control 258 ** whether the palette should be fading towards b&w or towards color. 259 */ 260 unsigned IsFadingBW:1; 261 unsigned IsFadingColor:1; 262 263 /* 264 ** If this scenario is to be the last mission of the game (for this side), then 265 ** this flag will be true. 266 */ 267 unsigned IsEndOfGame:1; 268 269 /* 270 ** If the mission countdown timer is to be inherited from the previous 271 ** scenario, then this flag will be set to true. 272 */ 273 unsigned IsInheritTimer:1; 274 275 /* 276 ** If the spy plane is to be disabled in this scenario even though circumstances 277 ** might otherwise indicate that it should appear, then this flag will be true. 278 */ 279 unsigned IsNoSpyPlane:1; 280 281 /* 282 ** If the score screen (and "mission accomplished" voice) is to be skipped when 283 ** this scenario is finished, then this flag will be true. 284 */ 285 unsigned IsSkipScore:1; 286 287 /* 288 ** If this is to be a one time only mission such that when it is completed, the game 289 ** will return to the main menu, then this flag will be set to true. 290 */ 291 unsigned IsOneTimeOnly:1; 292 293 /* 294 ** If the map selection is to be skipped then this flag will be true. If this 295 ** ins't a one time only scenario, then the next scenario will have the same 296 ** name as the current one but will be for variation "B". 297 */ 298 unsigned IsNoMapSel:1; 299 300 /* 301 ** If trucks are supposed to drop wood crates when they explode, then this flag 302 ** will be set to true. 303 */ 304 unsigned IsTruckCrate:1; 305 306 /* 307 ** If the initial money is to be assigned as ore in available silos, then 308 ** this flag will be set to true. 309 */ 310 unsigned IsMoneyTiberium:1; 311 312 /* 313 ** This is the fading countdown timer. As this timer counts down, the 314 ** fading to b&w or color will progress. This timer represents a 315 ** percentage of the Options.Get_Saturation() to fade towards. 316 */ 317 CDTimerClass<FrameTimerClass> FadeTimer; 318 319 #ifdef FIXIT_VERSION_3 // For endgame auto-sonar pulse. 320 // Timer to set the period for checking if an auto-sonar pulse should be performed. 321 // This will take place if a player has nothing but subs left in the game. 322 CDTimerClass<FrameTimerClass> AutoSonarTimer; 323 #endif 324 325 #ifdef FIXIT_VERSION_3 // Stalemate games. 326 bool bLocalProposesDraw; // True if the local player in a 2-player game has a draw offer extended. 327 bool bOtherProposesDraw; // True if the other player in a 2-player game has a draw offer extended. 328 #endif 329 330 }; 331 332 333 #endif