//////////////////////////////////////////////////////////////////////////////
//
// AVP_Platform_GameLobby.cpp
//
// Copyright (c) 2008 Rebellion. All rights reserved.
//
// Description:
//
//     360 version
//
//////////////////////////////////////////////////////////////////////////////

// I N C L U D E S ///////////////////////////////////////////////////////////

#include "Core/Asura.h"

// this file's header
#include "FrontEnd/AVP_GameLobby.h"

// Asura independent
#include "Debugging/Asura_Assert.h"

// Asura 360
#include "Network/Online/Asura_Xbox360_LiveContextManager.h"

// Project independent
#include "Core/AVP_Settings.h"

// project XLAST include
#include "AVP3.spa.h"

// check values entered in XLAST match up with in-game values
ASURA_STATIC_ASSERT(CONTEXT_AVPGAMEMODE_DISRUPTIONDOMINATION	== AVP_Settings::AVP_GAMETYPE_DISRUPTION_DOMINATION);
ASURA_STATIC_ASSERT(CONTEXT_AVPGAMEMODE_DEATHMATCH				== AVP_Settings::AVP_GAMETYPE_DEATH_MATCH);
ASURA_STATIC_ASSERT(CONTEXT_AVPGAMEMODE_HUNT					== AVP_Settings::AVP_GAMETYPE_HUNT);
ASURA_STATIC_ASSERT(CONTEXT_AVPGAMEMODE_TEAMDEATHMATCH			== AVP_Settings::AVP_GAMETYPE_SPECIES_TEAM_DEATH_MATCH);
ASURA_STATIC_ASSERT(CONTEXT_AVPGAMEMODE_SURVIVOR				== AVP_Settings::AVP_GAMETYPE_SURVIVOR);

// set up mappings for lobby attributes to the XLAST context IDs
void AVP_GameLobby::Platform_Initialise()
{
	Asura_Xbox360_LiveContextManager::Initialise(AVP_NUM_LOBBY_ATTRIBUTES);
	const bool bIsProperty = true;
	const bool bIsContext = false;
	Asura_Xbox360_LiveContextManager::AddMapping(AVP_LOBBY_ATTRIBUTE_MAP, CONTEXT_AVPMAP, bIsContext);
	Asura_Xbox360_LiveContextManager::AddMapping(AVP_LOBBY_ATTRIBUTE_GAMETYPE, CONTEXT_AVPGAMEMODE, bIsContext);
	Asura_Xbox360_LiveContextManager::AddMapping(AVP_LOBBY_ATTRIBUTE_GAME_VERSION, PROPERTY_AVPGAMEVERSION, bIsProperty);
	Asura_Xbox360_LiveContextManager::AddMapping(AVP_LOBBY_ATTRIBUTE_SKILL, PROPERTY_AVPSKILL, bIsProperty);
	Asura_Xbox360_LiveContextManager::AddMapping(AVP_LOBBY_ATTRIBUTE_ADVANCED_SETTINGS_A, PROPERTY_AVPADVSETTINGSA, bIsProperty);
	Asura_Xbox360_LiveContextManager::AddMapping(AVP_LOBBY_ATTRIBUTE_ADVANCED_SETTINGS_B, PROPERTY_AVPADVSETTINGSB, bIsProperty);
}

void AVP_GameLobby::Platform_Shutdown()
{
	Asura_Xbox360_LiveContextManager::Shutdown();
}
