UTRACKER.H 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. /***************************************************************************
  15. ** 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 **
  16. ***************************************************************************
  17. * *
  18. * Project Name : Command & Conquer *
  19. * *
  20. * File Name : UTRACKER.H *
  21. * *
  22. * Programmer : Steve Tall *
  23. * *
  24. * Start Date : June 3rd, 1996 *
  25. * *
  26. * Last Update : June 7th, 1996 [ST] *
  27. * *
  28. *-------------------------------------------------------------------------*
  29. * The UnitTracker class exists to track the various statistics *
  30. * required for internet games. *
  31. * *
  32. * *
  33. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  34. /*
  35. ** UnitTracker Class
  36. */
  37. class UnitTrackerClass {
  38. public:
  39. UnitTrackerClass(int unit_count);
  40. ~UnitTrackerClass(void);
  41. void Increment_Unit_Total (int unit_type);
  42. void Decrement_Unit_Total (int unit_type);
  43. void Clear_Unit_Total(void);
  44. int Get_Unit_Total (int unit_type);
  45. long *Get_All_Totals (void);
  46. int Get_Unit_Count (void){return (UnitCount);};
  47. void To_Network_Format(void);
  48. void To_PC_Format(void);
  49. private:
  50. long *UnitTotals;
  51. int UnitCount;
  52. int InNetworkFormat;
  53. };