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.

56 lines
911 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #include "report.h"
  9. class CMatchResults: public CReport
  10. {
  11. public:
  12. enum Consts
  13. {
  14. WINNER=1,
  15. LOSER=0,
  16. STRLEN=200,
  17. };
  18. private:
  19. struct team
  20. {
  21. bool valid;
  22. int score;
  23. int frags;
  24. int unacc_frags;
  25. int numplayers;
  26. bool fWinner;
  27. bool allies[MAX_TEAMS];
  28. };
  29. team teams[MAX_TEAMS];
  30. int numTeams;
  31. char winnerString[STRLEN];
  32. char loserString[STRLEN];
  33. bool valid;
  34. bool draw;
  35. void init();
  36. void calcRealWinners();
  37. char* getWinnerTeamsString();
  38. int getWinnerTeamScore();
  39. bool Outnumbered(int WinnerOrLoser);
  40. char* getLoserTeamsString();
  41. int getLoserTeamScore();
  42. int numWinningTeams();
  43. public:
  44. explicit CMatchResults(){init();}
  45. void generate();
  46. void writeHTML(CHTMLFile& html);
  47. };