
///////////////////////////////////////////////////////////////////////////////
//
// File   : Asura_Handler_System_Callbacks_Independent.cpp
// Author : Andy Tate
// Date   : 30-Jan-2008
//
// Copyright (C) 2008 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

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

#include "Core/Asura.h"

#if defined(ASURA_USE_MULTIPLE_HANDLERS)

// This file's header...
#include "Core/Handlers/Asura_Handler_System_Callbacks_Independent.h"

// Asura independent header-files...
#if !defined(ASURA_DISABLE_AI_CODE)
#include "AI/Asura_AI_Navigation.h"
#endif	//!defined(ASURA_DISABLE_AI_CODE)
#include "Animation/Asura_Animation.h"
#include "Animation/Asura_TextureAnimation.h"
#if defined(ASURA_USE_ATTRACTORS)
#include "Attractors/Asura_Attractor_System.h"
#endif	//defined(ASURA_USE_ATTRACTORS)
#if defined(ASURA_USE_BOTANICALS)
#include "Botanicals/Asura_Botanicals_System.h"
#endif	//defined(ASURA_USE_BOTANICALS)
#include "Core/Asura_Core.h"
#include "Core/Asura_LocalisedText.h"
#include "Core/Asura_Material_System.h"
#include "Core/Asura_TextureManagement.h"
#include "Core/Asura_TiledTextureManagement.h"
#include "Core/Asura_Timers.h"
#include "Core/Handlers/Asura_Handler_System.h"
#include "Cutscene/Asura_Cutscene_System.h"
#if defined(ASURA_USE_DEBUG_TEXT)
#include "Debugging/Asura_DebugText.h"
#endif	//defined(ASURA_USE_DEBUG_TEXT)
#include "Entity/Asura_Entity.h"
#include "Entity/Asura_StaticMessage_System.h"
#include "Light/Asura_GI_Solution.h"
#include "Light/Asura_Light.h"
#include "Mesh/Asura_Env_System.h"
#if defined(ASURA_SUPPORT_NETMSG_SYSTEM)
#include "Network/Asura_NetMsg.h"
#endif	//defined(ASURA_SUPPORT_NETMSG_SYSTEM)
#include "Physics/Asura_Physics_Environment.h"
#include "Rendering/Asura_Module.h"
#include "Rendering/Asura_Render.h"
#include "Shapes/Asura_Shape_System.h"
#include "Sound/Asura_ModuleReverb_System.h"
#include "Sound/Asura_Sound.h"
#include "SpecialFX/Asura_Skybox.h"
#include "SpecialFX/Asura_SpecialFX.h"
#include "SpecialFX/Asura_StaticCorona_System.h"
#if defined(ASURA_USE_STREAMING)
#include "Streaming/Asura_Streaming_System.h"
#endif	//defined(ASURA_USE_STREAMING)


////////////////////////////////////////////////////////////////////////////////
// Constant declarations...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Static variable declarations...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Private functions...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Protected functions...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Public functions...
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Function     : Asura_Handler_System_Callbacks_Independent::CreateHandlerData
// Author       : Andy Tate
// Date         : 30-Jan-2008
////////////////////////////////////////////////////////////////////////////////

