//////////////////////////////////////////////////////////////////////////////
//
// Asura_PSP_Input.h
//
// Created by Andrew Weinkove - 08/04/04.
//
// Copyright (c) 2004 Rebellion. All rights reserved.
//
// Implementation of the PSP input manager class
//
//////////////////////////////////////////////////////////////////////////////

// B E G I N   F I L E   W R A P P E R ///////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef ___ASURA_PSP_INPUT_H___
#define ___ASURA_PSP_INPUT_H___ 1

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

class Asura_PSP_Input
{
public:
	static void Initialise(unsigned char *pucAsuraCurrentInput, float *pfAsuraAxis);
	static void Shutdown();
	static void Reset();
	static bool IsKeyToggled(int iKey);
	static void Update();
	static void SetAnalogStickDeadZone( float fDeadZone ) { s_fAnalogStickDeadZone = fDeadZone; }
	static void SetUseConversionArray( bool bUseConversionArray, const float* pfConversionArray = 0 );
	static void ConvertPosXY(u_char ucContX, u_char ucContY, float* pfX, float* pfY);
	static bool HasBeenIntercepted() { return s_bIntercepted; }

private:
	static void ReconfigureKeys();
	static float ConvertPSPAxisToAsuraAxis(u_char ucPSPAxis);

	// Data 
	static float   *s_pfAsuraAxis; //Pointer to the Asura_Axis buffer
	static u_char  *s_pucAsuraCurrentInput;
	static float s_fAnalogStickDeadZone;
	static bool s_bUseConversionArray;
	static const float* s_pfConversionArray;

	static u_char s_ucPrevx;
	static u_char s_ucPrevy;
	
	static bool s_bIntercepted;
};

// E N D   F I L E   W R A P P E R ///////////////////////////////////////////

#endif // #ifndef ___ASURA_PSP_INPUT_H___
