
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Platform_Predator_InputHandler.cpp
// Author : Andy Tate
// Date   : 4-Oct-2006
//
// Copyright (C) 2006 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////

#include "Core/Asura.h"

// This file's header...
#include "Actor/Vertebrates/Predator/AVP_Predator_InputHandler.h"

// Asura independent header-files...
#include "Input/Asura_ControlMapping_Key.h"

// Asura platform header-files...
#include "Input/Asura_PlatformInput.h"

// Game independent header-files...

// Game platform header-files...

// Tools header-files...


////////////////////////////////////////////////////////////////////////////////
// Constant declarations...
////////////////////////////////////////////////////////////////////////////////

static const float	g_fJumpTapDuration				= 0.250f;
static const float	g_fJumpHoldDuration				= 0.250f;

static const float	g_fLastVisionModeTapDuration	= 0.250f;
static const float	g_fSelectVisionModeHoldDuration	= 0.250f;

static const float	g_fLastWeaponTapDuration		= 0.250f;
static const float	g_fSelectWeaponHoldDuration		= 0.250f;


////////////////////////////////////////////////////////////////////////////////
// Static variable declarations...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Private functions...
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Function     : AVP_Predator_InputHandler::Platform_InitialiseControlMap
// Author       : Andy Tate
// Date         : 4-Oct-2006
////////////////////////////////////////////////////////////////////////////////

void AVP_Predator_InputHandler::Platform_InitialiseControlMap (void)
{
	Asura_ControlMap& xFirst = GetMapFirstPerson();
	Asura_ControlMap& xCutscene = GetMapCutscene();
	Asura_ControlMap& xVisionSelector = GetMapVisionSelector();

	// first person mappings
	MapVision(		xFirst, ASURA_XBOX360_KEYID_PAD1_L_BUMPER, ASURA_XBOX360_KEYID_PAD1_L_BUMPER, ASURA_KEYID_VOID);
	MapLookAxes(	xFirst, ASURA_XBOX360_AXISID_PAD1_RSTICK_H, ASURA_XBOX360_AXISID_PAD1_RSTICK_V);
	MapMovementAxes(xFirst, ASURA_XBOX360_AXISID_PAD1_LSTICK_V, ASURA_XBOX360_AXISID_PAD1_LSTICK_H, ASURA_KEYID_VOID, ASURA_XBOX360_KEYID_PAD1_L_THUMB, ASURA_KEYID_VOID);
	MapZoom(		xFirst, ASURA_KEYID_VOID, ASURA_KEYID_VOID, ASURA_XBOX360_KEYID_PAD1_R_THUMB);
	MapJump(		xFirst, ASURA_XBOX360_KEYID_PAD1_A);
	MapAttacks(		xFirst, ASURA_XBOX360_KEYID_PAD1_R_TRIGGER, ASURA_XBOX360_KEYID_PAD1_L_TRIGGER, ASURA_XBOX360_KEYID_PAD1_L_TRIGGER, ASURA_XBOX360_KEYID_PAD1_R_TRIGGER);
	MapInteractAndReloadToSameKey(	xFirst, ASURA_XBOX360_KEYID_PAD1_X);
	MapMenuToggle(	xFirst, ASURA_XBOX360_KEYID_PAD1_START);
	MapObjectivesAndSelectToggle(	xFirst, ASURA_XBOX360_KEYID_PAD1_BACK, ASURA_XBOX360_KEYID_PAD1_BACK);
	MapFocusKeys(	xFirst, ASURA_XBOX360_KEYID_PAD1_L_TRIGGER, ASURA_XBOX360_KEYID_PAD1_L_TRIGGER);
	MapMelee(		xFirst, ASURA_XBOX360_KEYID_PAD1_R_BUMPER, ASURA_XBOX360_KEYID_PAD1_R_BUMPER, ASURA_XBOX360_KEYID_PAD1_A);
	MapHealth(		xFirst, ASURA_XBOX360_KEYID_PAD1_Y);

	// weapon and vision mode select mappings
	MapWeaponSelect(xFirst, ASURA_XBOX360_KEYID_PAD1_UP, ASURA_XBOX360_KEYID_PAD1_DOWN, ASURA_XBOX360_KEYID_PAD1_LEFT, ASURA_XBOX360_KEYID_PAD1_RIGHT);

	MapCloak(		xFirst, ASURA_XBOX360_KEYID_PAD1_B);

	// Cutscene mappings
	MapCutscene(	xCutscene, ASURA_XBOX360_KEYID_PAD1_A);
	MapMenuToggle(	xCutscene, ASURA_XBOX360_KEYID_PAD1_START);
	MapObjectivesAndSelectToggle( xCutscene, ASURA_XBOX360_KEYID_PAD1_BACK, ASURA_XBOX360_KEYID_PAD1_BACK);

	MapLookAxes(	xVisionSelector, ASURA_XBOX360_AXISID_PAD1_RSTICK_H, ASURA_XBOX360_AXISID_PAD1_RSTICK_V);
	MapMenuToggle(	xVisionSelector, ASURA_XBOX360_KEYID_PAD1_START);
	MapObjectivesAndSelectToggle( xVisionSelector, ASURA_XBOX360_KEYID_PAD1_BACK, ASURA_XBOX360_KEYID_PAD1_BACK);
	MapMovementAxes(xVisionSelector, ASURA_XBOX360_AXISID_PAD1_LSTICK_V, ASURA_XBOX360_AXISID_PAD1_LSTICK_H, ASURA_KEYID_VOID, ASURA_XBOX360_KEYID_PAD1_L_THUMB, ASURA_KEYID_VOID);

	// weapon and vision mode select mappings
	MapVisionSelect(xVisionSelector, ASURA_XBOX360_KEYID_PAD1_Y, ASURA_XBOX360_KEYID_PAD1_A, ASURA_XBOX360_KEYID_PAD1_X, ASURA_XBOX360_KEYID_PAD1_B );
	MapRecon(		xFirst, ASURA_XBOX360_KEYID_PAD1_X);
}

/// End of function 'AVP_Predator_InputHandler::Platform_InitialiseControlMap'. ///



////////////////////////////////////////////////////////////////////////////////
// Protected functions...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Public functions...
////////////////////////////////////////////////////////////////////////////////


/// End of file. ///
