159 lines
5.6 KiB
C
159 lines
5.6 KiB
C
/*---------------------------------------------------------------------------*/
|
|
/* AIProto.h : */
|
|
/* author : Olivier Didelot.*/
|
|
/* date : 24/01/1997*/
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/* in order to compile AI in C++ and link with GAM in C*/
|
|
#if defined(__cplusplus)
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#define _WP_D_DEFINE_WAYPOINTS_
|
|
#include "WP_Func.h"
|
|
#undef _WP_D_DEFINE_WAYPOINTS_
|
|
|
|
/* Oliv' - Portage v14 - Fed up with those warnings*/
|
|
#include "GAM\InitEnum.h"
|
|
/* EndOfOliv'*/
|
|
|
|
#if !defined(__AIPROTO_H__)
|
|
#define __AIPROTO_H__
|
|
|
|
#if defined(ACTIVE_EDITOR)
|
|
extern void fn_vForceEditor();
|
|
#endif
|
|
|
|
#if !defined(U64)
|
|
#include "PTC.h"
|
|
#endif
|
|
/****************************************************************************/
|
|
/* BASIC FUNCTIONS */
|
|
/****************************************************************************/
|
|
|
|
|
|
void fn_vTestUnusedComport();
|
|
|
|
void fn_vReinitComportMind(AI_tdxHandleToMind p_stMind);
|
|
unsigned long AI_ulSizeOfMind();
|
|
struct AI_tdstMind_ *fn_pstAllocMind(void);
|
|
void fn_vFirstInitAIMemory(void);
|
|
void fn_vInitAIFixMemory(unsigned long ulSize);
|
|
void fn_vInitAILevelMemory(unsigned long ulSize);
|
|
void fn_vFreeAIFixMemory(void);
|
|
void fn_vFreeAILevelMemory(void);
|
|
void fn_vDeleteAIFixMemory(void);
|
|
void fn_vDeleteAILevelMemory(void);
|
|
void fn_vInitAI(ACP_tdxBool);
|
|
void AI_fn_vAIUseFixMemory(void);
|
|
void AI_fn_vAIUseLevelMemory(void);
|
|
void *AI_fn_p_vTrueAlloc(unsigned long ulSize);
|
|
void *AI_fn_p_vTrueRealloc(void *p_vOldPointer,unsigned long ulSize);
|
|
void AI_fn_vTrueFree(void *p_vPointer);
|
|
|
|
void AI_fn_vMemoryLogFile(void *p_vPointer,unsigned char ucAction,char *szFile,unsigned long ulLine);
|
|
void fn_vReinitAI(AI_tdxHandleToMind p_stMind);
|
|
void fn_vReinitAIWithFlags(AI_tdxHandleToMind p_stMind,enum tdeObjectTreeInit_ eObjIniType);
|
|
void AI_PrintUsedStaticMemory(void);
|
|
ACP_tdxBool fn_bDoIntelligencePerso(HIE_tdxHandleToSuperObject p_SuperObjPerso);
|
|
ACP_tdxBool fn_bDoReflexPerso(HIE_tdxHandleToSuperObject p_SuperObjPerso);
|
|
/* ANNECY MT - 11/09/98 {*/
|
|
void fn_vSecondPassOfMindLoading(AI_tdxHandleToMind p_stMind,ACP_tdxBool _bPersoInFix,enum tdeObjectTreeInit_ _eObjectInit);
|
|
/* END ANNECY MT }*/
|
|
void fn_vReadAI(struct AI_tdstMind_ *p_stMind,char *szIntellFileName,struct tdstEngineObject_ *p_stEngineObject);
|
|
void fn_vRegisterAllRulesScriptSections(void);
|
|
void fn_vPrintAIDebug(char *text);
|
|
|
|
void WP_fnv_WayPoint_LinkTableSecondPass(void);
|
|
|
|
/* for AI binary*/
|
|
/*#include "AIBinary.h"*/
|
|
|
|
/* for IPT command interpreter*/
|
|
void fn_vDisplayDsgVar(struct tdstEngineObject_ *p_st_Object);
|
|
void fn_vDisplayComport(struct tdstEngineObject_ *p_st_Object);
|
|
|
|
/* Always*/
|
|
void fn_vSimulateMindAllocationFromAnotherMind(AI_tdxHandleToMind p_stMindSrc,AI_tdxHandleToMind p_stMindDst);
|
|
unsigned long fn_ulGetSizeOfMindWithoutAIModel(AI_tdxHandleToMind p_stMind);
|
|
unsigned long fn_ulGetSizeOfMindWithAIModel(AI_tdxHandleToMind p_stMind);
|
|
|
|
void AI_fn_vInsertDsgVarInSAI(AI_tdxHandleToMind p_stMind);
|
|
|
|
/* ANNECY OA - 04/08/99 { */
|
|
/* ANNECY MT - 30/03/99 { PC Protection code */
|
|
#if !defined(PRESS_DEMO)
|
|
#ifndef U64
|
|
void fn_vInitDesignerVariablesWithProtectKeyInModel(AI_tdxHandleToMind p_stMind);
|
|
void fn_vInitDesignerVariablesWithComputedDatas(AI_tdxHandleToMind p_stMind);
|
|
#ifdef PTC_SYSTEM_ACTIVED
|
|
void fn_vInitDesignerVariablesWithChecksumInModel(struct tdstEngineObject_ *p_stObject, AI_tdxHandleToMind p_stMind);
|
|
void fn_vInitDesignerVariablesWithCode(struct tdstEngineObject_ *p_stObject, AI_tdxHandleToMind p_stMind);
|
|
#endif
|
|
#endif
|
|
#endif /* PRESS_DEMO */
|
|
/* END ANNECY MT } */
|
|
/* END ANNECY OA } */
|
|
|
|
#if defined(ACTIVE_EDITOR)
|
|
/**************************************/
|
|
#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
|
|
/*******************************************************************************/
|
|
EXTERN_AI_DLL CPA_EXPORT void fn_vReinitAIComport(AI_tdxHandleToMind p_stMind);
|
|
|
|
/* ANNECY MT - 11/09/98 {*/
|
|
EXTERN_AI_DLL CPA_EXPORT void fn_vSecondPassOfDsgMem(AI_tdxHandleToMind p_stMind,ACP_tdxBool _bPersoInFix, enum tdeObjectTreeInit_ _eObjectInit);
|
|
/* END ANNECY MT }*/
|
|
|
|
EXTERN_AI_DLL CPA_EXPORT void fn_vRESET_STOP_AI_ENGINE_FLAG();
|
|
|
|
/*ANNECY CHRISTOPHE MODIFICATIONS CF XAVIER*/
|
|
EXTERN_AI_DLL CPA_EXPORT SCR_tdst_Link_Table *AI_fn_p_stGetDsgVarLinkTable(void);
|
|
/*ANNECY END CHRISTOPHE MODIFICATIONS CF XAVIER*/
|
|
|
|
typedef struct tdstTreeInterpret_ tdstTreeInterpret ;
|
|
typedef struct AI_tdstAIModel_ AI_tdstAIModel ;
|
|
|
|
EXTERN_AI_DLL CPA_EXPORT void fn_vLoadCRR(AI_tdxHandleToMind, char *) ;
|
|
EXTERN_AI_DLL CPA_EXPORT void fn_vSecondPassOfTree(AI_tdxHandleToMind p_stMind,tdstTreeInterpret *p_stTree) ;
|
|
EXTERN_AI_DLL CPA_EXPORT SCR_tdst_Link_Value * fn_vGetLinkTableForCRR ( AI_tdstAIModel *p_stAIModel ) ;
|
|
EXTERN_AI_DLL CPA_EXPORT void fn_vSetLinkTableForCRR ( SCR_tdst_Link_Value *p_stValue, unsigned long ulValue ) ;
|
|
|
|
/*******************************************************************************/
|
|
#undef EXTERN_AI_DLL
|
|
/*******************************************************************************/
|
|
#endif
|
|
|
|
#define AI_C_ActionMalloc 0
|
|
#define AI_C_ActionRealloc 1
|
|
#define AI_C_ActionFree 2
|
|
|
|
#undef EXTERN
|
|
#undef extern
|
|
#if !defined(__DeclareGlobalVariableAIProto_h__)
|
|
#define EXTERN extern
|
|
#else
|
|
#define EXTERN
|
|
#endif /*__DeclareGlobalVariableAIProto_h__*/
|
|
|
|
EXTERN unsigned char AI_g_ucMemoryBlockUsed;
|
|
|
|
#endif /* __AIPROTO_H__*/
|
|
|
|
/* in order to compile AI in C++ and link with GAM in C*/
|
|
#if defined(__cplusplus)
|
|
}
|
|
#endif
|