
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Platform_Human_InputHandler.cpp
// Author : Chris Wallace
// Date   : 6-Feb-2007
//
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

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

#include "Core/Asura.h"

// This file's header...
#include "Actor/Vertebrates/Human/AVP_Human_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_fLastWeaponTapDuration	= 0.250f;
static const float	g_fSelectWeaponHoldDuration	= 0.250f;

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


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

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

void AVP_Human_InputHandler::Platform_InitialiseControlMap (void)
{
	Asura_ControlMap& xFirst = GetMapFirstPerson();
	Asura_ControlMap& xCutscene = GetMapCutscene();

	// first person mappings
	MapVisionAndFlare(xFirst, ASURA_XBOX360_KEYID_PAD1_L_BUMPER, ASURA_XBOX360_KEYID_PAD1_L_BUMPER);
	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_XBOX360_KEYID_PAD1_B);
	MapZoom(		xFirst, ASURA_XBOX360_KEYID_PAD1_UP, ASURA_XBOX360_KEYID_PAD1_DOWN, ASURA_KEYID_VOID);
	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);
	MapTorch(		xFirst, ASURA_XBOX360_KEYID_PAD1_DOWN);
	MapHealth(		xFirst, ASURA_XBOX360_KEYID_PAD1_Y );
	MapFocusKeys(	xFirst, ASURA_XBOX360_KEYID_PAD1_L_TRIGGER, ASURA_XBOX360_KEYID_PAD1_L_TRIGGER);
//	MapADS(			xFirst, ASURA_XBOX360_KEYID_PAD1_R_THUMB);
	MapMelee(		xFirst, ASURA_XBOX360_KEYID_PAD1_R_BUMPER, ASURA_XBOX360_KEYID_PAD1_R_BUMPER, ASURA_XBOX360_KEYID_PAD1_A);

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

	// Grapple 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);
}

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



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


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


/// End of file. ///
