| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- /*
- ** Command & Conquer Red Alert(tm)
- ** Copyright 2025 Electronic Arts Inc.
- **
- ** This program is free software: you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation, either version 3 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- /* $Header: /CounterStrike/ENDING.CPP 1 3/03/97 10:24a Joe_bostic $ */
- /***********************************************************************************************
- *** 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 ***
- ***********************************************************************************************
- * *
- * Project Name : Command & Conquer *
- * *
- * File Name : ENDING.H *
- * *
- * Programmer : Barry W. Green *
- * *
- * Start Date : July 10, 1995 *
- * *
- * Last Update : July 10, 1995 [BWG] *
- * *
- *---------------------------------------------------------------------------------------------*
- * Functions: *
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
- #include "function.h"
- void GDI_Ending(void)
- {
- #ifdef NEVER
- if (TempleIoned) {
- Play_Movie("GDIFINB");
- } else {
- Play_Movie("GDIFINA");
- }
- Score.Presentation();
- if (TempleIoned) {
- Play_Movie("GDIEND2");
- } else {
- Play_Movie("GDIEND1");
- }
- Play_Movie("CC2TEASE");
- #endif
- }
- /***********************************************************************************************
- * Nod_Ending -- play ending movies for Nod players *
- * *
- * INPUT: none *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 7/10/1995 BWG : Created. *
- *=============================================================================================*/
- void Nod_Ending(void)
- {
- #ifdef NEVER
- static char const _tanpal[]={0x0,0x0,0xED,0x0,0x2C,0x0,0xFB,0x0,0xFD,0x0,0x0,0x0,0x0,0x0,0x52,0x0};
- char fname[12];
- char * satpic = new char[64000];
- int oldfontxspacing = FontXSpacing;
- void const * oldfont;
- Score.Presentation();
- oldfont = Set_Font(ScoreFontPtr);
- void * localpal = Load_Alloc_Data(CCFileClass("SATSEL.PAL"));
- Load_Uncompress(CCFileClass("SATSEL.CPS"), HidPage, HidPage);
- memcpy(satpic, HidPage.Get_Buffer(), 64000);
- void * kanefinl = Load_Sample("KANEFINL.AUD");
- void * loopie6m = Load_Sample("LOOPIE6M.AUD");
- Play_Movie("NODFINAL", THEME_NONE, false);
- Hide_Mouse();
- Wait_Vert_Blank(VertBlank);
- Set_Palette(localpal);
- memcpy(SeenBuff.Get_Buffer(), satpic, 64000);
- Show_Mouse();
- Keyboard->Clear();
- Play_Sample(kanefinl, 255, 128);
- Play_Sample(loopie6m, 255, 128);
- bool mouseshown = false;
- bool done = false;
- int selection = 1;
- bool printedtext = false;
- while (!done) {
- if (!printedtext && !Is_Sample_Playing(kanefinl)) {
- printedtext++;
- Alloc_Object(new ScorePrintClass(Text_String(TXT_SEL_TARGET), 0, 180, _tanpal));
- mouseshown = true;
- Show_Mouse();
- }
- Call_Back_Delay(1);
- if (!Keyboard->Check()) {
- if (!Is_Sample_Playing(loopie6m)) Play_Sample(loopie6m, 255, 128);
- } else {
- if (Is_Sample_Playing(kanefinl)) {
- Clear_KeyBuffer();
- } else {
- int key = Keyboard->Get();
- if ((key & 0xFF) == KN_LMOUSE && !(key & KN_RLSE_BIT)) {
- int mousex = MouseQX;
- int mousey = MouseQY;
- if (mousey >= 22 && mousey <= 177) {
- done++;
- if (mousex < 160 && mousey < 100) selection = 2;
- if (mousex < 160 && mousey >= 100) selection = 3;
- if (mousex >= 160 && mousey >= 100) selection = 4;
- }
- }
- }
- }
- }
- if (mouseshown) Hide_Mouse();
- delete satpic;
- /* get rid of all the animating objects */
- for (int i = 0; i < MAXSCOREOBJS; i++) if (ScoreObjs[i]) {
- delete ScoreObjs[i];
- ScoreObjs[i] = 0;
- }
- // erase the "choose a target" text
- SeenBuff.Fill_Rect(0, 180, 319, 199, 0);
- Hide_Mouse();
- Keyboard->Clear();
- Set_Font(oldfont);
- FontXSpacing = oldfontxspacing;
- Free_Sample(kanefinl);
- Free_Sample(loopie6m);
- sprintf(fname, "NODEND%d", selection);
- PreserveVQAScreen = 1;
- Play_Movie(fname);
- Play_Movie("CC2TEASE");
- #endif
- }
|