SCORE.H (5631B)
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\score.h_v 2.18 16 Oct 1995 16:46:18 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 int Score; 44 int NKilled; 45 int GKilled; 46 int CKilled; 47 int NBKilled; 48 int GBKilled; 49 int CBKilled; 50 int NHarvested; 51 int GHarvested; 52 int CHarvested; 53 unsigned long ElapsedTime; 54 55 void Init(void) {memset(this, 0, sizeof(ScoreClass));}; 56 void Presentation(void); 57 58 /* 59 ** File I/O. 60 */ 61 bool Load(FileClass & file); 62 bool Save(FileClass & file); 63 void Code_Pointers(void); 64 void Decode_Pointers(void); 65 66 protected: 67 68 private: 69 unsigned char *ChangingGun; 70 71 void ScoreDelay(int ticks); 72 void Pulse_Bar_Graph(void); 73 void Print_Graph_Title(int,int); 74 void Print_Minutes(int minutes); 75 void Count_Up_Print(char *str, int percent, int max, int xpos, int ypos); 76 void Show_Credits(int house, char const pal[]); 77 void Do_GDI_Graph(void const * yellowptr, void const * redptr, int gdikilled, int nodkilled, int ypos); 78 void Do_Nod_Casualties_Graph(void); 79 void Do_Nod_Buildings_Graph(void); 80 void Input_Name(char str[], int xpos, int ypos, char const pal[]); 81 }; 82 83 class ScoreAnimClass { 84 public: 85 ScoreAnimClass(int x, int y, void const * data); 86 int XPos; 87 int YPos; 88 CountDownTimerClass Timer; 89 void const * DataPtr; 90 virtual void Update(void) {} ; 91 virtual ~ScoreAnimClass(void) {} ; 92 }; 93 94 class ScoreCredsClass : public ScoreAnimClass { 95 public: 96 int Stage; 97 int MaxStage; 98 int TimerReset; 99 void const * CashTurn; 100 void const * Clock1; 101 102 virtual void Update(void); 103 ScoreCredsClass(int xpos, int ypos, void const * data, int max, int timer); 104 virtual ~ScoreCredsClass(void) {}; 105 }; 106 107 class ScoreTimeClass : public ScoreAnimClass { 108 public: 109 int Stage; 110 int MaxStage; 111 int TimerReset; 112 virtual void Update(void); 113 ScoreTimeClass(int xpos, int ypos, void const * data, int max, int timer); 114 virtual ~ScoreTimeClass(void) {}; 115 }; 116 117 class ScorePrintClass : public ScoreAnimClass { 118 public: 119 int Background; 120 int Stage; 121 void const * PrimaryPalette; 122 virtual void Update(void); 123 ScorePrintClass(void const * string, int xpos, int ypos, void const * palette, int background=TBLACK); 124 ScorePrintClass( int string, int xpos, int ypos, void const * palette, int background=TBLACK); 125 virtual ~ScorePrintClass(void) {}; 126 }; 127 128 129 class MultiStagePrintClass : public ScoreAnimClass { 130 public: 131 int Background; 132 int Stage; 133 void const * PrimaryPalette; 134 virtual void Update(void); 135 MultiStagePrintClass(void const * string, int xpos, int ypos, void const * palette, int background=TBLACK); 136 MultiStagePrintClass( int string, int xpos, int ypos, void const * palette, int background=TBLACK); 137 virtual ~MultiStagePrintClass(void) {}; 138 }; 139 140 141 class ScoreScaleClass : public ScoreAnimClass { 142 public: 143 int Stage; 144 char const * Palette; 145 virtual void Update(void); 146 ScoreScaleClass(void const * data, int xpos, int ypos, char const pal[]); 147 virtual ~ScoreScaleClass(void) {}; 148 149 }; 150 151 #define MAXSCOREOBJS 8 152 extern ScoreAnimClass *ScoreObjs[MAXSCOREOBJS]; 153 154 void Multi_Score_Presentation(void); 155 156 #endif