source-engine-2018-hl2_src/utils/tfstats/matchresults.h
FluorescentCIAAfricanAmerican 3bf9df6b27 1
2020-04-22 12:56:21 -04:00

57 lines
911 B
C++

//========= 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);
};