bool Asura_Handler_System_Callbacks_Independent::CreateHandlerData(u_int& uHandlerIndex,
																   const Asura_Hash_ID uHandlerHash,
																   const u_int uDataIndex,
																   const char* szName,
																   const Asura_Hash_ID uParentHandlerHash)
{
#if defined(ASURA_USE_STREAMING)
	const u_int	uResetGroup	= Asura_Streaming_System::GetResetGroupFromDataIndex(uDataIndex);
#else
	const u_int	uResetGroup	= uDataIndex;
#endif	//defined(ASURA_USE_STREAMING)
	const u_int	uIndex		= Asura_Handler_System::GetIndexWithGroup(uHandlerIndex);

	switch(uIndex)
	{
		case 0:
		{
			Asura_Animation_System::CreateAndSetHandler(uHandlerHash, uParentHandlerHash);
			uHandlerIndex++;
			return(true);
		}

		case 1:
		{
#if defined(ASURA_SUPPORT_BODYPART_SYSTEM)
			Asura_Hierarchy_BodyPart_System::Reset();
#endif	//defined(ASURA_SUPPORT_BODYPART_SYSTEM)
			uHandlerIndex++;
			return(true);
		}

		case 2:
		{
			Asura_TextureAnimation_System::CreateAndSetHandler(uHandlerHash, uParentHandlerHash);
			uHandlerIndex++;
			return(true);
		}

		case 3:
		{
			Asura_Texture_Management::SetTextureResetGroup(uResetGroup);
			uHandlerIndex++;
			return(true);
		}

		case 4:
		{
			Asura_Sound_System::CreateAndSetHandler(uHandlerHash, uParentHandlerHash);
			uHandlerIndex++;
			return(true);
		}

		case 5:
		{
			Asura_Shape_System::CreateAndSetHandler(uHandlerHash, uParentHandlerHash);
			uHandlerIndex++;
			return(true);
		}

		case 6:
		{
			// Was "Asura_ShapeSound_System" which has been retired...
			uHandlerIndex++;
			return(true);
		}

		case 7:
		{
#if defined(ASURA_USE_MULTIPLE_ZONE_HANDLERS)
			Asura_SpecialFX_System::CreateAndSetSubsystemHandlers(uHandlerHash);
#endif	//defined(ASURA_USE_MULTIPLE_ZONE_HANDLERS)
			uHandlerIndex++;
			return(true);
		}

		case 8:
		{
			Asura_Cutscene_System::CreateAndSetHandler(uHandlerHash, uParentHandlerHash);
			return(false);
		}

		default:
		{
			Asura_Assert(false, "Unexpected sub-system handler to be created.");
			return(false);
		}
	}		// End of switch.
}

/// End of function 'Asura_Handler_System_Callbacks_Independent::CreateHandlerData'. ///



////////////////////////////////////////////////////////////////////////////////
// Function     : Asura_Handler_System_Callbacks_Independent::DestroyHandlerData
// Author       : Andy Tate
// Date         : 30-Jan-2008
////////////////////////////////////////////////////////////////////////////////

bool Asura_Handler_System_Callbacks_Independent::DestroyHandlerData(u_int& uHandlerIndex,
																	const Asura_Hash_ID uHandlerHash, 
																	const u_int uDataIndex)
{
#if defined(ASURA_USE_STREAMING)
	const u_int	uResetGroup	= Asura_Streaming_System::GetResetGroupFromDataIndex(uDataIndex);
#else
	const u_int	uResetGroup	= uDataIndex;
#endif	//defined(ASURA_USE_STREAMING)
	const u_int	uIndex		= Asura_Handler_System::GetIndexWithGroup(uHandlerIndex);

	switch(uIndex)
	{
		case 0:
		{
			Asura_Animation_System::DestroyHandler(uHandlerHash);
			uHandlerIndex++;
			return(true);
		}

		case 1:
		{
#if defined(ASURA_SUPPORT_BODYPART_SYSTEM)
			Asura_Hierarchy_BodyPart_System::Reset();
#endif	//defined(ASURA_SUPPORT_BODYPART_SYSTEM)
			uHandlerIndex++;
			return(true);
		}

		case 2:
		{
			Asura_TextureAnimation_System::DestroyHandler(uHandlerHash);
			uHandlerIndex++;
			return(true);
		}

		case 3:
		{
			Asura_Texture_Management::Reset(uResetGroup);
			Asura_TiledTextureManagement::Reset(uResetGroup);
			uHandlerIndex++;
			return(true);
		}

		case 4:
		{
			Asura_Material_System::Reset(uResetGroup);
			uHandlerIndex++;
			return(true);
		}

		case 5:
		{
#if defined(ASURA_USE_MULTIPLE_ZONE_HANDLERS)
			Asura_SpecialFX_System::DestroySubsystemHandlers(uHandlerHash);
#endif	//defined(ASURA_USE_MULTIPLE_ZONE_HANDLERS)
			uHandlerIndex++;
			return(true);
		}

		case 6:
		{
			Asura_Sound_System::DestroyHandler(uHandlerHash);
			uHandlerIndex++;
			return(true);
		}

		case 7:
		{
			Asura_Shape_System::DestroyHandler(uHandlerHash);
			uHandlerIndex++;
			return(true);
		}

		case 8:
		{
			// Was "Asura_ShapeSound_System" which has been retired...
			uHandlerIndex++;
			return(true);
		}

		case 9:
		{
			Asura_Cutscene_System::DestroyHandler(uHandlerHash);
			return(false);
		}

		default:
		{
			Asura_Assert(false, "Unexpected sub-system handler to be destroyed.");
			return(false);
		}
	}		// End of switch.
}

