
///////////////////////////////////////////////////////////////////////////////
//
// File   : Asura_ControlMapping_Key.h
// Author : Andy Tate
// Date   : 1-Dec-2005
//
// Copyright (C) 2005 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
	#pragma once
#endif   // ifdef ASURA_USE_PRAGMA_ONCE

#ifndef __ASURA_CONTROLMAPPING_KEY_H__
#define __ASURA_CONTROLMAPPING_KEY_H__

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

#include "Input/Asura_ControlMapping.h"


////////////////////////////////////////////////////////////////////////////////
// Forward class declarations...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Class declaration...
////////////////////////////////////////////////////////////////////////////////

class Asura_ControlMapping_Key : public Asura_ControlMapping
{
public:
	// Public functions...
	Asura_ControlMapping_Key          (const int iKeyID, const KeyHoldType eHoldType, const float fScale);
//	virtual ~Asura_ControlMapping_Key ();

	// Static calculation function...
	static	float	CalculateValue(const KeyHoldType eHoldType, const float fOldValue, const float fNewValue);

	// Overridden virtual functions...
	virtual void	ResetValue(void);
	virtual	void	UpdateValues(const bool bActive, float& fValue, float& fHUDValue);
	virtual int		GetControlID(void) const	{ return m_iKeyID; } 

	virtual Asura_Hash_ID	GetInstanceMappingType(void) const	{ return s_uMappingType; } 
	static	Asura_Hash_ID	GetClassMappingType( void )			{ return s_uMappingType; }

protected:
	// Protected variables...

	// The key AND the type of hold to check-for...
	int			m_iKeyID;
	KeyHoldType	m_eKeyHoldType;

	// The values to be stored...
	float		m_fOldValue;
	float		m_fNewValue;


	// Protected functions...


private:
	// Private variables...
	static const Asura_Hash_ID s_uMappingType = 0x00019E5F;	//Asura_GetHashId( "KEY" )

	// Private functions...

	Asura_ControlMapping_Key  (void);
	Asura_ControlMapping_Key  (const Asura_ControlMapping_Key& xOther);

			Asura_ControlMapping_Key&	operator=		(const Asura_ControlMapping_Key& xOther);

};   // End of class 'Asura_ControlMapping_Key'.


#endif   // ifndef __ASURA_CONTROLMAPPING_KEY_H__


/// End of file. ///
