
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Vertebrate_PlayerAnimStateHandler.h
// Author : Will Plano
// Date   : 25/02/2008
//
// Copyright (C) 2008 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

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

#ifndef __AVP_VERTEBRATE_PLAYERANIMSTATEHANDLER_H__
#define __AVP_VERTEBRATE_PLAYERANIMSTATEHANDLER_H__

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

#include "Actor/AVP_Actor_PlayerAnimStateHandler.h"

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

class AVP_Vertebrate_PlayerAnimStateHandler : public AVP_Actor_PlayerAnimStateHandler
{
public:
	// Public enumerated types...
	enum MovementState
	{
		MOVESTATE_BEGIN = 0,
		MOVESTATE_NORMAL = MOVESTATE_BEGIN,
		MOVESTATE_ALTPOSTURE,
		MOVESTATE_JUMPING,
		MOVESTATE_FALLING,
		// Only the marine uses the aiming states, so make it easy to set up the limits for the other two.
		MOVESTATE_END_NOAIM,

		MOVESTATE_NORMALAIM = MOVESTATE_END_NOAIM,
		MOVESTATE_ALTAIM,
		MOVESTATE_END,

	};

	enum MovementSpeed
	{
		MOVESPEED_BEGIN = 0,
		MOVESPEED_IDLE = MOVESPEED_BEGIN,
		MOVESPEED_SLOW,
		MOVESPEED_MEDIUM,
		MOVESPEED_FAST,
		MOVESPEED_END
	};

	enum MovementDirection
	{
		MOVEDIR_BEGIN = 0,
		MOVEDIR_FORWARD = MOVEDIR_BEGIN,
		MOVEDIR_NONE = MOVEDIR_FORWARD,
		MOVEDIR_FORWARD_RIGHT,
		MOVEDIR_RIGHT,
		MOVEDIR_BACK_RIGHT,
		MOVEDIR_BACK,
		MOVEDIR_BACK_LEFT,
		MOVEDIR_LEFT,
		MOVEDIR_FORWARD_LEFT,
		MOVEDIR_END
	};

	enum FallingState
	{
		FALLINGSTATE_NONE,
		FALLINGSTATE_JUMPING,
		FALLINGSTATE_FALLING,
		FALLINGSTATE_LANDING,

		FALLINGSTATE_END
	};

	AVP_Vertebrate_PlayerAnimStateHandler::MovementSpeed GetBestMoveSpeed() const { return m_eBestMoveSpeed; }

	// Public functions...
	AVP_Vertebrate_PlayerAnimStateHandler( AVP_ClientEntity_Actor& xClient );
	virtual ~AVP_Vertebrate_PlayerAnimStateHandler() {}

protected:
#ifndef ASURA_NO_DEBUG_OUTPUT
	virtual void RenderDebugInfo( Asura_Vector_3& xOutputPos );
#endif

	AVP_Vertebrate_PlayerAnimStateHandler::MovementSpeed m_eBestMoveSpeed;
	FallingState m_eCurrentFallingState;
	float m_fCrouchSpeed;
	float m_fWalkSpeed;
	float m_fRunSpeed;
	float m_fSprintSpeed;

	float m_fUBSpeedParametric;

private:
	typedef AVP_Actor_PlayerAnimStateHandler PARENT;

	AVP_Vertebrate_PlayerAnimStateHandler(const AVP_Vertebrate_PlayerAnimStateHandler& xOther);
	AVP_Vertebrate_PlayerAnimStateHandler&	operator=(const AVP_Vertebrate_PlayerAnimStateHandler& xOther);

}; // End of class 'AVP_Vertebrate_PlayerStateHandler'.

#endif // ifndef __AVP_VERTEBRATE_PLAYERSTATEHANDLER_H__

/// End of file. ///
