#pragma once
#ifndef __GAMEINFOHPP__
#define __GAMEINFOHPP__

#include "MWApplication.hpp"

#ifdef LAB_ONLY
namespace MWGameInfo
{
	extern char g_MachineName[MAX_GAME_INFO_STR_LEN];
	extern char g_UserName[MAX_GAME_INFO_STR_LEN];

	extern char g_MissionName[MAX_GAME_INFO_STR_LEN];
	extern char g_MissionScript[128];
	extern char g_PlayerMech[MAX_GAME_INFO_STR_LEN];
	extern char g_MechModel[MAX_GAME_INFO_STR_LEN];
	extern char g_LastMWObject[MAX_GAME_INFO_STR_LEN];
	extern char g_LastVehicle[MAX_GAME_INFO_STR_LEN];
 	extern char g_ResourceFile[MAX_GAME_INFO_STR_LEN];
	extern char g_ResourceEntry[MAX_GAME_INFO_STR_LEN];
	
	extern Point3D g_LastMWObjectPos;
	extern Point3D g_LastVehiclePos;
	

	extern Time g_currentTime;
	extern int g_totalNumberOfPlayedGames;

	
	enum {
		NoGame = 0,
		Campaign,
		Instant,
		MultiServer,
		MultiClient,
		MaxGameTypes
	};

	extern char *g_gameTypes[MaxGameTypes];

	extern int g_MultiplayerGameType;

	extern bool g_dedicatedServer;

	extern int g_lastGameType;
	extern int g_currentGameType;

	extern int g_totalNetworkConnects;
	extern int g_totalNetworkDisconnects;
	
	extern int g_totalNetworkJoins;
	extern int g_totalNetworkLeaves;
	
	extern int g_currentlyConnected;
	extern int g_currentlyJoined;

	extern int g_lastConnectID;
	extern int g_lastDisconnectID;

	extern int g_lastJoinID;
	extern int g_lastLeaveID;




	extern Stuff::Scalar g_GameStart;
	extern Stuff::Scalar g_GameEnd;

	extern MString* g_missionParamsString;
	extern MString* g_serverMissionParamsString;

	extern char g_playerNames[Maximum_Connection_Numbers][MAX_GAME_INFO_STR_LEN];
	extern char g_playerVehicleNames[Maximum_Connection_Numbers][MAX_GAME_INFO_STR_LEN];
	extern int g_playerTeams[Maximum_Connection_Numbers];
	extern int g_playerKills[Maximum_Connection_Numbers];
	extern int g_playerDeaths[Maximum_Connection_Numbers];
	extern int g_playerScores[Maximum_Connection_Numbers];
	
	extern double g_playerConnectTime[Maximum_Connection_Numbers];
	extern double g_playerDisconnectTime[Maximum_Connection_Numbers];
	
	extern double g_playerJoinTime[Maximum_Connection_Numbers];
	extern double g_playerLeaveTime[Maximum_Connection_Numbers];

	extern int g_playerJoins[Maximum_Connection_Numbers];
	extern int g_playerLeaves[Maximum_Connection_Numbers];

	extern int g_networkDebugLevel[Maximum_Connection_Numbers];
	extern int g_connectRate[Maximum_Connection_Numbers];

	void InitGameInfo (void);
	void QuitGameInfo (void);
	void InitMissionInfo (void);
};

char* __stdcall GameInfo(void);
#else
namespace MWGameInfo
{
	inline void InitGameInfo (void)
		{	}

	inline void QuitGameInfo (void)
		{	}

	inline void InitMissionInfo (void)
		{	}
};
#endif

#endif