MainMenuUtils.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. ** Command & Conquer Generals(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. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FILE: MainMenuUtils.h //////////////////////////////////////////////////////
  24. // Author: Matthew D. Campbell, Sept 2002
  25. // Description: GameSpy version check, patch download, etc utils
  26. ///////////////////////////////////////////////////////////////////////////////
  27. #pragma once
  28. #ifndef __MAINMENUUTILS_H__
  29. #define __MAINMENUUTILS_H__
  30. void HTTPThinkWrapper( void );
  31. void StopAsyncDNSCheck( void );
  32. void StartPatchCheck( void );
  33. void CancelPatchCheckCallback( void );
  34. void StartDownloadingPatches( void );
  35. void HandleCanceledDownload( Bool resetDropDown = TRUE );
  36. enum OverallStatsPeriod
  37. {
  38. STATS_TODAY = 0,
  39. STATS_YESTERDAY,
  40. STATS_ALLTIME,
  41. STATS_LASTWEEK,
  42. STATS_MAX
  43. };
  44. struct OverallStats
  45. {
  46. OverallStats();
  47. Int wins[STATS_MAX];
  48. Int losses[STATS_MAX];
  49. };
  50. void CheckOverallStats( void );
  51. void HandleOverallStats( const OverallStats& USA, const OverallStats& China, const OverallStats& GLA );
  52. void CheckNumPlayersOnline( void );
  53. void HandleNumPlayersOnline( Int numPlayersOnline );
  54. #endif // __MAINMENUUTILS_H__