summaryrefslogtreecommitdiff
path: root/utils/tfstats/matchresults.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/tfstats/matchresults.h')
-rw-r--r--utils/tfstats/matchresults.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/utils/tfstats/matchresults.h b/utils/tfstats/matchresults.h
new file mode 100644
index 0000000..7a8d555
--- /dev/null
+++ b/utils/tfstats/matchresults.h
@@ -0,0 +1,57 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+#include "report.h"
+
+class CMatchResults: public CReport
+{
+public:
+ enum Consts
+ {
+ WINNER=1,
+ LOSER=0,
+
+ STRLEN=200,
+ };
+private:
+ struct team
+ {
+ bool valid;
+ int score;
+ int frags;
+ int unacc_frags;
+ int numplayers;
+ bool fWinner;
+ bool allies[MAX_TEAMS];
+ };
+
+ team teams[MAX_TEAMS];
+ int numTeams;
+ char winnerString[STRLEN];
+ char loserString[STRLEN];
+
+ bool valid;
+ bool draw;
+
+ void init();
+
+ void calcRealWinners();
+
+ char* getWinnerTeamsString();
+ int getWinnerTeamScore();
+ bool Outnumbered(int WinnerOrLoser);
+ char* getLoserTeamsString();
+ int getLoserTeamScore();
+ int numWinningTeams();
+
+public:
+
+ explicit CMatchResults(){init();}
+
+ void generate();
+ void writeHTML(CHTMLFile& html);
+}; \ No newline at end of file