
#pragma once
#ifndef MWDEBUGHELPER_HPP
#define MWDEBUGHELPER_HPP

#include <Adept\NameTable.hpp>

#pragma warning (push)
#include <stlport\string>
#pragma warning (pop)



namespace MechWarrior4
{
	class Vehicle;
	class VehicleInterface;

	class DebugHelper
	{
	  public:
		DebugHelper();
		~DebugHelper();

		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// Instance
		//
		static DebugHelper* GetInstance();

		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// Drawing
		//
	    void Execute();
	  
		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// GOS callbacks: camera
		//
		static bool __stdcall Check_CameraInMech();
		static void __stdcall Activate_CameraInMech();

		static bool __stdcall Check_CameraExternal();
		static void __stdcall Activate_CameraExternal();

		static bool __stdcall Check_CameraTopDown();
		static void __stdcall Activate_CameraTopDown();

		static bool __stdcall Check_CameraTopDownFollow();
		static void __stdcall Activate_CameraTopDownFollow();

		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// GOS callbacks: MW4AI
		//
		static bool __stdcall Check_InvulnerabilityGlobal();
		static void __stdcall Activate_InvulnerabilityGlobal();

		static bool __stdcall Check_CameraAttachToNext();
		static void __stdcall Activate_CameraAttachToNext();

		static bool __stdcall Check_IgnoreCurrentVehicle();
		static void __stdcall Activate_IgnoreCurrentVehicle();

		static bool __stdcall Check_ShowAIStats();
		static void __stdcall Activate_ShowAIStats();

		static bool __stdcall Check_ShowAIStatsCurrentVehicleOnly();
		static void __stdcall Activate_ShowAIStatsCurrentVehicleOnly();

		static bool __stdcall Check_ShowDamageInfo();
		static void __stdcall Activate_ShowDamageInfo();

		static bool __stdcall Check_ShowMovementLines();
		static void __stdcall Activate_ShowMovementLines();

		static bool __stdcall Check_ShowMovementPaths();
		static void __stdcall Activate_ShowMovementPaths();

		static bool __stdcall Checked_DisableAI ();
		static void __stdcall Activate_DisableAI ();

		static bool __stdcall Check_ShowNumPathRequests();
		static void __stdcall Activate_ShowNumPathRequests();

		static bool __stdcall Check_EnableAIHeatManagement();
		static void __stdcall Activate_EnableAIHeatManagement();

		static bool __stdcall Checked_DisableCombatMovement();
		static void __stdcall Activate_DisableCombatMovement();

		static bool __stdcall Checked_DisableCombatFiring();
		static void __stdcall Activate_DisableCombatFiring();

		static bool __stdcall Checked_BreakInCurrentVehicle();
		static void __stdcall Activate_BreakInCurrentVehicle();

		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// ABL
		//

		static bool __stdcall Check_ABLProfile();
		static void __stdcall Activate_ABLProfile();

		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// Dead reckoning
		//

		static bool __stdcall Check_ShowDeadReckoning05s();
		static void __stdcall Activate_ShowDeadReckoning05s();

		static bool __stdcall Check_ShowDeadReckoning1s();
		static void __stdcall Activate_ShowDeadReckoning1s();

		static bool __stdcall Check_ShowDeadReckoning2s();
		static void __stdcall Activate_ShowDeadReckoning2s();
		
		static bool __stdcall Check_HideDeadReckoning();
		static void __stdcall Activate_HideDeadReckoning();

		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// GOS callbacks: Mech testing
		//

		static bool __stdcall Check_TestArmActivation();
		static void __stdcall Activate_TestArmActivation();
		static bool __stdcall Check_TestPushupOff();
		static void __stdcall Activate_TestPushupOff();
		static bool __stdcall Check_TestLeftGimp();
		static void __stdcall Activate_TestLeftGimp();
		static bool __stdcall Check_TestRightGimp();
		static void __stdcall Activate_TestRightGimp();
		static void __stdcall Activate_TestLeftArmRecoil();
		static void __stdcall Activate_TestRightGunRecoil();
		static void __stdcall Activate_TestHit1();
		static void __stdcall Activate_TestHit2();
		static void __stdcall Activate_TestHit3();
		static void __stdcall Activate_TestHit4();
		static void __stdcall Activate_TestReset();
		static void __stdcall Activate_TestFallForward();
		static void __stdcall Activate_TestFallBackward();
		static void __stdcall Activate_TestFallLeft();
		static void __stdcall Activate_TestFallRight();
		static bool __stdcall Check_TestFastTransition();
		static void __stdcall Activate_TestFastTransition();


		static bool __stdcall Check_NoBlend();
		static void __stdcall Activate_NoBlend();



		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// GOS callbacks: Torso Control
		//

		static bool __stdcall Check_AlwaysLeaveTorsoAlone();
		static void __stdcall Activate_AlwaysLeaveTorsoAlone();
		
		static bool __stdcall Check_AlwaysCenterTorsoToLegs();
		static void __stdcall Activate_AlwaysCenterTorsoToLegs();
		
		static bool __stdcall Check_AlwaysCenterLegsToTorso();
		static void __stdcall Activate_AlwaysCenterLegsToTorso();
		
		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// GOS callbacks: Input Trainer
		//

		static bool __stdcall Check_ThrottleEnabled();
		static void __stdcall Activate_ThrottleEnabled();
		static bool __stdcall Check_TurnEnabled();
		static void __stdcall Activate_TurnEnabled();
		static bool __stdcall Check_TorsoEnabled();
		static void __stdcall Activate_TorsoEnabled();
		static bool __stdcall Check_FiringEnabled();
		static void __stdcall Activate_FiringEnabled();
		static bool __stdcall Check_ViewModesEnabled();
		static void __stdcall Activate_ViewModesEnabled();
		static bool __stdcall Check_TargetSelectionEnabled();
		static void __stdcall Activate_TargetSelectionEnabled();
		static bool __stdcall Check_ZoomEnabled();
		static void __stdcall Activate_ZoomEnabled();
		static bool __stdcall Check_HeatEnabled();
		static void __stdcall Activate_HeatEnabled();
		static bool __stdcall Check_NavSwitchingEnabled();
		static void __stdcall Activate_NavSwitchingEnabled();
		static bool __stdcall Check_MiscEnabled();
		static void __stdcall Activate_MiscEnabled();

		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// GOS callbacks: "Switch To >>"
		//

		static DWORD __stdcall Activate_SwitchToNextPage(char* name, DWORD function);

		static DWORD __stdcall SwitchCallback(char* name, DWORD function);

		std::string m_PublicString;

		bool ShouldBreakInCurrentVehicle() const;

	private:
		static std::string GetMenuItemName(unsigned int index, bool fIncludePrefix = true);
		static unsigned int GetMenuItemIndex(const std::string& name);

		static std::string GetSwitchToPrefix();

		static unsigned int GetNumObjectNames();
		static std::string GetObjectName(unsigned int index);

		static void SwitchToObject(unsigned int index);
		static void SwitchToObject(MechWarrior4::MWObject& v);

	  private:
		//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		// Data members
		//
		static DebugHelper* m_Instance;
		bool m_FollowCamera;
		static bool m_AIOff;
		Adept::ObjectID m_PlayerID;
		unsigned int m_SwitchTo_Page;
		bool m_BreakInCurrentVehicle;
	};
};


#endif // MWDEBUGHELPER_HPP
