#ifndef _T_INFO_H_
#define _T_INFO_H_

#define TEAM_BLUE		1
#define TEAM_RED		2

int P_CountBluePlayers ();
int P_CountRedPlayers ();
void P_StartTeam1ReturnScripts (void);
void P_StartTeam2ReturnScripts (void);

class player_s;

class teaminfo_s
{
public:
	char		*name;
	player_s	*leader;
	char		*color;
	int			points;
	int			fragpoints;
	int			textcolor;
	mobjtype_t	theirs;
	mobjtype_t	ours;
	spritenum_t	theirspr;
	spritenum_t	ourspr;	
	card_t		theirkey;
	card_t		ourkey;
	statenum_t	theirstate;
	statenum_t	ourstate;
	int			returnTics;
	int			railcolor;
	void		(*returnroutine)(void);
};

typedef teaminfo_s teaminfo_t;

typedef enum
{
	TM_DUMMY,		// Dummy
		
	TM_BLUE,
	TM_RED,

	NUMTEAMS,

	TM_NONE			// No team
} team_t;

inline FArchive &operator<< (FArchive &arc, team_t i) { return arc << (WORD)i; }
inline FArchive &operator>> (FArchive &arc, team_t &i) { return arc >> (WORD &)i; }

extern teaminfo_s teams[NUMTEAMS];

#endif