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

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

#ifndef __AVP_PREDATOR_PLAYERANIMSTATEDATA_H__
#define __AVP_PREDATOR_PLAYERANIMSTATEDATA_H__

#include "Core/Asura_HashTree.h"

#include "Actor/Vertebrates/AVP_Vertebrate_PlayerAnimStateData.h"
#include "Actor/Vertebrates/Predator/AVP_Predator_PlayerAnimStateHandler.h"

class AVP_Actor_AnimStateData;

class AVP_Predator_PlayerAnimStateData : public AVP_Vertebrate_PlayerAnimStateData
{
public:
	AVP_Predator_PlayerAnimStateData()	{}

	static AVP_Predator_PlayerAnimStateData&	GetSingleton()			{ return s_xSingleton; }

	const AVP_Actor_AnimStateData* GetAnimStateData( const Asura_Hash_ID uAnimStateBlueprintType, const Asura_Hash_ID uCurrentWeaponHash, const bool bFirstPerson, const bool bCrouching, const bool bJumping, const bool bFalling, AVP_Vertebrate_PlayerAnimStateHandler::MovementSpeed eMoveSpeed );

	void ResetStorage() { m_xHashTree.Reset(); }

#ifdef ASURA_TOOLS
	void InitialiseWeaponData( const Asura_Hash_ID uAnimStateBlueprintType, const Asura_Hash_ID uHash ) { GetWeaponDataByHash( uAnimStateBlueprintType, uHash ); }
#endif

private:
	typedef AVP_Vertebrate_PlayerAnimStateData PARENT;

	struct AVP_Predator_PlayerAnimWeaponStateData
	{
		AVP_Predator_PlayerAnimWeaponStateData();
		~AVP_Predator_PlayerAnimWeaponStateData();
#ifdef ASURA_TOOLS
		void InitialiseFromBlueprint( const Asura_Hash_ID uAnimStateBlueprintType, const Asura_Hash_ID uBlueprintHash );
#endif

		AVP_Actor_AnimStateData* m_aaapxAnimStateData[ 2 ][ AVP_Vertebrate_PlayerAnimStateHandler::MOVESTATE_END_NOAIM ][ AVP_Vertebrate_PlayerAnimStateHandler::MOVESPEED_END ];
	};

	const AVP_Predator_PlayerAnimWeaponStateData* GetWeaponDataByHash( const Asura_Hash_ID uAnimStateBlueprintType, const Asura_Hash_ID uWeaponHash );
	AVP_Predator_PlayerAnimWeaponStateData* AddNewWeaponData( const Asura_Hash_ID uWeaponHash ) { return m_xHashTree.AddNode( uWeaponHash ); }

	Asura_TemplateHashTree< AVP_Predator_PlayerAnimWeaponStateData > m_xHashTree;

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

	static AVP_Predator_PlayerAnimStateData		s_xSingleton; 

	friend class AVP_Chunk_Predator_PlayerAnimStateData;
};

#endif // __AVP_PREDATOR_PLAYERANIMSTATEDATA_H__
