SCORE.H 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /* $Header: /CounterStrike/SCORE.H 1 3/03/97 10:25a Joe_bostic $ */
  15. /***********************************************************************************************
  16. *** 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 ***
  17. ***********************************************************************************************
  18. * *
  19. * Project Name : Command & Conquer *
  20. * *
  21. * File Name : SCORE.H *
  22. * *
  23. * Programmer : Joe L. Bostic *
  24. * *
  25. * Start Date : April 19, 1994 *
  26. * *
  27. * Last Update : April 19, 1994 [JLB] *
  28. * *
  29. *---------------------------------------------------------------------------------------------*
  30. * Functions: *
  31. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  32. #ifndef SCORE_H
  33. #define SCORE_H
  34. #include "unit.h"
  35. #include "building.h"
  36. class ScoreClass {
  37. public:
  38. ScoreClass(void) {};
  39. ScoreClass(NoInitClass const &) {};
  40. int Score;
  41. int NKilled;
  42. int GKilled;
  43. int CKilled;
  44. int NBKilled;
  45. int GBKilled;
  46. int CBKilled;
  47. int NHarvested;
  48. int GHarvested;
  49. int CHarvested;
  50. unsigned long ElapsedTime;
  51. TTimerClass<SystemTimerClass> RealTime;
  52. void Init(void);
  53. void Presentation(void);
  54. /*
  55. ** File I/O.
  56. */
  57. bool Load(Straw & file);
  58. bool Save(Pipe & file) const;
  59. void Code_Pointers(void);
  60. void Decode_Pointers(void);
  61. private:
  62. unsigned char *ChangingGun;
  63. void ScoreDelay(int ticks);
  64. void Pulse_Bar_Graph(void);
  65. void Print_Graph_Title(int,int);
  66. void Print_Minutes(int minutes);
  67. void Count_Up_Print(char *str, int percent, int max, int xpos, int ypos);
  68. void Show_Credits(int house, char const pal[]);
  69. void Do_GDI_Graph(void const * yellowptr, void const * redptr, int gdikilled, int nodkilled, int ypos);
  70. void Do_Nod_Casualties_Graph(void);
  71. void Do_Nod_Buildings_Graph(void);
  72. void Input_Name(char str[], int xpos, int ypos, char const pal[]);
  73. };
  74. class ScoreAnimClass {
  75. public:
  76. ScoreAnimClass(int x, int y, void const * data);
  77. int XPos;
  78. int YPos;
  79. CDTimerClass<SystemTimerClass> Timer;
  80. void const * DataPtr;
  81. virtual void Update(void) {} ;
  82. virtual ~ScoreAnimClass(void) {DataPtr=0;} ;
  83. };
  84. class ScoreCredsClass : public ScoreAnimClass {
  85. public:
  86. int Stage;
  87. int MaxStage;
  88. int TimerReset;
  89. void const * CashTurn;
  90. void const * Clock1;
  91. virtual void Update(void);
  92. ScoreCredsClass(int xpos, int ypos, void const * data, int max, int timer);
  93. virtual ~ScoreCredsClass(void) {CashTurn=0;Clock1=0;};
  94. };
  95. class ScoreTimeClass : public ScoreAnimClass {
  96. public:
  97. int Stage;
  98. int MaxStage;
  99. int TimerReset;
  100. virtual void Update(void);
  101. ScoreTimeClass(int xpos, int ypos, void const * data, int max, int timer);
  102. virtual ~ScoreTimeClass(void) {};
  103. };
  104. class ScorePrintClass : public ScoreAnimClass {
  105. public:
  106. int Background;
  107. int Stage;
  108. void const * PrimaryPalette;
  109. virtual void Update(void);
  110. ScorePrintClass(void const * string, int xpos, int ypos, void const * palette, int background=TBLACK);
  111. ScorePrintClass( int string, int xpos, int ypos, void const * palette, int background=TBLACK);
  112. virtual ~ScorePrintClass(void) {PrimaryPalette=0;};
  113. };
  114. class ScoreScaleClass : public ScoreAnimClass {
  115. public:
  116. int Stage;
  117. char const * Palette;
  118. virtual void Update(void);
  119. ScoreScaleClass(void const * data, int xpos, int ypos, char const pal[]);
  120. virtual ~ScoreScaleClass(void) {Palette=0;};
  121. };
  122. #define MAXSCOREOBJS 8
  123. extern ScoreAnimClass *ScoreObjs[MAXSCOREOBJS];
  124. void Multi_Score_Presentation(void);
  125. #endif