// Link between trace element type and string to represent it in editor Tree
//
// YB
//
////////////////////////////////////////////////////////////////////////////////
#include "StdAfx.h"

#include "IADLnkMt.hpp"

#include "IADClBck.hpp"

// CG PB DEBUGGER 23/06/98 {
#ifdef ACTIVE_AIDEBUG
	//Global arrays
	td_p_fn_vComputeStringCallBack g_a_p_fnArrayOfGetTypeCallBacks[AIDebug_E_SecTyp_NbOfSectionType];
	td_p_fn_vComputeStringCallBack g_a_p_fnArrayOfGetNameCallBacks[AIDebug_E_SecTyp_NbOfSectionType];
	td_p_fn_vComputeStringCallBack g_a_p_fnArrayOfGetValueCallBacks[AIDebug_E_SecTyp_NbOfSectionType];
	td_p_fn_vComputeStringCallBack g_a_p_fnArrayOfGetReturnValueCallBacks[AIDebug_E_SecTyp_NbOfSectionType];
	COLORREF g_a_colrefTypeColor[AIDebug_E_SecTyp_NbOfSectionType];

#define TID_M_SetCallBackForEntryType(EntryName)	\
	g_a_p_fnArrayOfGetTypeCallBacks[AIDebug_E_SecTyp_##EntryName]	= IAD_fn_vGetTypeCallBack_##EntryName;			\
	g_a_p_fnArrayOfGetNameCallBacks[AIDebug_E_SecTyp_##EntryName]	= IAD_fn_vGetNameCallBack_##EntryName;			\
	g_a_p_fnArrayOfGetValueCallBacks[AIDebug_E_SecTyp_##EntryName]	= IAD_fn_vGetValueCallBack_##EntryName;		\
	g_a_p_fnArrayOfGetReturnValueCallBacks[AIDebug_E_SecTyp_##EntryName]	= IAD_fn_vGetReturnValueCallBack_##EntryName;
#endif // CG PB DEBUGGER }

//******************************************************************************
void IAD_g_fn_vInitGetStringCallBacks()
{
// CG PB DEBUGGER 23/06/98 {
#ifdef ACTIVE_AIDEBUG

	//First Init for Arrays
	for (long lI = 0; lI < AIDebug_E_SecTyp_NbOfSectionType; lI ++ )
	{
		g_a_p_fnArrayOfGetTypeCallBacks[lI] = NULL;
		g_a_p_fnArrayOfGetValueCallBacks[lI] = NULL;
		g_a_p_fnArrayOfGetReturnValueCallBacks[lI] = NULL;
	}

	//True inits
	TID_M_SetCallBackForEntryType(EngineLoop)
	TID_M_SetCallBackForEntryType(ReflexOrAI)
	TID_M_SetCallBackForEntryType(CurrentComport)
	TID_M_SetCallBackForEntryType(Field)
	TID_M_SetCallBackForEntryType(Constant)
	TID_M_SetCallBackForEntryType(DsgVarId)
	TID_M_SetCallBackForEntryType(DsgVar)
	TID_M_SetCallBackForEntryType(Button)
	TID_M_SetCallBackForEntryType(EnvRef)
	TID_M_SetCallBackForEntryType(SectorRef)
	TID_M_SetCallBackForEntryType(SurfaceRef)
	TID_M_SetCallBackForEntryType(PersoRef)
	TID_M_SetCallBackForEntryType(ActionRef)
	TID_M_SetCallBackForEntryType(Real)
	TID_M_SetCallBackForEntryType(Vector)
	TID_M_SetCallBackForEntryType(ConstantVector)
//	TID_M_SetCallBackForEntryType(Way)
	TID_M_SetCallBackForEntryType(WayPoint)
	TID_M_SetCallBackForEntryType(Module)
//	TID_M_SetCallBackForEntryType(ChannelNumber)
	TID_M_SetCallBackForEntryType(Mask)
	TID_M_SetCallBackForEntryType(String)
	TID_M_SetCallBackForEntryType(LipsSynchroRef)
	TID_M_SetCallBackForEntryType(SoundEventRef)
	TID_M_SetCallBackForEntryType(FamilyRef)
	TID_M_SetCallBackForEntryType(BeginMacro)
	TID_M_SetCallBackForEntryType(EndMacro)
	TID_M_SetCallBackForEntryType(Comport)
	TID_M_SetCallBackForEntryType(KeyWord)
	TID_M_SetCallBackForEntryType(Condition)
	TID_M_SetCallBackForEntryType(Function)
	TID_M_SetCallBackForEntryType(Operator)
	TID_M_SetCallBackForEntryType(Procedure)
	TID_M_SetCallBackForEntryType(MetaAction)
	TID_M_SetCallBackForEntryType(BeginMetaAction)
//	TID_M_SetCallBackForEntryType(TextRef)
//	TID_M_SetCallBackForEntryType(FontRef)
//	TID_M_SetCallBackForEntryType(ParticleGenerator)

	//Colors
	g_a_colrefTypeColor[AIDebug_E_SecTyp_EngineLoop]			= RGB(150,150,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_ReflexOrAI]			= RGB(175,150,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_CurrentComport]	= RGB(200,150,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Field]						= RGB(225,150,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Constant]				= RGB(250,150,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_DsgVarId]				= RGB(150,175,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_DsgVar]					= RGB(150,200,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Button]					= RGB(150,225,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_EnvRef]					= RGB(150,250,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_SectorRef]				= RGB(150,150,175);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_SurfaceRef]			= RGB(150,150,200);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_PersoRef]				= RGB(150,150,225);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_ActionRef]				= RGB(150,150,250);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Real]						= RGB(175,150,175);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Vector]					= RGB(175,150,200);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_ConstantVector]	= RGB(175,150,225);
//	g_a_colrefTypeColor[AIDebug_E_SecTyp_Way]							= RGB(175,150,225);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_WayPoint]				= RGB(175,175,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Module]					= RGB(175,200,150);
//	g_a_colrefTypeColor[AIDebug_E_SecTyp_ChannelNumber]		= RGB(175,225,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Mask]						= RGB(175,250,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_String]					= RGB(200,150,175);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_LipsSynchroRef]	= RGB(200,175,175);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_SoundEventRef]		= RGB(200,200,175);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_FamilyRef]				= RGB(200,225,175);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_BeginMacro]			= RGB(200,250,175);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_EndMacro]				= RGB(200,200,150);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Comport]					= RGB(200,200,175);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_KeyWord]					= RGB(200,200,200);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Condition]				= RGB(200,200,225);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Function]				= RGB(200,200,250);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Operator]				= RGB(150,200,200);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_Procedure]				= RGB(175,200,200);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_MetaAction]			= RGB(100,175,200);
	g_a_colrefTypeColor[AIDebug_E_SecTyp_BeginMetaAction]	= RGB(100,200,200);
//	g_a_colrefTypeColor[AIDebug_E_SecTyp_TextRef]					= RGB(100,150,150);
//	g_a_colrefTypeColor[AIDebug_E_SecTyp_FontRef]					= RGB(150,100,150);
//	g_a_colrefTypeColor[AIDebug_E_SecTyp_ParticleGenerator] = RGB(150,150,100);
//	g_a_colrefTypeColor[] = RGB();

#endif // CG PB DEBUGGER
}
