//===========================================================================//
// File:	NetSubystems.hpp											
//---------------------------------------------------------------------------//
//   Date    Who  Modification                                               //
// --------  ---  ---------------------------------------------------------- //
// 01/06/2000  JSE  Inital coding
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Microsoft Corp.										 //
// All Rights reserved worldwide                                             //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL               //
//===========================================================================//



#pragma once

#include "NetConstants.hpp"
#include "NetUpdateManager.hpp"


namespace MechWarrior4 
{


	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


	class MechInternalHeatUpdate
	{
	public:

		enum {
			HeatEntryID = 0,
			CoolantEntryID,
			UpdateEntryCount
		};

		enum {
			UpdateType = UpdateManager::MechInternalHeatUpdateID
		};


		static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
		static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
		static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
		static int SizeFunction(Entity *entity){return -1;};
		static int MaxSize(Entity *entity, int debug_level, int bandwidth);
		static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location){return true;};

		static int GetUpdateEntryCount(){return UpdateEntryCount;};
		static int GetUpdateEntryType(){return UpdateType;};

	};



	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


	class SubsystemUpdate
	{
	public:

		enum {
			UpdateEntryCount = 0
		};

		enum {
			UpdateType = UpdateManager::SubsystemUpdateID
		};


		static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
		static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
		static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
		static int SizeFunction(Entity *entity);
		static int MaxSize(Entity *entity, int debug_level, int bandwidth);
		static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location);

		static int GetUpdateEntryCount(){return UpdateEntryCount;};
		static int GetUpdateEntryType(){return UpdateType;};

	};

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


	class FlushUpdate
	{
	public:

		enum {
			UpdateEntryCount = 0
		};

		enum {
			UpdateType = UpdateManager::FlushUpdateID
		};


		static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
		static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
		static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
		static int SizeFunction(Entity *entity){return -1;};
		static int MaxSize(Entity *entity, int debug_level, int bandwidth);
		static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location);

		static int GetUpdateEntryCount(){return UpdateEntryCount;};
		static int GetUpdateEntryType(){return UpdateType;};

	};


	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


	class SearchLightUpdate
	{
	public:

		enum {
			UpdateEntryCount = 0
		};

		enum {
			UpdateType = UpdateManager::SearchLightUpdateID
		};


		static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
		static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
		static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
		static int SizeFunction(Entity *entity){return -1;};
		static int MaxSize(Entity *entity, int debug_level, int bandwidth);
		static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location);

		static int GetUpdateEntryCount(){return UpdateEntryCount;};
		static int GetUpdateEntryType(){return UpdateType;};

	};

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


	class InternalAMSAmmoUpdate
	{
	public:

		enum {
			AmmoEntryID = 0,
			UpdateEntryCount
		};

		enum {
			UpdateType = UpdateManager::InternalAMSAmmoUpdateID
		};


		static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
		static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
		static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
		static int SizeFunction(Entity *entity){return -1;};
		static int MaxSize(Entity *entity, int debug_level, int bandwidth);
		static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location){return true;};

		static int GetUpdateEntryCount(){return UpdateEntryCount;};
		static int GetUpdateEntryType(){return UpdateType;};

	};

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	class ExternalAMSAmmoUpdate
	{
	public:

		enum {
			UpdateEntryCount = 0
		};

		enum {
			UpdateType = UpdateManager::ExternalAMSAmmoUpdateID
		};


		static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
		static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
		static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
		static int SizeFunction(Entity *entity){return -1;};
		static int MaxSize(Entity *entity, int debug_level, int bandwidth);
		static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location);

		static int GetUpdateEntryCount(){return UpdateEntryCount;};
		static int GetUpdateEntryType(){return UpdateType;};

	};

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	class ExternalJumpJetUpdate
	{
	public:

		enum {
			UpdateEntryCount = 0
		};

		enum {
			UpdateType = UpdateManager::ExternalJumpJetUpdateID
		};


		static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
		static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
		static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
		static int SizeFunction(Entity *entity){return -1;};
		static int MaxSize(Entity *entity, int debug_level, int bandwidth);
		static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location);

		static int GetUpdateEntryCount(){return UpdateEntryCount;};
		static int GetUpdateEntryType(){return UpdateType;};

	};

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	class InternalJumpJetUpdate
	{
	public:

		enum {
			UpdateEntryCount = 0
		};

		enum {
			UpdateType = UpdateManager::InternalJumpJetUpdateID
		};


		static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
		static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
		static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
		static int SizeFunction(Entity *entity){return -1;};
		static int MaxSize(Entity *entity, int debug_level, int bandwidth);
		static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location){return true;};

		static int GetUpdateEntryCount(){return UpdateEntryCount;};
		static int GetUpdateEntryType(){return UpdateType;};

	};

};