SCORE.H 5.1 KB

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