																																																																
#pragma once

#include "MW4.hpp"
#include "hudcomp.hpp"

namespace MechWarrior4
{
	class Vehicle;

	class HUDMap : public HUDComponent
	{
	protected:
		struct ShotEntry
		{
			ObjectID entity;
			Stuff::Time timeadded;
			ShotEntry (ObjectID p1,Stuff::Time p2)
			{
				entity = p1;
				timeadded = p2;
			}
		};
		Stuff::SlotOf <Entity*> m_CurrentTarget;

		SlotOf<Vehicle*> vehiclePtr;

		typedef HUDComponent inherited;
		Stuff::Scalar m_TorsoTwist;
		int m_RadarMode;

		stlport::vector<ShotEntry> m_ShotList;
		bool OnShotList (ObjectID who);
		void DrawImplementation(void);
		void ConvertMapCoords (float& x,float& y);
		void ConvertMapCoords (Point3D& pt);
		//sanghoon begin
		bool hsh_fdraw;
		//sanghoon end

	public:
		HUDMap();
		~HUDMap();
		virtual void Reset (void);
		virtual void Update(Stuff::Time till);
		void AddShot (ObjectID who);
		void SetVehicle(Vehicle *vehicle);
		void TorsoTwist (Stuff::Scalar value)
		{ m_TorsoTwist = value; }
		void CurrentTarget (Entity *obj)
		{
			m_CurrentTarget.Remove ();
			if (obj)
				m_CurrentTarget.Add (obj);
		}
	};
}