/// End of function 'Asura_Handler_System_Callbacks_Independent::DestroyHandlerData'. ///



////////////////////////////////////////////////////////////////////////////////
// Function     : Asura_Handler_System_Callbacks_Independent::ReparentAllHandlerData
// Author       : Andy Tate
// Date         : 30-Jan-2008
////////////////////////////////////////////////////////////////////////////////

void Asura_Handler_System_Callbacks_Independent::ReparentAllHandlerData(const Asura_Hash_ID uHandlerHash,
																		const Asura_Hash_ID uParentHandlerHash)
{
	Asura_Animation_System::ReparentHandler(uHandlerHash, uParentHandlerHash);
	Asura_TextureAnimation_System::ReparentHandler(uHandlerHash, uParentHandlerHash);

	Asura_Sound_System::ReparentHandler(uHandlerHash, uParentHandlerHash);
	Asura_Shape_System::ReparentHandler(uHandlerHash, uParentHandlerHash);

	Asura_Cutscene_System::ReparentHandler(uHandlerHash, uParentHandlerHash);
}

/// End of function 'Asura_Handler_System_Callbacks_Independent::ReparentAllHandlerData'. ///



////////////////////////////////////////////////////////////////////////////////
// Function     : Asura_Handler_System_Callbacks_Independent::SetAllHandlerData
// Author       : Andy Tate
// Date         : 30-Jan-2008
////////////////////////////////////////////////////////////////////////////////

void Asura_Handler_System_Callbacks_Independent::SetAllHandlerData(const Asura_Hash_ID uHandlerHash,
																   const u_int uDataIndex)
{
#if defined(ASURA_USE_STREAMING)
	const u_int	uResetGroup	= Asura_Streaming_System::GetResetGroupFromDataIndex(uDataIndex);
#else
	const u_int	uResetGroup	= uDataIndex;
#endif	//defined(ASURA_USE_STREAMING)

	Asura_Animation_System::SetCurrentHandler(uHandlerHash);

#if defined(ASURA_SUPPORT_BODYPART_SYSTEM)
	//	Asura_Hierarchy_BodyPart_System::Reset();
#endif	//defined(ASURA_SUPPORT_BODYPART_SYSTEM)

	Asura_TextureAnimation_System::SetCurrentHandler(uHandlerHash);
	Asura_Texture_Management::SetTextureResetGroup(uResetGroup);
	//	Asura_Material_System:Reset(uResetGroup);

#if defined(ASURA_USE_MULTIPLE_ZONE_HANDLERS)
	Asura_SpecialFX_System::SetCurrentSubsystemHandlers(uHandlerHash);
#endif	//defined(ASURA_USE_MULTIPLE_ZONE_HANDLERS)

	/// Kevin Lea - 15/08/2002 16:09:38 - lights and sounds want to be
	/// shutdown after special fx etc. so there are no ordering problems
	/// with deallocations
	Asura_Sound_System::SetCurrentHandler(uHandlerHash);
	Asura_Shape_System::SetCurrentHandler(uHandlerHash);

	// NRM 17-12-02 - Don't really want to flush all the text between levels do we?
	// Asura_HashedLocalisedText::Reset();

	//RAR 02/04/03 - Cutscenes need to be reset before animations/hierarchies so that there aren't
	//any problems with releasing tween handles.
	Asura_Cutscene_System::SetCurrentHandler(uHandlerHash);
}

/// End of function 'Asura_Handler_System_Callbacks_Independent::SetAllHandlerData'. ///



////////////////////////////////////////////////////////////////////////////////
// Function     : Asura_Handler_System_Callbacks_Independent::CreateZoneData
// Author       : Andy Tate
// Date         : 30-Jan-2008
////////////////////////////////////////////////////////////////////////////////

