//===========================================================================//
// File:	MW4.hpp	
//---------------------------------------------------------------------------//
//   Date    Who  Modification                                               //
// --------  ---  ---------------------------------------------------------- //
// 09/09/98  JSE  Inital base class based off of Shadowrun/Adept                                //
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive										 //
// All Rights reserved worldwide                                             //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL               //
//===========================================================================//

#pragma once

#include <Adept\Adept.hpp>
//#include "comline\comline.hpp"
#pragma warning (disable:4786)

#define CODE_KEY 0xAAAAAAAA

//they are the same, but eventually I could bring in real encryption



namespace MechWarrior4
{
//	class CCommandLine
//	extern CCommandLineServer *g_ComServer;
	//
	//------------------
	// Class ID's for MW4
	//------------------
	//
	enum
	{
		MWMissionClassID = Stuff::FirstMW4ClassID,
		MWMoverClassID,
		MWMover__ExecutionStateEngineClassID,
		VehicleClassID,
		Vehicle__ExecutionStateEngineClassID,
		VehicleInterfaceClassID,
		MWPlayerClassID,
		SubsystemClassID,
		MWDamageObjectClassID,
		MechClassID,
		HelicopterClassID,
		DropshipClassID,
		HovercraftClassID,
		BuildingClassID,
		TruckClassID,
		TankClassID,
		ElementalClassID,
		EngineClassID,
		HeatsinkClassID,
		HeatpoolClassID,
		CommunicationClassID,
		AmmoBayClassID,
		WeaponClassID,
		LaunchedWeaponClassID,
		LaunchedWeaponStateClassID,
		WeaponMoverClassID,
		WeaponMover__ExecutionStateEngineClassID,
		NewClassID,
		ProjectileClassID,
		MissileClassID,
		BeamClassID,
		PulseClassID,
		GUIInterfaceClassID,
		GUICounterClassID,
		StaticObjectClassID,
		TriggerClassID,
		WaypointClassID,
		GUIStatBarClassID,
		GUIHeatBarClassID,
		GUITimerBarClassID,
		Heatpool__ExecutionStateEngineClassID,
		GyroClassID,
		LifeSupportClassID,
		ActuatorClassID,
		JumpJetClassID,
		C3ComputerClassID,
		BeagleProbeClassID,
		ECMModuleClassID,
		ArtimisFCSClassID,
		JumpJet__ExecutionStateEngineClassID,
		BeamWeaponClassID,
		BeamWeapon__ExecutionStateEngineClassID,
		AnimScriptClassID,
		AnimComponentClassID,
		AnimCurveListClassID,
		ForwardAnimPlayerClassID,
		ReverseAnimPlayerClassID,
		AcceleratedAnimPlayerClassID,
		WalkRunAnimPlayerClassID,
		LerpAnimPlayerClassID,
		FasterDecisionClassID,
		SlowerDecisionClassID,
		SlowerThanDecisionClassID,
		FasterThanDecisionClassID,
		StateDecisionClassID,
		BoolDecisionClassID,
		IntDecisionClassID,
		FloatDecisionClassID,
		StateSetFuncClassID,
		IntSetFuncClassID,
		BoolSetFuncClassID,
		FloatSetFuncClassID,
		LRMissileClassID,
		DecalClassID,
		TorsoClassID,
		AnimationStateEngineClassID,
		BeamEntityClassID,
		MechAnimationStateEngineClassID,
		ProjectileWeaponClassID,
		ProjectileWeapon__ExecutionStateEngineClassID,
		Turret__ExecutionStateEngineClassID,
		TurretClassID,
		Missile__ExecutionStateEngineClassID,
		MissileWeaponClassID,
		SRMWeaponSubsystemClassID,
		MRMWeaponSubsystemClassID,
		LRMWeaponSubsystemClassID,
		SSRMWeaponSubsystemClassID,
		PathManagerClassID,
		MechAIClassID,
		CombatAIClassID,
		MoverAIClassID,
		CRailGraphClassID,
		MWApplicationClassID,
		MWEntityManagerClassID,
		GUIWeaponClassID,
		MWVideoRendererClassID,
		StickyMover__ExecutionStateEngineClassID,
		NarcClassID,
		NarcWeaponClassID,
		Sensor__ExecutionStateEngineClassID,
		SensorClassID,
		ECMClassID,
		BeagleClassID,
		PathClassID,
		ObjectiveClassID,
		MWInternalDamageObjectClassID,
		Subsystem__ExecutionStateEngineClassID,
		VehicleInterface__ExecutionStateEngineClassID,
		Objective__ExecutionStateEngineClassID,
		StickyMoverClassID,
		FlareWeaponClassID,
		MWObjectClassID,
		CulturalClassID,
		AirplaneClassID,
		Airplane__ExecutionStateEngineClassID,
		PlaneAIClassID,
		AIClassID,
		AirplaneAnimationStateEngineClassID,
		BombWeaponSubsystemClassID,
		EffectGeneratorClassID,
		VOEntityClassID,
		CameraShip__ExecutionStateEngineClassID,
		CameraShipClassID,
		HeatManagerClassID,
		HeatSinkClassID,
		LongTomWeaponSubsystemClassID,
		AMSClassID,
		FlamerWeaponClassID,
		FlameMoverClassID,
		BridgeClassID,
		ArtilleryMarkClassID,
		ArtilleryWeaponClassID,
		BombastWeapon__ExecutionStateEngineClassID,
		BombastWeaponClassID,
		PlayerAIClassID,
		DeathEntityClassID,
		SearchLightClassID,
		LightEntityClassID,
		ExplosiveClassID,
		HighExplosiveWeaponClassID,
		MWMapClassID,
		Mech__ExecutionStateEngineClassID,
		NonComAIClassID,
		NonComClassID,
		ArmorClassID,
		EyePointManagerClassID,
		LancemateManagerClassID,
		ShooterAIClassID,
		MFB__ExecutionStateEngineClassID,
		MFBClassID,
		PlayerAI__ExecutionStateEngineClassID,
		SalvageManagerClassID,
		BoatClassID,
		LBXMoverClassID,
		WaterCulturalClassID,
		FlagClassID,
		ObservationVehicleClassID,
		MWCampaignClassID,
		LBXWeaponSubClassID,
		TeamClassID,
		HUDComponentClassID,
    Dropship__ExecutionStateEngineClassID,
		FieldBaseClassID,
		FieldBase__ExecutionStateEngineClassID,
		NavPointClassID,
// MSL 5.02 SubSystems
//		EnhancedOpticsClassID,
		IFF_JammerClassID,
		AdvancedGyroClassID,
// MSL 5.03 RTX
//		RTXWeaponSubClassID,
//		RTXWeaponSub__ExecutionStateEngineClassID,
//		ArrowWeaponSubsystemClassID,
		FirstFreeMW4ClassID, // KEEP ME LAST!!!!!
	};

