
///////////////////////////////////////////////////////////////////////////////
//
// File   : Asura_ControlMapping_Combination.h
// Author : Andy McCabe
// Date   : 11-Sep-2006
//
// Copyright (C) 2006 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

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

#ifndef __ASURA_CONTROLMAPPING_COMBINATION_H__
#define __ASURA_CONTROLMAPPING_COMBINATION_H__

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

#include "Input/Asura_ControlMapping.h"


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


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

class Asura_ControlMapping_Combination : public Asura_ControlMapping
{
public:
	// Public functions...
	Asura_ControlMapping_Combination		  (Asura_ControlMapping* pxControlMapping1, Asura_ControlMapping* pxControlMapping2, const float fScale);
	virtual ~Asura_ControlMapping_Combination ();

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

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

	const Asura_ControlMapping* GetControlMapping( u_int uPart ) const { return ((uPart == 0) ? m_pxControlMapping1 : m_pxControlMapping2); } 

#ifdef ASURA_USE_NEW_INPUT
	virtual void	SetOwner(Asura_ControlMap* pxOwner);
#endif

protected:
	// Protected variables...

	// Protected functions...


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

	// The control mapping combinations...
	Asura_ControlMapping* m_pxControlMapping1;
	Asura_ControlMapping* m_pxControlMapping2;
	
	float m_fValueToReport;

	// Private functions...

	Asura_ControlMapping_Combination  (void);
	Asura_ControlMapping_Combination  (const Asura_ControlMapping_Combination& xOther);

			Asura_ControlMapping_Combination&	operator=	(const Asura_ControlMapping_Combination& xOther);

};   // End of class 'Asura_ControlMapping_Combination'.


#endif   // ifndef __ASURA_CONTROLMAPPING_HOLDKEY_H__


/// End of file. ///
