SCENARIO.CPP 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. /*
  2. ** Command & Conquer(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* $Header: F:\projects\c&c\vcs\code\scenario.cpv 2.17 16 Oct 1995 16:52:08 JOE_BOSTIC $ */
  19. /***********************************************************************************************
  20. *** 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 ***
  21. ***********************************************************************************************
  22. * *
  23. * Project Name : Command & Conquer *
  24. * *
  25. * File Name : SCENARIO.CPP *
  26. * *
  27. * Programmer : Joe L. Bostic *
  28. * *
  29. * Start Date : September 10, 1993 *
  30. * *
  31. * Last Update : August 24, 1995 [JLB] *
  32. * *
  33. * This module handles the scenario reading and writing. Scenario related *
  34. * code that is executed between scenario play can also be here. *
  35. * *
  36. *---------------------------------------------------------------------------------------------*
  37. * Functions: *
  38. * Clear_Scenario -- Clears all data in preparation for scenario load. *
  39. * Do_Lose -- Display losing comments. *
  40. * Do_Restart -- Handle the restart mission process. *
  41. * Do_Win -- Display winning congratulations. *
  42. * Fill_In_Data -- Recreate all data that is not loaded with scenario. *
  43. * Read_Scenario -- Reads a scenario from disk. *
  44. * Restate_Mission -- Handles restating the mission objective. *
  45. * Start_Scenario -- Starts the scenario. *
  46. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  47. #include "function.h"
  48. extern int PreserveVQAScreen;
  49. /***********************************************************************************************
  50. * Start_Scenario -- Starts the scenario. *
  51. * *
  52. * This routine will start the scenario. In addition to loading the scenario data, it will *
  53. * play the briefing and action movies. *
  54. * *
  55. * INPUT: root -- Pointer to the filename root for this scenario (e.g., "SCG01EA"). *
  56. * *
  57. * briefing -- Should the briefing be played? Normally this is true except when the *
  58. * scenario is restarting. *
  59. * *
  60. * OUTPUT: Was the scenario started without error? *
  61. * *
  62. * WARNINGS: none *
  63. * *
  64. * HISTORY: *
  65. * 07/04/1995 JLB : Created. *
  66. *=============================================================================================*/
  67. bool Start_Scenario(char *root, bool briefing)
  68. {
  69. if (!Read_Scenario(root)) {
  70. CCDebugString ("C&C95 - Failed to read scenario.\n");
  71. return(false);
  72. }
  73. CCDebugString ("C&C95 - Scenario read OK.\n");
  74. #ifdef DEMO
  75. if (briefing) {
  76. Play_Movie(BriefMovie);
  77. Play_Movie(ActionMovie, TransitTheme);
  78. }
  79. Theme.Queue_Song(THEME_AOI);
  80. #else
  81. /*
  82. ** Install some hacks around the movie playing to account for the choose-
  83. ** sides introduction. We don't want an intro movie on scenario 1, and
  84. ** we don't want a briefing movie on GDI scenario 1.
  85. */
  86. if (Scenario < 20 && (!Special.IsJurassic || !AreThingiesEnabled)) {
  87. if (Scenario != 1 || Whom == HOUSE_GOOD) {
  88. Play_Movie(IntroMovie);
  89. }
  90. if ((Scenario > 1 || Whom == HOUSE_BAD) && briefing) {
  91. PreserveVQAScreen = (Scenario == 1);
  92. Play_Movie(BriefMovie);
  93. }
  94. Play_Movie(ActionMovie, TransitTheme);
  95. if (TransitTheme == THEME_NONE) {
  96. Theme.Queue_Song(THEME_AOI);
  97. }
  98. } else {
  99. Play_Movie(BriefMovie);
  100. Play_Movie(ActionMovie, TransitTheme);
  101. #ifdef NEWMENU
  102. char buffer[25];
  103. sprintf(buffer, "%s.VQA", BriefMovie);
  104. CCFileClass file(buffer);
  105. if (GameToPlay == GAME_NORMAL && !file.Is_Available()) {
  106. VisiblePage.Clear();
  107. Set_Palette(GamePalette);
  108. // Show_Mouse();
  109. /*
  110. ** Show the mission briefing. Pretend we are inside the main loop so the palette
  111. ** will be correct on the textured buttons.
  112. */
  113. bool oldinmain = InMainLoop;
  114. InMainLoop = true;
  115. Restate_Mission(ScenarioName, TXT_OK, TXT_NONE);
  116. InMainLoop = oldinmain;
  117. // Hide_Mouse();
  118. if (TransitTheme == THEME_NONE) {
  119. Theme.Queue_Song(THEME_AOI);
  120. }
  121. }
  122. #endif
  123. }
  124. #endif
  125. /*
  126. ** Set the options values, since the palette has been initialized by Read_Scenario
  127. */
  128. CCDebugString ("C&C95 - About to call Options.Set.\n");
  129. Options.Set();
  130. CCDebugString ("C&C95 - About to return from Start_Scenario.\n");
  131. return(true);
  132. }
  133. /***********************************************************************************************
  134. * Read_Scenario -- Reads a scenario from disk. *
  135. * *
  136. * This will read a scenario from disk. Use this to begin a scenario. *
  137. * It doesn't perform any rendering, it merely sets up the system *
  138. * with the proper data. Setting of the right game state will start *
  139. * the scenario running. *
  140. * *
  141. * INPUT: root -- Scenario root filename *
  142. * *
  143. * OUTPUT: none *
  144. * *
  145. * WARNINGS: You must clear out the system variables before calling *
  146. * this function. Use the Clear_Scenario() function. *
  147. * It is assumed that Scenario is set to the current scenario number. *
  148. * *
  149. * HISTORY: *
  150. * 07/22/1991 : Created. *
  151. * 02/03/1992 JLB : Uses house identification. *
  152. *=============================================================================================*/
  153. bool Read_Scenario(char *root)
  154. {
  155. CCDebugString ("C&C95 - In Read_Scenario.\n");
  156. Clear_Scenario();
  157. ScenarioInit++;
  158. if (Read_Scenario_Ini(root)) {
  159. Fill_In_Data();
  160. /*
  161. ** SPECIAL CASE:
  162. ** Clear out the tutor flags for scenarios one and two. This is designed
  163. ** so that tutorial message will reappear in scenario two.
  164. */
  165. if (Scenario < 5) {
  166. TutorFlags[0] = 0L;
  167. TutorFlags[1] = 0L;
  168. }
  169. } else {
  170. Fade_Palette_To(GamePalette, FADE_PALETTE_FAST, Call_Back);
  171. Show_Mouse();
  172. CCMessageBox().Process(TXT_UNABLE_READ_SCENARIO);
  173. Hide_Mouse();
  174. return(false);
  175. }
  176. ScenarioInit--;
  177. CCDebugString ("C&C95 - Leaving Read_Scenario.\n");
  178. return(true);
  179. }
  180. /***********************************************************************************************
  181. * Fill_In_Data -- Recreate all data that is not loaded with scenario. *
  182. * *
  183. * This routine is called after the INI file for the scenario has been processed. It will *
  184. * infer the game state from the scenario INI data. *
  185. * *
  186. * INPUT: none *
  187. * *
  188. * OUTPUT: none *
  189. * *
  190. * WARNINGS: none *
  191. * *
  192. * HISTORY: *
  193. * 10/07/1992 JLB : Created. *
  194. *=============================================================================================*/
  195. void Fill_In_Data(void)
  196. {
  197. /*
  198. ** The basic scenario data load does not contain the full set of
  199. ** game data. We now must fill in the missing pieces.
  200. */
  201. ScenarioInit++;
  202. for (int index = 0; index < Buildings.Count(); index++) {
  203. Buildings.Ptr(index)->Update_Buildables();
  204. }
  205. Map.Flag_To_Redraw(true);
  206. /*
  207. ** Bring up the score display on the radar map when starting a multiplayer
  208. ** game.
  209. */
  210. if (GameToPlay != GAME_NORMAL) {
  211. Map.Player_Names(1);
  212. }
  213. ScenarioInit--;
  214. }
  215. /***********************************************************************************************
  216. * Clear_Scenario -- Clears all data in preparation for scenario load. *
  217. * *
  218. * This routine will clear out all data specific to a scenario in *
  219. * preparation for a subsequent scenario data load. This will free *
  220. * all units, animations, and icon maps. *
  221. * *
  222. * INPUT: none *
  223. * *
  224. * OUTPUT: none *
  225. * *
  226. * WARNINGS: none *
  227. * *
  228. * HISTORY: *
  229. * 07/22/1991 : Created. *
  230. * 03/21/1992 JLB : Changed buffer allocations, so changes memset code. *
  231. * 07/13/1995 JLB : End count down moved here. *
  232. *=============================================================================================*/
  233. void Clear_Scenario(void)
  234. {
  235. EndCountDown = TICKS_PER_SECOND * 30;
  236. CrateCount = 0;
  237. CrateTimer = 0;
  238. CrateMaker = false;
  239. /*
  240. ** Call everyone's Init routine, except the Map's; for the Map, only call
  241. ** MapClass::Init, which clears the Cell array. The Display::Init requires
  242. ** a Theater argument, and the theater is not known at this point; also, it
  243. ** would reload MixFiles, which isn't desired. Display::Read_INI calls its
  244. ** own Init, which will Init the entire Map hierarchy.
  245. */
  246. Map.Init_Clear();
  247. Score.Init();
  248. Logic.Init();
  249. HouseClass::Init();
  250. ObjectClass::Init();
  251. TeamTypeClass::Init();
  252. TeamClass::Init();
  253. TriggerClass::Init();
  254. AircraftClass::Init();
  255. AnimClass::Init();
  256. BuildingClass::Init();
  257. BulletClass::Init();
  258. InfantryClass::Init();
  259. OverlayClass::Init();
  260. SmudgeClass::Init();
  261. TemplateClass::Init();
  262. TerrainClass::Init();
  263. UnitClass::Init();
  264. FactoryClass::Init();
  265. Base.Init();
  266. CurrentObject.Clear();
  267. Invalidate_Cached_Icons();
  268. }
  269. /***********************************************************************************************
  270. * Do_Win -- Display winning congratulations. *
  271. * *
  272. * *
  273. * *
  274. * INPUT: *
  275. * *
  276. * OUTPUT: *
  277. * *
  278. * WARNINGS: *
  279. * *
  280. * HISTORY: *
  281. * 08/05/1992 JLB : Created. *
  282. * 01/01/1995 JLB : Carries money forward into next scenario. *
  283. *=============================================================================================*/
  284. void Do_Win(void)
  285. {
  286. Map.Set_Default_Mouse(MOUSE_NORMAL);
  287. Hide_Mouse();
  288. /*
  289. ** If this is a multiplayer game, clear the game's name so we won't respond
  290. ** to game queries any more (in Call_Back)
  291. */
  292. if (GameToPlay != GAME_NORMAL) {
  293. MPlayerGameName[0] = 0;
  294. }
  295. /*
  296. ** Determine a cosmetic center point for the text.
  297. */
  298. int x = Map.TacPixelX + (Lepton_To_Pixel(Map.TacLeptonWidth)/2);
  299. int y = Map.TacPixelY + (Lepton_To_Pixel(Map.TacLeptonHeight)/2) -32;
  300. /*
  301. ** Announce win to player.
  302. */
  303. Set_Logic_Page(SeenBuff);
  304. #if !(GERMAN | FRENCH)
  305. Fancy_Text_Print(TXT_MISSION, x, y, WHITE, TBLACK, TPF_CENTER|TPF_VCR);
  306. #endif
  307. Fancy_Text_Print(TXT_SCENARIO_WON, x, y+30, WHITE, TBLACK, TPF_CENTER|TPF_VCR);
  308. CountDownTimer.Set(TIMER_SECOND * 3);
  309. Stop_Speaking();
  310. Speak(VOX_ACCOMPLISHED);
  311. while (CountDownTimer.Time() || Is_Speaking()) {
  312. Call_Back();
  313. }
  314. /*
  315. ** Stop here if this is a multiplayer game.
  316. */
  317. if (GameToPlay != GAME_NORMAL) {
  318. if (!PlaybackGame) {
  319. MPlayerGamesPlayed++;
  320. Multi_Score_Presentation();
  321. MPlayerCurGame++;
  322. if (MPlayerCurGame >= MAX_MULTI_GAMES) {
  323. MPlayerCurGame = MAX_MULTI_GAMES - 1;
  324. }
  325. }
  326. GameActive = 0;
  327. Show_Mouse();
  328. return;
  329. }
  330. /*
  331. ** Play the winning movie and then start the next scenario.
  332. */
  333. if (RequiredCD != -2) {
  334. if (Scenario >= 20 && Scenario <60 && GameToPlay == GAME_NORMAL) {
  335. RequiredCD = 2;
  336. } else {
  337. if (Scenario >=60){
  338. RequiredCD = -1;
  339. }else{
  340. if (PlayerPtr->Class->House == HOUSE_GOOD) {
  341. RequiredCD = 0;
  342. } else {
  343. RequiredCD = 1;
  344. }
  345. }
  346. }
  347. }
  348. #ifndef DEMO
  349. Play_Movie(WinMovie);
  350. #endif
  351. Keyboard::Clear();
  352. /*
  353. ** Do the ending screens only if not playing back a recorded game.
  354. */
  355. if (!PlaybackGame) {
  356. #ifdef DEMO
  357. switch (Scenario) {
  358. case 1:
  359. Score.Presentation();
  360. Scenario = 10;
  361. break;
  362. case 10:
  363. Score.Presentation();
  364. Scenario = 6;
  365. break;
  366. default:
  367. Score.Presentation();
  368. GDI_Ending();
  369. GameActive = false;
  370. Show_Mouse();
  371. return;
  372. // Prog_End();
  373. // exit(0);
  374. // break;
  375. }
  376. #else
  377. #ifdef NEWMENU
  378. if (Scenario >= 20) {
  379. Keyboard::Clear();
  380. Score.Presentation();
  381. GameActive = false;
  382. Show_Mouse();
  383. return;
  384. }
  385. #endif
  386. if (PlayerPtr->Class->House == HOUSE_BAD && Scenario == 13) {
  387. Nod_Ending();
  388. //Prog_End();
  389. //exit(0);
  390. SeenBuff.Clear();
  391. Show_Mouse();
  392. GameActive = false;
  393. return;
  394. }
  395. if (PlayerPtr->Class->House == HOUSE_GOOD && Scenario == 15) {
  396. GDI_Ending();
  397. //Prog_End();
  398. //exit(0);
  399. SeenBuff.Clear();
  400. Show_Mouse();
  401. GameActive = false;
  402. return;
  403. }
  404. if ( (Special.IsJurassic && AreThingiesEnabled) && Scenario == 5) {
  405. Prog_End();
  406. exit(0);
  407. }
  408. if (!Special.IsJurassic || !AreThingiesEnabled) {
  409. Keyboard::Clear();
  410. InterpolationPaletteChanged = TRUE;
  411. InterpolationPalette = Palette;
  412. Score.Presentation();
  413. /*
  414. ** Skip scenario #7 if the airfield was blown up.
  415. */
  416. if (Scenario == 6 && PlayerPtr->Class->House == HOUSE_GOOD && SabotagedType == STRUCT_AIRSTRIP) {
  417. Scenario++;
  418. }
  419. Map_Selection();
  420. }
  421. Scenario++;
  422. #endif
  423. Keyboard::Clear();
  424. }
  425. CarryOverMoney = PlayerPtr->Credits;
  426. int pieces = PlayerPtr->NukePieces;
  427. /*
  428. ** Generate a new scenario filename
  429. */
  430. Set_Scenario_Name(ScenarioName, Scenario, ScenPlayer, ScenDir, ScenVar);
  431. Start_Scenario(ScenarioName);
  432. PlayerPtr->NukePieces = pieces;
  433. /*
  434. ** Destroy the building that was sabotaged in the previous scenario. This only
  435. ** applies to GDI mission #7.
  436. */
  437. if (SabotagedType != STRUCT_NONE && Scenario == 7 && PlayerPtr->Class->House == HOUSE_GOOD) {
  438. for (int index = 0; index < Buildings.Count(); index++) {
  439. BuildingClass * building = Buildings.Ptr(index);
  440. if (building && !building->IsInLimbo && building->House != PlayerPtr && building->Class->Type == SabotagedType) {
  441. building->Limbo();
  442. delete building;
  443. break;
  444. }
  445. }
  446. /*
  447. ** Remove the building from the prebuild list.
  448. */
  449. for (index = 0; index < Base.Nodes.Count(); index++) {
  450. BaseNodeClass * node = Base.Get_Node(index);
  451. if (node && node->Type == SabotagedType) {
  452. Base.Nodes.Delete(index);
  453. break;
  454. }
  455. }
  456. }
  457. SabotagedType = STRUCT_NONE;
  458. Map.Render();
  459. Fade_Palette_To(GamePalette, FADE_PALETTE_FAST, Call_Back);
  460. Show_Mouse();
  461. }
  462. /***********************************************************************************************
  463. * Do_Lose -- Display losing comments. *
  464. * *
  465. * *
  466. * *
  467. * INPUT: *
  468. * *
  469. * OUTPUT: *
  470. * *
  471. * WARNINGS: *
  472. * *
  473. * HISTORY: *
  474. * 08/05/1992 JLB : Created. *
  475. *=============================================================================================*/
  476. void Do_Lose(void)
  477. {
  478. Map.Set_Default_Mouse(MOUSE_NORMAL);
  479. Hide_Mouse();
  480. /*
  481. ** If this is a multiplayer game, clear the game's name so we won't respond
  482. ** to game queries any more (in Call_Back)
  483. */
  484. if (GameToPlay != GAME_NORMAL) {
  485. MPlayerGameName[0] = 0;
  486. }
  487. /*
  488. ** Determine a cosmetic center point for the text.
  489. */
  490. int x = Map.TacPixelX + (Lepton_To_Pixel(Map.TacLeptonWidth)/2);
  491. int y = Map.TacPixelY + (Lepton_To_Pixel(Map.TacLeptonHeight)/2) -32;
  492. /*
  493. ** Announce win to player.
  494. */
  495. Set_Logic_Page(SeenBuff);
  496. Fancy_Text_Print(TXT_MISSION, x, y, WHITE, TBLACK, TPF_CENTER|TPF_VCR);
  497. Fancy_Text_Print(TXT_SCENARIO_LOST, x, y+30, WHITE, TBLACK, TPF_CENTER|TPF_VCR);
  498. CountDownTimer.Set(TIMER_SECOND * 3);
  499. Stop_Speaking();
  500. Speak(VOX_FAIL);
  501. while (CountDownTimer.Time() || Is_Speaking()) {
  502. Call_Back();
  503. }
  504. #ifdef OBSOLETE
  505. if (Debug_Play_Map) {
  506. Go_Editor(true);
  507. Show_Mouse();
  508. return;
  509. }
  510. #endif
  511. /*
  512. ** Stop here if this is a multiplayer game.
  513. */
  514. if (GameToPlay != GAME_NORMAL) {
  515. if (!PlaybackGame) {
  516. MPlayerGamesPlayed++;
  517. Multi_Score_Presentation();
  518. MPlayerCurGame++;
  519. if (MPlayerCurGame >= MAX_MULTI_GAMES) {
  520. MPlayerCurGame = MAX_MULTI_GAMES - 1;
  521. }
  522. }
  523. GameActive = 0;
  524. Show_Mouse();
  525. return;
  526. }
  527. Play_Movie(LoseMovie);
  528. /*
  529. ** Start same scenario again
  530. */
  531. Set_Palette(GamePalette);
  532. Show_Mouse();
  533. if (!PlaybackGame && !CCMessageBox().Process(TXT_TO_REPLAY, TXT_YES, TXT_NO)) {
  534. Hide_Mouse();
  535. Keyboard::Clear();
  536. Start_Scenario(ScenarioName, false);
  537. Map.Render();
  538. } else {
  539. Hide_Mouse();
  540. GameActive = 0;
  541. }
  542. Fade_Palette_To(GamePalette, FADE_PALETTE_FAST, Call_Back);
  543. Show_Mouse();
  544. }
  545. /***********************************************************************************************
  546. * Do_Restart -- Handle the restart mission process. *
  547. * *
  548. * This routine is called in the main game loop when the mission must be restarted. This *
  549. * routine will throw away the current game and reload the appropriate mission. The *
  550. * game will "resume" at the start of the mission. *
  551. * *
  552. * INPUT: none *
  553. * *
  554. * OUTPUT: none *
  555. * *
  556. * WARNINGS: none *
  557. * *
  558. * HISTORY: *
  559. * 08/24/1995 JLB : Created. *
  560. *=============================================================================================*/
  561. void Do_Restart(void)
  562. {
  563. bool hidden = Get_Mouse_State();
  564. if (hidden) Show_Mouse();
  565. CCMessageBox().Process(TXT_RESTARTING, TXT_NONE);
  566. Map.Set_Default_Mouse(MOUSE_NORMAL);
  567. Keyboard::Clear();
  568. Start_Scenario(ScenarioName, false);
  569. if (hidden) Hide_Mouse();
  570. Keyboard::Clear();
  571. Map.Render();
  572. }
  573. /***********************************************************************************************
  574. * Restate_Mission -- Handles restating the mission objective. *
  575. * *
  576. * This routine will display the mission objective (as text). It will also give the *
  577. * option to redisplay the mission briefing video. *
  578. * *
  579. * INPUT: name -- The scenario name. This is the unique identifier for the scenario *
  580. * briefing text as it appears in the "MISSION.INI" file. *
  581. * *
  582. * OUTPUT: Returns the response from the dialog. This will either be 1 if the video was *
  583. * requested, or 0 if the return to game options button was selected. *
  584. * *
  585. * WARNINGS: none *
  586. * *
  587. * HISTORY: *
  588. * 06/23/1995 JLB : Created. *
  589. * 08/06/1995 JLB : Uses preloaded briefing text. *
  590. *=============================================================================================*/
  591. bool Restate_Mission(char const * name, int button1, int button2)
  592. {
  593. if (name) {
  594. #ifdef JAPANESE
  595. char fname[14];
  596. strcpy(fname, name);
  597. strcat(fname,".CPS");
  598. if(CCFileClass(fname).Is_Available()) {
  599. CCMessageBox box(TXT_NONE, true);
  600. return(box.Process(fname, button1, button2));
  601. }
  602. #else
  603. /*
  604. ** Make sure that if there is no briefing movie, that the briefing text is
  605. ** the only option available.
  606. */
  607. bool brief = true;
  608. #ifdef NEWMENU
  609. char buffer[25];
  610. char buffer1[25];
  611. sprintf(buffer, "%s.VQA", BriefMovie);
  612. sprintf(buffer1, "%s.VQA", ActionMovie);
  613. CCFileClass file1(buffer);
  614. CCFileClass file2(buffer1);
  615. if (!file1.Is_Available() && !file2.Is_Available()) {
  616. button1 = TXT_OK;
  617. button2 = TXT_NONE;
  618. brief = false;
  619. }
  620. #endif
  621. /*
  622. ** If mission object text was found, then display it.
  623. */
  624. if (strlen(BriefingText)) {
  625. static char _buff[512];
  626. strcpy(_buff, BriefingText);
  627. // strcpy(_ShapeBuffer, BriefingText);
  628. bool hidden = Get_Mouse_State();
  629. if (hidden) Show_Mouse();
  630. if (CCMessageBox(TXT_OBJECTIVE).Process(_buff, button1, button2)) {
  631. if (hidden) Hide_Mouse();
  632. return(true);
  633. }
  634. if (hidden) Hide_Mouse();
  635. if (!brief) return(true);
  636. return(false);
  637. }
  638. #endif
  639. }
  640. return(false);
  641. }