SCORE.H (5308B)
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/SCORE.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 : SCORE.H * 24 * * 25 * Programmer : Joe L. Bostic * 26 * * 27 * Start Date : April 19, 1994 * 28 * * 29 * Last Update : April 19, 1994 [JLB] * 30 * * 31 *---------------------------------------------------------------------------------------------* 32 * Functions: * 33 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 34 35 #ifndef SCORE_H 36 #define SCORE_H 37 38 #include "unit.h" 39 #include "building.h" 40 41 class ScoreClass { 42 public: 43 ScoreClass(void) {}; 44 ScoreClass(NoInitClass const &) {}; 45 46 int Score; 47 int NKilled; 48 int GKilled; 49 int CKilled; 50 int NBKilled; 51 int GBKilled; 52 int CBKilled; 53 int NHarvested; 54 int GHarvested; 55 int CHarvested; 56 unsigned long ElapsedTime; 57 TTimerClass<SystemTimerClass> RealTime; 58 59 void Init(void); 60 void Presentation(void); 61 62 /* 63 ** File I/O. 64 */ 65 bool Load(Straw & file); 66 bool Save(Pipe & file) const; 67 void Code_Pointers(void); 68 void Decode_Pointers(void); 69 70 private: 71 unsigned char *ChangingGun; 72 73 void ScoreDelay(int ticks); 74 void Pulse_Bar_Graph(void); 75 void Print_Graph_Title(int,int); 76 void Print_Minutes(int minutes); 77 void Count_Up_Print(char *str, int percent, int max, int xpos, int ypos); 78 void Show_Credits(int house, char const pal[]); 79 void Do_GDI_Graph(void const * yellowptr, void const * redptr, int gdikilled, int nodkilled, int ypos); 80 void Do_Nod_Casualties_Graph(void); 81 void Do_Nod_Buildings_Graph(void); 82 void Input_Name(char str[], int xpos, int ypos, char const pal[]); 83 }; 84 85 class ScoreAnimClass { 86 public: 87 ScoreAnimClass(int x, int y, void const * data); 88 int XPos; 89 int YPos; 90 CDTimerClass<SystemTimerClass> Timer; 91 void const * DataPtr; 92 virtual void Update(void) {} ; 93 virtual ~ScoreAnimClass(void) {DataPtr=0;} ; 94 }; 95 96 class ScoreCredsClass : public ScoreAnimClass { 97 public: 98 int Stage; 99 int MaxStage; 100 int TimerReset; 101 void const * CashTurn; 102 void const * Clock1; 103 104 virtual void Update(void); 105 ScoreCredsClass(int xpos, int ypos, void const * data, int max, int timer); 106 virtual ~ScoreCredsClass(void) {CashTurn=0;Clock1=0;}; 107 }; 108 109 class ScoreTimeClass : public ScoreAnimClass { 110 public: 111 int Stage; 112 int MaxStage; 113 int TimerReset; 114 virtual void Update(void); 115 ScoreTimeClass(int xpos, int ypos, void const * data, int max, int timer); 116 virtual ~ScoreTimeClass(void) {}; 117 }; 118 119 class ScorePrintClass : public ScoreAnimClass { 120 public: 121 int Background; 122 int Stage; 123 void const * PrimaryPalette; 124 virtual void Update(void); 125 ScorePrintClass(void const * string, int xpos, int ypos, void const * palette, int background=TBLACK); 126 ScorePrintClass( int string, int xpos, int ypos, void const * palette, int background=TBLACK); 127 virtual ~ScorePrintClass(void) {PrimaryPalette=0;}; 128 }; 129 130 class ScoreScaleClass : public ScoreAnimClass { 131 public: 132 int Stage; 133 char const * Palette; 134 virtual void Update(void); 135 ScoreScaleClass(void const * data, int xpos, int ypos, char const pal[]); 136 virtual ~ScoreScaleClass(void) {Palette=0;}; 137 138 }; 139 140 #define MAXSCOREOBJS 8 141 extern ScoreAnimClass *ScoreObjs[MAXSCOREOBJS]; 142 143 void Multi_Score_Presentation(void); 144 145 #endif