Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Interface of CTFStatsReport
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //------------------------------------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef TFSTATSREPORT_H
  14. #define TFSTATSREPORT_H
  15. #ifdef WIN32
  16. #pragma once
  17. #endif
  18. #ifndef __TFSTATSREPORT_H
  19. #define __TFSTATSREPORT_H
  20. #pragma warning(disable:4786)
  21. #include <time.h>
  22. #include "BinaryResource.h"
  23. #include "MatchInfo.h"
  24. #include "HTML.h"
  25. #include "util.h"
  26. //------------------------------------------------------------------------------------------------------
  27. // Purpose: This class is reponsible for generating the top and nav frames of the
  28. // report. also for generating all the resources such as jpgs, gifs, javascripts and
  29. // style sheets
  30. //------------------------------------------------------------------------------------------------------
  31. class CTFStatsReport
  32. {
  33. private:
  34. time_t matchstart;
  35. time_t matchend;
  36. int matchhours;
  37. int matchminutes;
  38. int matchseconds;
  39. bool valid;
  40. void init();
  41. /*
  42. const char* makeDurationString();
  43. char DurationString[300];
  44. */
  45. void generate();
  46. static char* javaScriptSource;
  47. static char* styleSheetSource;
  48. //CMatchInfo* pMatchInfo;
  49. static CBinaryResource gifAwards;
  50. static CBinaryResource jpgBgLeft;
  51. static CBinaryResource jpgBgTop;
  52. static CBinaryResource gifBoxScore;
  53. static CBinaryResource gifGameDialogOff;
  54. static CBinaryResource gifGameDialogOn;
  55. static CBinaryResource gifMatchStatsOff;
  56. static CBinaryResource gifMatchStatsOn;
  57. static CBinaryResource gifScores;
  58. static CBinaryResource gifServerSettingsOff;
  59. static CBinaryResource gifServerSettingsOn;
  60. static CBinaryResource gifDetailedScores;
  61. static CBinaryResource gifPlayerStatsMatchOff;
  62. static CBinaryResource gifPlayerStatsMatchOn;
  63. static CBinaryResource gifPlayerStatsServerOff;
  64. static CBinaryResource gifPlayerStatsServerOn;
  65. public:
  66. explicit CTFStatsReport();
  67. void genImages();
  68. void genJavaScript();
  69. void genStyleSheet();
  70. void genAllPlayersStyleSheet();
  71. void genIndex();
  72. void genTopFrame();
  73. void genNavFrame();
  74. virtual ~CTFStatsReport();
  75. };
  76. #endif
  77. #endif // TFSTATSREPORT_H