	enum{
		TexturesResourceFileID=0,
		CoreResourceFileID,
		PropsResourceFileID,
		MapResourceFileID,
		MissionResourceFileID,
		GameResourceFileID,
		MechResourceFileID,
		OptionsResourceFileID,

		FirstNonCoreResourceFileID = MapResourceFileID
	};

// MSL Add Mech
// MechExecutionSlot+XX
	enum {
		LightExecutionSlot = Adept::ExecutionSlotCount,
		WeaponExecutionSlot,
		BuildingExecutionSlot,
		VehicleExecutionSlot,
		MechExecutionSlot,
		ExecutionSlotCount = MechExecutionSlot+16
	};
	
	enum {
		VehicleInterfaceGlobalPointerIndex = Adept::FirstFreeAdeptGlobalPointerIndex,
		SalvageManagerGlobalPointerIndex,
		MWGUIManagerGlobalPointerIndex,
		MWGameGlobalPointerIndex,
		FirstFreeMW4GlobalPointerIndex
	};


	const Stuff::Scalar ShallowWaterDepth = 0.25f;		// in meters	minimum depth for shallow water
	const Stuff::Scalar MidWaterDepth			= 4.0f;		// in meters	minimum depth for mid water
	const Stuff::Scalar DeepWaterDepth		= 10.0f;	// in meters  minimum depth for deep water

	void InitializeClasses(Stuff::NotationFile *startup_ini=NULL);
	void TerminateClasses(Stuff::NotationFile *startup_ini=NULL);

	enum HUDDEBUG_DATA_TYPE		// should match huddebug.hpp, I don't include huddebug.hpp so you don't get a full build as often
	{
		hud_int_type,
		hud_float_type,
		hud_double_type,
		hud_string_type
	};
	void AddDebugData (char *name,void *data,HUDDEBUG_DATA_TYPE datatype);		// see huddebug.hpp for data types
	void ClearAllDebugData (void);														// instantiated in huddebug.cpp
	void RemoveDebugData (void *data);

	extern HGOSHEAP Heap;
	extern HGOSHEAP g_LibraryHeap;

	extern Stuff::Scalar g_Gravity;



	int ENCRYPT	(int value);
	int DECRYPT (int value);
	Stuff::Scalar ENCRYPT (Stuff::Scalar value);
	Stuff::Scalar DECRYPT (Stuff::Scalar value);



}

#if 0
	extern bool g_AbzugFlag;				// true if abzug is running the game
	extern bool s_NoAbzug;
#endif

#define GROUP_MW4 "MW4::"



