#if !defined(__CONV_COND_H__)
#define __CONV_COND_H__
 
#include "..\AiBase\Specif\AiOption.h"
 
#ifdef CODEWARRIOR
#include"AI\AIGame\TypePtr.h"
#endif
 
/**************************************/
#if !defined(CPA_EXPORT)
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif /*CPA_WANTS_IMPORT || CPA_WANTS_EXPORT*/
#endif /*CPA_EXPORT*/
/**************************************/
#undef extern
#define EXTERN_AI_DLL extern
 
/************************************************************************************************************************/
 
/* Condition*/
/* for editor and/or debugger + readrule.c*/
#if defined(__DEBUG_AI__) || defined (U64_AIDEBUG)
	EXTERN_AI_DLL CPA_EXPORT char *szGetConditionTypeInParamFromId(enum tdeCondId_ eCondId);
#endif /* __DEBUG_AI__*/
 
#if defined(ACTIVE_EDITOR)
	EXTERN_AI_DLL CPA_EXPORT char *szGetConditionTypeOutParamFromId(enum tdeCondId_ eCondId);
	EXTERN_AI_DLL CPA_EXPORT enum tdeCondId_ fn_eFindConditionIdFromEditorName(char *szCondition);
	EXTERN_AI_DLL CPA_EXPORT char *szFindConditionEditorNameFromId(enum tdeCondId_ eCondId);
#endif /* ACTIVE_EDITOR*/
 
EXTERN_AI_DLL CPA_EXPORT char *szFindConditionScriptNameFromId(enum tdeCondId_ eCondId);
EXTERN_AI_DLL CPA_EXPORT enum tdeCondId_ fn_eFindConditionIdFromScriptName(char *szCondition);
EXTERN_AI_DLL CPA_EXPORT enum tdeCondId_ fn_eGetNbCond();
#define M_IsConditionIdValid(eCondId) ((eCondId)<fn_eGetNbCond())
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucGetConditionUltraOperator(enum tdeCondId_ eCondId);
 
#if defined(_AI_LIB_)
	tdp_fn_p_stConditionFunctionPtr fn_p_fn_pGetConditionFunctionPtr(enum tdeCondId_ eCondId);
#endif
 
#if !defined(OPTIMIZED_COMMAND)
	void fn_vSetConditionUltraOperator(enum tdeCondId_ eCondId,unsigned char bFlag);
 
	#if defined(ACTIVE_EDITOR)
		#define M_CONDITION_ENTRY(a,b,g,c,d,e) a,b,g,c,d,e
		void fn_vDefineConditionEntry(enum tdeCondId_ eCondId,char *szConditionEditorName,char *szConditionEditorName_En,char *szConditionScriptName,tdp_fn_p_stConditionFunctionPtr p_fn_p_stConditionFunction,char *szConditionTypeInParam);				
	#elif defined(_AI_LIB_)
		#define M_CONDITION_ENTRY(a,b,g,c,d,e) a,c,d,e
		void fn_vDefineConditionEntry(enum tdeCondId_ eCondId,char *szConditionScriptName,tdp_fn_p_stConditionFunctionPtr p_fn_p_stConditionFunction,char *szConditionTypeInParam);				
	#endif /* ACTIVE_EDITOR _AI_LIB_*/
 
	#if defined(__DEBUG_AI__)
		void fn_vInitConditionTable(tdp_fn_p_stConditionFunctionPtr p_fn_p_stDefaultConditionFunctionPointer);
		void fn_vCheckConditionTable(tdp_fn_p_stConditionFunctionPtr p_fn_p_stDefaultConditionFunctionPointer);
	#endif /* __DEBUG_AI__*/
#endif /* OPTIMIZED_COMMAND*/
 
/*******************************************************************************/
#undef EXTERN_AI_DLL
 
#endif /* __CONV_COND_H__*/