bool Asura_Handler_System_Callbacks_Independent::CreateZoneData(u_int& uHandlerIndex,
																const Asura_Hash_ID uHandlerHash,
																const u_int uDataIndex,
																const char* szName,
																const Asura_Hash_ID uParentHandlerHash,
																const Asura_Hash_ID uZoneHash,
																const bool bAllowEnvironment)
{
	const u_int	uIndex	= Asura_Handler_System::GetIndexWithGroup(uHandlerIndex);

	switch(uIndex)
	{
		case 0:
		{
#if !defined(ASURA_DISABLE_AI_CODE) && defined(ASURA_USE_STREAMING)
			Asura_AI_Navigation_System::CreateAndSetHandler(uHandlerHash);
#endif	//!defined(ASURA_DISABLE_AI_CODE) && defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 1:
		{
			uHandlerIndex++;
			return(true);
		}

		case 2:
		{
#if defined(ASURA_USE_STREAMING)
			Asura_StaticMessage_System::CreateAndSetHandler(uHandlerHash);
#endif	//defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 3:
		{
			if(bAllowEnvironment)
			{
#if defined(ASURA_USE_STREAMING)
				Asura_Environment_System::CreateAndSetEnvironment(szName);
				Asura_Module_System::CreateAndSetHandler(uHandlerHash, uZoneHash);
#endif	//defined(ASURA_USE_STREAMING)
			}
			uHandlerIndex++;
			return(true);
		}

		case 4:
		{
			if(bAllowEnvironment)
			{
#if !defined(ASURA_TOOLS) && defined(ASURA_USE_STREAMING)
				//set support. RAR 01/06/2006
				Asura_GI_Solution::CreateAndSetHandler(uHandlerHash);
#endif	//!defined(ASURA_TOOLS) && defined(ASURA_USE_STREAMING)
			}
			uHandlerIndex++;
			return(true);
		}

		case 5:
		{
#if defined(ASURA_USE_STREAMING)
			Asura_StaticCorona_System::CreateAndSetHandler(uHandlerHash);
#endif	//defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 6:
		{
			uHandlerIndex++;
			return(true);
		}

		case 7:
		{
#if defined(ASURA_USE_BILLBOARD_PLANTS)
			Asura_BillboardPlant_TemplateStore::Reset();
#endif	//defined(ASURA_USE_BILLBOARD_PLANTS)
			uHandlerIndex++;
			return(true);
		}

		case 8:
		{
#if defined(ASURA_USE_BILLBOARD_PLANTS)
			Asura_BillboardPlant_System::Reset();
#endif	//defined(ASURA_USE_BILLBOARD_PLANTS)
			uHandlerIndex++;
			return(true);
		}

		case 9:
		{
#if defined(ASURA_USE_BOTANICALS)
			Asura_Botanicals_System::Reset();	
#endif	//defined(ASURA_USE_BOTANICALS)
			uHandlerIndex++;
			return(true);
		}

		case 10:
		{
#if defined(ASURA_USE_STREAMING)
			Asura_ModuleReverb_System::CreateAndSetHandler(uHandlerHash);
#endif	//defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 11:
		{
#if defined(ASURA_USE_STREAMING)
			Asura_Physics_Environment::CreateAndSetZone(uHandlerHash);
#endif	//defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 12:
		{
#if defined(ASURA_USE_VISIBILITY_SYSTEM)
			Asura_Visibility_System::Reset();
#endif	//defined(ASURA_USE_VISIBILITY_SYSTEM)
			uHandlerIndex++;
			return(true);
		}

		case 13:
		{
#if defined(ASURA_USE_ATTRACTORS) && defined(ASURA_USE_STREAMING)
			Asura_Attractor_System::GetInstance()->CreateAndSetHandler(uHandlerHash);
#endif	//defined(ASURA_USE_ATTRACTORS) && defined(ASURA_USE_STREAMING)
			return(false);
		}

		default:
		{
			Asura_Assert(false, "Unexpected sub-system handler to be created.");
			return(false);
		}
	}		// End of switch.
}

/// End of function 'Asura_Handler_System_Callbacks_Independent::CreateZoneData'. ///



////////////////////////////////////////////////////////////////////////////////
// Function     : Asura_Handler_System_Callbacks_Independent::DestroyZoneData
// Author       : Andy Tate
// Date         : 30-Jan-2008
////////////////////////////////////////////////////////////////////////////////

bool Asura_Handler_System_Callbacks_Independent::DestroyZoneData(u_int& uHandlerIndex,
																 const Asura_Hash_ID uHandlerHash,
																 const u_int uDataIndex,
																 const bool bAllowEnvironment)
{
	const u_int	uIndex	= Asura_Handler_System::GetIndexWithGroup(uHandlerIndex);

	switch(uIndex)
	{
		case 0:
		{
#if !defined(ASURA_USE_STREAMING)
			Asura_Entity_System::Reset();
#endif	//!defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 1:
		{
#if defined(ASURA_USE_VISIBILITY_SYSTEM)
			Asura_Visibility_System::Reset();
#endif	//defined(ASURA_USE_VISIBILITY_SYSTEM)
			uHandlerIndex++;
			return(true);
		}

		case 2:
		{
#if defined(ASURA_USE_STREAMING)
			Asura_Physics_Environment::DestroyZone(uHandlerHash);
#else
			Asura_Physics_Environment::Reset();
#endif	//defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 3:
		{
#if defined(ASURA_USE_STREAMING)
			Asura_ModuleReverb_System::DestroyHandler(uHandlerHash);
#else
			Asura_ModuleReverb_System::Reset();
#endif	//defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 4:
		{
#if defined(ASURA_USE_BOTANICALS)
			Asura_Botanicals_System::Reset();
#endif	//defined(ASURA_USE_BOTANICALS)
			uHandlerIndex++;
			return(true);
		}

		case 5:
		{
#if defined(ASURA_USE_BILLBOARD_PLANTS)
			Asura_BillboardPlant_TemplateStore::Reset();
#endif	//defined(ASURA_USE_BILLBOARD_PLANTS)
			uHandlerIndex++;
			return(true);
		}

		case 6:
		{
#if defined(ASURA_USE_BILLBOARD_PLANTS)
			Asura_BillboardPlant_System::Reset();
#endif	//defined(ASURA_USE_BILLBOARD_PLANTS)
			uHandlerIndex++;
			return(true);
		}

		case 7:
		{
#if defined(ASURA_USE_STREAMING)
			Asura_StaticCorona_System::DestroyHandler(uHandlerHash);
#else
			Asura_StaticCorona_System::Reset();
#endif	//defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 8:
		{
			if(bAllowEnvironment)
			{
#if defined(ASURA_USE_STREAMING)
				Asura_Environment_System::DestroyEnvironment(uHandlerHash);
				Asura_Module_System::DestroyHandler(uHandlerHash);
#else
				Asura_Environment_System::Reset();
				Asura_Module_System::Reset();
#endif	//defined(ASURA_USE_STREAMING)
			}
			uHandlerIndex++;
			return(true);
		}

		case 9:
		{
			if(bAllowEnvironment)
			{
#if !defined(ASURA_TOOLS)
#if defined(ASURA_USE_STREAMING)
				//In tools the GI solution handlers are dealt with separately , since they are used for the multiple light
				//set support. RAR 01/06/2006
				Asura_GI_Solution::DestroyHandler(uHandlerHash);
#else
				Asura_GI_Solution::Reset();
#endif
#endif	//!defined(ASURA_TOOLS) && defined(ASURA_USE_STREAMING)
			}
			uHandlerIndex++;
			return(true);
		}

		case 10:
		{
#if defined(ASURA_USE_STREAMING)
			Asura_StaticMessage_System::DestroyHandler(uHandlerHash);
#else
			Asura_StaticMessage_System::Reset();
#endif	//defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 11:
		{
			uHandlerIndex++;
			return(true);
		}

		case 12:
		{
#if defined(ASURA_USE_ATTRACTORS)
#if defined(ASURA_USE_STREAMING)
			Asura_Attractor_System::GetInstance()->DestroyHandler(uHandlerHash);
#else
			Asura_Attractor_System::Reset();
#endif
#endif	//defined(ASURA_USE_ATTRACTORS) && defined(ASURA_USE_STREAMING)
			uHandlerIndex++;
			return(true);
		}

		case 13:
		{
#if !defined(ASURA_DISABLE_AI_CODE)
#if defined(ASURA_USE_STREAMING)
			Asura_AI_Navigation_System::DestroyHandler(uHandlerHash);
#else
			Asura_AI_Navigation_System::Reset();
#endif
#endif	//!defined(ASURA_DISABLE_AI_CODE) && defined(ASURA_USE_STREAMING)
			return(false);
		}

		default:
		{
			Asura_Assert(false, "Unexpected sub-system handler to be destroyed.");
			return(false);
		}
	}		// End of switch.
}

/// End of function 'Asura_Handler_System_Callbacks_Independent::DestroyZoneData'. ///


////////////////////////////////////////////////////////////////////////////////
// Function     : Asura_Handler_System_Callbacks_Independent::ReparentAllZoneData
// Author       : Andy Tate
// Date         : 30-Jan-2008
////////////////////////////////////////////////////////////////////////////////

void Asura_Handler_System_Callbacks_Independent::ReparentAllZoneData(const Asura_Hash_ID uHandlerHash,
																	 const Asura_Hash_ID uParentHandlerHash)
{
}

/// End of function 'Asura_Handler_System_Callbacks_Independent::ReparentAllZoneData'. ///



////////////////////////////////////////////////////////////////////////////////
// Function     : Asura_Handler_System_Callbacks_Independent::SetAllZoneData
// Author       : Andy Tate
// Date         : 30-Jan-2008
////////////////////////////////////////////////////////////////////////////////

void Asura_Handler_System_Callbacks_Independent::SetAllZoneData(const Asura_Hash_ID uHandlerHash,
																const u_int uDataIndex,
																const bool bAllowEnvironment)
{
#if defined(ASURA_USE_STREAMING)

#if !defined(ASURA_DISABLE_AI_CODE)
	Asura_AI_Navigation_System::SetCurrentHandler(uHandlerHash);
#endif	//!defined(ASURA_DISABLE_AI_CODE)

	Asura_StaticMessage_System::SetCurrentHandler(uHandlerHash);

	if(bAllowEnvironment)
	{
		Asura_Environment_System::SetCurrentEnvironment(uHandlerHash);
		Asura_Module_System::SetCurrentHandler(uHandlerHash);

#if !defined(ASURA_TOOLS)
		//In tools the GI solution handlers are dealt with separately , since they are used for the multiple light
		//set support. RAR 01/06/2006
		Asura_GI_Solution::SetCurrentHandler(uHandlerHash);
#endif	//!defined(ASURA_TOOLS)
	}

	Asura_StaticCorona_System::SetCurrentHandler(uHandlerHash);
	Asura_ModuleReverb_System::SetCurrentHandler(uHandlerHash);
	Asura_Physics_Environment::SetCurrentZone(uHandlerHash);

#if defined(ASURA_USE_ATTRACTORS)
	Asura_Attractor_System::GetInstance()->SetCurrentHandler(uHandlerHash);
#endif	//defined(ASURA_USE_ATTRACTORS)

#if defined(ASURA_USE_VISIBILITY_SYSTEM)
	//Asura_Visibility_System::Reset();
#endif	//defined(ASURA_USE_VISIBILITY_SYSTEM)

#endif	//defined(ASURA_USE_STREAMING)
}

/// End of function 'Asura_Handler_System_Callbacks_Independent::SetAllZoneData'. ///


#if defined(ASURA_LOGFILES_ENABLED)

////////////////////////////////////////////////////////////////////////////////
// Function     : Asura_Handler_System_Callbacks_Independent::CreateReport
// Author       : Andy Tate
// Date         : 30-Jan-2008
////////////////////////////////////////////////////////////////////////////////

void Asura_Handler_System_Callbacks_Independent::CreateReport(const Asura_Hash_ID uHandlerHash,
															  Asura_Stream& xOutputStream)
{
#if !defined(ASURA_USE_STREAMING)
	u_int	uResetGroup	= 0;

	if(Asura_Handler_System::GetResetGroup(uHandlerHash, uResetGroup))
	{
		Asura_Texture_Management::WriteResetGroupReport(uResetGroup, xOutputStream);
		Asura_Material_System::WriteResetGroupReport(uResetGroup, xOutputStream); 
		Asura_TiledTextureManagement::WriteResetGroupReport(uResetGroup, xOutputStream);
	}
#endif	//!defined(ASURA_USE_STREAMING)

	Asura_Cutscene_System::WriteHandlerReport(uHandlerHash, xOutputStream);
	Asura_Animation_System::WriteHandlerReport(uHandlerHash, xOutputStream);
	Asura_TextureAnimation_System::WriteHandlerReport(uHandlerHash, xOutputStream);
	//Asura_SpecialFX_System::WriteHandlerReport(uHandlerHash,xOutputStream);
	Asura_Shape_System::WriteHandlerReport(uHandlerHash, xOutputStream);
	Asura_Sound_System::WriteHandlerReport(uHandlerHash, xOutputStream);
}

/// End of function 'Asura_Handler_System_Callbacks_Independent::CreateReport'. ///

#endif	//defined(ASURA_LOGFILES_ENABLED)

#endif	//defined(ASURA_USE_MULTIPLE_HANDLERS)


/// End of file. ///
