
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Alien_HUDHandler.h
// Author : Chris Wallace
// Date   : 6-Aug-2007
//
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

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

#ifndef __AVP_ALIEN_HUDHANDLER_H__
#define __AVP_ALIEN_HUDHANDLER_H__

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

#include "Sound/Asura_Sound_Event_System.h"

#include "Actor/AVP_Actor_CameraHandler.h"
#include "Actor/Vertebrates/AVP_Vertebrate_HUDHandler.h"


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

class AVP_ClientEntity_Actor;
class AVP_ClientActor_Alien;

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


////////////////////////////////////////////////////////////////////////////////
// Variables...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Class        : AVP_Alien_HUDHandler
// Author       : Chris Wallace
// Date         : 6-Aug-2007
//
// Description  : Class to the handle the Alien specific HUD manipulation.
////////////////////////////////////////////////////////////////////////////////

class AVP_Alien_HUDHandler : public AVP_Vertebrate_HUDHandler
{
public:
	// Public functions...
	AVP_Alien_HUDHandler (AVP_ClientEntity_Actor& xClient);	
	virtual ~AVP_Alien_HUDHandler ();

	// Overridden functions...
	virtual	void	Update	( const AVP_ClientEntity_Actor& xClient );
	virtual void	Render	( const AVP_ClientEntity_Actor& xClient );
	virtual void	Reset	();

	void UpdateHUDCounter(u_int uCounterValue, int& iCounterUnits);
	void UpdateHUDCounter(u_int uCounterValue, int& iCounterUnits, int& iCounterTens);
	void UpdateHUDCounter(u_int uCounterValue, int& iCounterUnits, int& iCounterTens,  int& iCounterHundreds);
	void UpdateHUDCounter(u_int uNumCounters, u_int uCounterValue, u_int u_intMaxValue, int& iCounterUnits, int& iCounterTens, int& iCounterHundreds);
	
	void UpdateHealthBar(void);
	void UpdateArmourBar(void);

	void RenderHealthBar(void);
	void RenderArmourBar(void);

	static void SetHeadbiteTargetInRange( bool bHeadbiteTargetInRange ){ s_bHeadbiteTargetInRange = bHeadbiteTargetInRange; }
	static void SetSurfaceInRange( bool bSurfaceInRange ){ s_bSurfaceInRange = bSurfaceInRange; }
	static void SetTailstabTargetInRange( bool bTailstabTargetInRange ){ s_bTailstabTargetInRange = bTailstabTargetInRange; }

	// Create console vars
#if defined(ASURA_SUPPORT_COMMAND_CONSOLE)
	static void CreateConsoleVars();
#endif	// defined(ASURA_SUPPORT_COMMAND_CONSOLE)	

protected:
	// Protected variables...
	
	u_int	m_uEnergy;
	float	m_fHealth;
	float	m_fArmour;

	float	m_fHUDScaleH;
	float	m_fHUDScaleV;

	// Protected functions...

private:
	// Private typedefs...
	typedef AVP_Vertebrate_HUDHandler PARENT;

	float m_fMenuPhase;

	static bool s_bIsInShadow;
	static int s_iStealth01;
	static int s_iStealth02;
	static int s_iStealth03;
	static int s_iStealth04;
	static int s_iStealth05;
	static bool s_bHeadbiteTargetInRange;
	static bool s_bIsFaceHuggerSummonable;
	static bool s_bSurfaceInRange;
	static bool s_bTailstabTargetInRange;
	static u_int s_uFaceHuggerPetStatus;

	void UpdateAlienStealthIndicator(const AVP_ClientActor_Alien& xAlien);
	void UpdateAlienJumpIndicator(const AVP_ClientActor_Alien& xAlien);
	void UpdateFaceHuggerPet(const AVP_ClientActor_Alien& xAlien);


	// Private functions...
	AVP_Alien_HUDHandler  (const AVP_Alien_HUDHandler& xOther);

	AVP_Alien_HUDHandler&	operator=	(const AVP_Alien_HUDHandler& xOther);

	void RenderText			(void);
	void RenderPanicPrompts (void) {};

	void RefreshBlueprintValues(void);

	static bool s_bGotStaticBlueprintValues;

};   // End of class 'AVP_Alien_HUDHandler'.


#endif   // ifndef __AVP_ALIEN_HUDHANDLER_H__

/// End of file. ///
