#pragma once

#if defined(MAC)
	#include "NetworkEndpoint.h"
	#include "Participant.h"
#else
	#include "..\munga\console.h"
#endif

//~~~~~~~~~~~~~~~~~~~~~~~~ Console Message IDs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
enum
{
	ConsolePlayerVTVScoredMessageID = 2,
	ConsolePlayerVTVKilledMessageID = 3,
	ConsolePlayerVTVBoosterMessageID = 4,
	ConsolePlayerVTVScoreUpdateMessageID = 5,
	ConsolePlayerVTVDamagedMessageID = 6
};

//~~~~~~~~~~~~~~~~~~ ConsolePlayerVTVScoredMessage ~~~~~~~~~~~~~~~~~~~
#ifdef MAC
#pragma options align=mac68k4byte
class ConsolePlayerVTVScoredMessage:
	public NetworkEndpoint::Message
{
public:
	ConsolePlayerVTVScoredMessage(HostID player_host_ID);

	long
		GetPlayerHostID()
			{return playerHostID.value();}

private:
	HostID
		playerHostID;
};
#pragma options align=reset
#else
class ConsolePlayerVTVScoredMessage:
	public NetworkClient::Message
{
public:
	ConsolePlayerVTVScoredMessage(HostID player_host_ID);

	HostID
		GetPlayerHostID()
			{return playerHostID;}

private:
	HostID
		playerHostID;
};
#endif

//~~~~~~~~~~~~~~~~~~ ConsolePlayerVTVKilledMessage ~~~~~~~~~~~~~~~~~~~
#ifdef MAC
#pragma options align=mac68k4byte
class ConsolePlayerVTVKilledMessage:
	public NetworkEndpoint::Message
{
public:
	ConsolePlayerVTVKilledMessage(
		HostID player_host_ID,
		HostID killer_host_ID
	);

	long
		GetPlayerHostID()
			{return playerHostID.value();}
	long
		GetKillerHostID()
			{return killerHostID.value();}

private:
	HostID
		playerHostID;
	HostID
		killerHostID;
};
#pragma options align=reset
#else
class ConsolePlayerVTVKilledMessage:
	public NetworkClient::Message
{
public:
	ConsolePlayerVTVKilledMessage(
		HostID player_host_ID,
		HostID killer_host_ID
	);

	HostID
		GetPlayerHostID()
			{return playerHostID;}
	HostID
		GetKillerHostID()
			{return killerHostID;}

private:
	HostID
		playerHostID,
		killerHostID;
};
#endif

//~~~~~~~~~~~~~~~~~~ ConsolePlayerVTVBoosterMessage ~~~~~~~~~~~~~~~~~~~
#ifdef MAC
#pragma options align=mac68k4byte
class ConsolePlayerVTVBoosterMessage:
	public NetworkEndpoint::Message
{
public:
	ConsolePlayerVTVBoosterMessage(
		HostID player_host_ID,
		LEDWORD booster_on
	);

	long
		GetPlayerHostID()
			{return playerHostID.value();}
	long
		GetBoosterOn()
			{return boosterOn.value();}

private:
	HostID
		playerHostID;
	LEDWORD
		boosterOn;
};
#pragma options align=reset
#else
class ConsolePlayerVTVBoosterMessage:
	public NetworkClient::Message
{
public:
	ConsolePlayerVTVBoosterMessage(
		HostID player_host_ID,
		int booster_on
	);

	HostID
		GetPlayerHostID()
			{return playerHostID;}
	int
		GetBoosterOn()
			{return boosterOn;}

private:
	HostID
		playerHostID;
	int
		boosterOn;
};
#endif

//~~~~~~~~~~~~~~~~~~ ConsolePlayerVTVScoreUpdateMessage ~~~~~~~~~~~~~~~~~~~
#ifdef MAC
#pragma options align=mac68k4byte
class ConsolePlayerVTVScoreUpdateMessage:
	public NetworkEndpoint::Message
{
public:
	ConsolePlayerVTVScoreUpdateMessage(
		HostID player_host_ID,
		LEDWORD score
	);

	long
		GetPlayerHostID()
			{return playerHostID.value();}
	long
		GetPlayerScore()
			{return playerScore.value();}

private:
	HostID
		playerHostID;
	LEDWORD
		playerScore;
};
#pragma options align=reset
#else
class ConsolePlayerVTVScoreUpdateMessage:
	public NetworkClient::Message
{
public:
	ConsolePlayerVTVScoreUpdateMessage(
		HostID player_host_ID,
		int score
	);

	HostID
		GetPlayerHostID()
			{return playerHostID;}
	int
		GetPlayerScore()
			{return playerScore;}

private:
	HostID
		playerHostID;
	int
		playerScore;
};
#endif

//~~~~~~~~~~~~~~~~~~ ConsolePlayerVTVDamagedMessage ~~~~~~~~~~~~~~~~~~~
#ifdef MAC
#pragma options align=mac68k4byte
class ConsolePlayerVTVDamagedMessage:
	public NetworkEndpoint::Message
{
public:
	ConsolePlayerVTVDamagedMessage(
		HostID player_host_ID,
		HostID damager_host_ID,
		LEDWORD loss,
		LEDWORD points_transfered
	);

	long
		GetPlayerHostID()
			{return playerHostID.value();}
	long
		GetDamagerHostID()
			{return damagerHostID.value();}
	long
		GetDamageLoss()
			{return damageLoss.value();}
	long
		GetPointsTransfered()
			{return pointsTransfered.value();}

private:
	HostID
		playerHostID;
	HostID
		damagerHostID;
	LEDWORD
		damageLoss;
	LEDWORD
		pointsTransfered;
};
#pragma options align=reset
#else
class ConsolePlayerVTVDamagedMessage:
	public NetworkClient::Message
{
public:
	ConsolePlayerVTVDamagedMessage(
		HostID player_host_ID,
		HostID damager_host_ID,
		int loss,
		int points_transfered
	);

	HostID
		GetPlayerHostID()
			{return playerHostID;}
	HostID
		GetDamagerHostID()
			{return damagerHostID;}
	int
		GetDamageLoss()
			{return damageLoss;}
	int
		GetPointsTransfered()
			{return pointsTransfered;}

private:
	HostID
		playerHostID;
	HostID
		damagerHostID;
	int
		damageLoss;
	int
		pointsTransfered;
};
#endif
