Add rayman2 source files
This commit is contained in:
28
Rayman_X/cpa/public/AI/AIBase/AI_Funct.h
Normal file
28
Rayman_X/cpa/public/AI/AIBase/AI_Funct.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* AIFunct.h : */
|
||||
/* author : Olivier Didelot.*/
|
||||
/* date : 24/01/1997*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __AIFUNCT_H__
|
||||
#define __AIFUNCT_H__
|
||||
|
||||
/****************************************************************************/
|
||||
/* ACCESSORS */
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
CPA_EXPORT char* AI_fn_pszGetActorName (HIE_tdxHandleToSuperObject hSupObj);
|
||||
CPA_EXPORT char* AI_fn_pszGetFamilyName (HIE_tdxHandleToSuperObject hSupObj, char* szBuffer);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __AIFUNCT_H__*/
|
16
Rayman_X/cpa/public/AI/AIBase/AI_Handl.h
Normal file
16
Rayman_X/cpa/public/AI/AIBase/AI_Handl.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* AIHandl.h : */
|
||||
/* author : Olivier Didelot.*/
|
||||
/* date : 24/01/1997*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define _WP_D_DEFINE_WAYPOINTS_
|
||||
#include "WP_Handl.h"
|
||||
#undef _WP_D_DEFINE_WAYPOINTS_
|
||||
|
||||
#if !defined(__AIHANDL_H__)
|
||||
#define __AIHANDL_H__
|
||||
|
||||
/* Use this handle*/
|
||||
typedef struct AI_tdstMind_ * AI_tdxHandleToMind;
|
||||
|
||||
#endif /* __AIHANDL_H__*/
|
12
Rayman_X/cpa/public/AI/AIBase/AI_Macro.h
Normal file
12
Rayman_X/cpa/public/AI/AIBase/AI_Macro.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* AIHandl.h : */
|
||||
/* author : Olivier Didelot.*/
|
||||
/* date : 24/01/1997*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __AIMACRO_H__
|
||||
#define __AIMACRO_H__
|
||||
|
||||
/* For the friend modules only : change functions into macros*/
|
||||
|
||||
#endif /* __AIMACRO_H__*/
|
158
Rayman_X/cpa/public/AI/AIBase/AI_Proto.h
Normal file
158
Rayman_X/cpa/public/AI/AIBase/AI_Proto.h
Normal file
@@ -0,0 +1,158 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* 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
|
186
Rayman_X/cpa/public/AI/AIBase/AI_Struc.h
Normal file
186
Rayman_X/cpa/public/AI/AIBase/AI_Struc.h
Normal file
@@ -0,0 +1,186 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* AIStruc.h : */
|
||||
/* author : 24/01/97 (Olivier Didelot) . */
|
||||
/* modify : 05/03/97 (Olivier Couvreur) Model can be gathered between several persos.*/
|
||||
/* modify : 11/03/97 (Olivier Couvreur) .dec can be gathered between several persos.*/
|
||||
/* modify : 15/05/97 (Olivier Couvreur) Safe second pass for DsgVar + ReinitAI*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(__AISTRUCT_H__)
|
||||
#define __AISTRUCT_H__
|
||||
|
||||
#include "specif/AIOption.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* AI_tstAIModel Structure
|
||||
*****************************************************************************/
|
||||
typedef struct AI_tdstAIModel_
|
||||
{
|
||||
struct tdstScriptAI_ *p_stScriptAIIntell;
|
||||
struct tdstScriptAI_ *p_stScriptAIReflex;
|
||||
struct tdstDsgVar_ *p_stDsgVar;
|
||||
#ifndef U64
|
||||
struct tdstListOfMacro_ *p_stListOfMacro;
|
||||
#endif /* U64 */
|
||||
unsigned char ucSecondPassDone;
|
||||
|
||||
//XB 05/08/99
|
||||
#ifndef D_THROW_CFAST_AI
|
||||
//End XB
|
||||
/* AI Convert To C*/
|
||||
struct tdstNodeInterpret_ *CFast_dst_RefTreeArray; /* Array of all references */
|
||||
unsigned short uwNbNode; /* Number of nodes in that array */
|
||||
struct tdstNodeInterpret_ *CFast_dst_ParamArray; /* Array of AI functions params */
|
||||
unsigned short uwNbParamNode ; /* Number of nodes in the param array */
|
||||
int CFast_lFunction; /* Index of function when C run is true */
|
||||
ACP_tdxBool CFast_bIsC; /* C run instead of IA interpret */
|
||||
//XB 05/08/99
|
||||
#endif /* D_THROW_CFAST_AI */
|
||||
//End XB
|
||||
} AI_tdstAIModel;
|
||||
|
||||
/* p_stScriptAIIntell field.*/
|
||||
#define AI_M_p_stGetIntelligenceScriptAIModel(p_stModel) ((p_stModel)->p_stScriptAIIntell)
|
||||
#define AI_M_SetIntelligenceScriptAIModel(p_stModel, p_stScriptAI) (AI_M_p_stGetIntelligenceScriptAIModel(p_stModel) = p_stScriptAI)
|
||||
|
||||
/* p_stScriptAIReflex field.*/
|
||||
#define AI_M_p_stGetReflexScriptAIModel(p_stModel) ((p_stModel)->p_stScriptAIReflex)
|
||||
#define AI_M_SetReflexScriptAIModel(p_stModel, p_stScriptAI) (AI_M_p_stGetReflexScriptAIModel(p_stModel) = p_stScriptAI)
|
||||
|
||||
/* p_stDsgVar Done field. */
|
||||
#define AI_M_p_stGetDsgVarAIModel(p_stModel) ((p_stModel)->p_stDsgVar)
|
||||
#define AI_M_SetDsgVarAIModel(p_stModel,p_stDsgVar) (AI_M_p_stGetDsgVarAIModel(p_stModel) = p_stDsgVar)
|
||||
|
||||
#ifndef U64
|
||||
/* p_stListOfMacro field. */
|
||||
#define AI_M_p_stGetListOfMacroAIModel(p_stModel) ((p_stModel)->p_stListOfMacro)
|
||||
#define AI_M_SetListOfMacroAIModel(p_stModel, p_ListOfMacro) (AI_M_p_stGetListOfMacroAIModel(p_stModel) = p_ListOfMacro)
|
||||
#endif /* U64 */
|
||||
|
||||
/* ucSecondPass Done field.*/
|
||||
#define AI_M_ucGetSecondPassDone(p_stModel) ((p_stModel)->ucSecondPassDone)
|
||||
#define AI_M_SetSecondPassDone(p_stModel, ucDone) (AI_M_ucGetSecondPassDone(p_stModel) = ucDone)
|
||||
|
||||
/*jawaka*/
|
||||
#define M_CFast_GetReferenceNodeN(hSuperObjectPerso, indice) ((AI_M_p_stGetAIModel(AI_M_stGetMindOfSuperObj(hSuperObjectPerso)))->CFast_dst_RefTreeArray[indice])
|
||||
|
||||
/*****************************************************************************
|
||||
* AI_tdstMind Structure
|
||||
*****************************************************************************/
|
||||
typedef struct AI_tdstMind_
|
||||
{
|
||||
struct AI_tdstAIModel_ *p_stAIModel;
|
||||
struct tdstIntelligence_ *p_stIntelligence;
|
||||
|
||||
#if !defined(PRESS_DEMO) /* swap members to make the engine unusable with the binarized data of another engine */
|
||||
struct tdstIntelligence_ *p_stReflex;
|
||||
struct tdstDsgMem_ *p_stDsgMem;
|
||||
#else
|
||||
struct tdstDsgMem_ *p_stDsgMem;
|
||||
struct tdstIntelligence_ *p_stReflex;
|
||||
#endif /* PRESS_DEMO */
|
||||
|
||||
#if defined(__DEBUG_AI__)
|
||||
char *szPersoName;
|
||||
#endif
|
||||
ACP_tdxBool bDoingIntel; /* 1 intelligence 0 reflex*/
|
||||
|
||||
|
||||
#if defined(ACTIVE_AIDEBUG) /* ai debuger*/
|
||||
struct AIDebug_tdstTrace_ *p_stTrace;
|
||||
unsigned char ucErrorFlag;
|
||||
#endif
|
||||
|
||||
//XB 05/08/99
|
||||
#ifndef D_THROW_CFAST_AI
|
||||
//End XB
|
||||
/* AI Convert To C*/
|
||||
long CFast_lCmpMetaAction ;
|
||||
long CFast_lRfxMetaAction ;
|
||||
long CFast_lCmpMetaActionForMacro ;
|
||||
long CFast_lRfxMetaActionForMacro ;
|
||||
//XB 05/08/99
|
||||
#endif /* D_THROW_CFAST_AI */
|
||||
//End XB
|
||||
} AI_tdstMind;
|
||||
|
||||
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
#define AI_M_ucErrorFlag(p_stMind) ((p_stMind)->ucErrorFlag)
|
||||
#endif
|
||||
|
||||
/* szModelName field.*/
|
||||
#if defined(__DEBUG_AI__)
|
||||
#define AI_M_szGetPersoName(p_stMind) ((p_stMind)->szPersoName)
|
||||
#define AI_M_SetPersoName(p_stMind, szName) ( AI_M_szGetPersoName(p_stMind) =(szName))
|
||||
#else
|
||||
#define AI_M_szGetPersoName(p_stMind) ""
|
||||
#define AI_M_SetPersoName(p_stMind, szName)
|
||||
#endif
|
||||
|
||||
#define AI_M_szGetSuperObjectName(p_stSupObj) (fn_szFindPersonalTypeNameOfPersonalType(M_ObjectGetPersonalType(M_GetEngineObject(p_stSupObj))))
|
||||
|
||||
/* bDoingIntel field.*/
|
||||
#define AI_M_bGetDoingIntel(p_stMind) ((p_stMind)->bDoingIntel)
|
||||
#define AI_M_SetDoingIntel(p_stMind, DoingIntel) ((p_stMind)->bDoingIntel = (DoingIntel))
|
||||
|
||||
/* p_stAIModel field.*/
|
||||
#define AI_M_p_stGetAIModel(p_stMind) ((p_stMind)->p_stAIModel)
|
||||
#define AI_M_SetAIModel(p_stMind, p_stModel) ((p_stMind)->p_stAIModel = (p_stModel))
|
||||
|
||||
/* p_stIntelligence.*/
|
||||
#define AI_M_p_stGetIntelligence(p_stMind) ((p_stMind)->p_stIntelligence)
|
||||
#define AI_M_SetIntelligence(p_stMind, p_stInt) (AI_M_p_stGetIntelligence(p_stMind) = (p_stInt))
|
||||
|
||||
/* p_stReflex.*/
|
||||
#define AI_M_p_stGetReflex(p_stMind) ((p_stMind)->p_stReflex)
|
||||
#define AI_M_SetReflex(p_stMind, p_stRefl) (AI_M_p_stGetReflex(p_stMind) = (p_stRefl))
|
||||
|
||||
/* p_stDsgMem field.*/
|
||||
#define AI_M_p_stGetDsgMem(p_stMind) ((p_stMind)->p_stDsgMem)
|
||||
#define AI_M_SetDsgMem(p_stMind, p_cDsgMem) (AI_M_p_stGetDsgMem(p_stMind) = (p_cDsgMem))
|
||||
|
||||
/* d_stTabDsgVar field.*/
|
||||
#define AI_M_p_stGetDsgVar(p_stMind) (AI_M_p_stGetAIModel(p_stMind)->p_stDsgVar)
|
||||
#define AI_M_SetDsgVar(p_stMind, p_stDsgVar) (AI_M_p_stGetDsgVar(p_stMind) = (p_stDsgVar))
|
||||
|
||||
/* p_stTrace.*/
|
||||
#ifdef ACTIVE_AIDEBUG /* For AI debugger*/
|
||||
#define AI_M_p_stGetTrace(p_stMind) ((p_stMind)->p_stTrace)
|
||||
#define AI_M_SetTrace(p_stMind, p_stTr) (AI_M_p_stGetTrace(p_stMind) = p_stTr)
|
||||
#endif /* ACTIVE_AIDEBUG For AI debugger*/
|
||||
|
||||
#define M_GetIntellOrReflex(p_stMind) (AI_M_bGetDoingIntel(p_stMind) ? AI_M_p_stGetIntelligence(p_stMind) : AI_M_p_stGetReflex(p_stMind))
|
||||
|
||||
#define M_GetOnlyIntelligencePointer(hSuperObjPerso) \
|
||||
(AI_M_p_stGetIntelligence(AI_M_stGetMindOfSuperObj(hSuperObjPerso)))
|
||||
|
||||
|
||||
|
||||
/* ANNECY OA - 30/07/99 { */
|
||||
#ifndef U64
|
||||
/* Handler pour les fonctions incluses dans les donnes */
|
||||
/* Pour les protections */
|
||||
typedef struct
|
||||
{
|
||||
UINT (WINAPI *SetErrorMode)(UINT uFlags);
|
||||
HANDLE (WINAPI *CreateFile)(LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDistribution, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
|
||||
BOOL (WINAPI *GetFileInformationByHandle)(HANDLE hFile, LPBY_HANDLE_FILE_INFORMATION lpFileInformation);
|
||||
BOOL (WINAPI *CloseHandle)(HANDLE hObject);
|
||||
UINT (WINAPI *GetDriveType)(LPCTSTR lpRootPathName);
|
||||
BOOL (WINAPI *GetVolumeInformation)(LPCTSTR lpRootPathName, LPTSTR lpVolumeNameBuffer, DWORD nVolumeNameSize, LPDWORD lpVolumeSerialNumber, LPDWORD lpMaximumComponentLength, LPDWORD lpFileSystemFlags, LPTSTR lpFileSystemNameBuffer, DWORD nFileSystemNameSize);
|
||||
BOOL (WINAPI *GetDiskFreeSpace)(LPCTSTR lpszFileName, LPDWORD lpSectorsPerCluster, LPDWORD lpBytesPerSector, LPDWORD lpFreeClusters, LPDWORD lpClusters);
|
||||
BOOL (WINAPI *SetFileAttributes)(LPCTSTR lpszFileName, DWORD dwFileAttributes);
|
||||
DWORD (WINAPI *GetFileAttributes)(LPCTSTR lpszFileName);
|
||||
BOOL (WINAPI *SetFileTime)(HANDLE hFile, CONST FILETIME* lpftCreation, CONST FILETIME* lpftLastAccess, CONST FILETIME* lpftLastWrite);
|
||||
BOOL (WINAPI *GetFileTime)(HANDLE hFile, LPFILETIME lpftCreation, LPFILETIME lpftLastAccess, LPFILETIME lpftLastWrite);
|
||||
DWORD (WINAPI *GetFileSize)(HANDLE hFile, LPDWORD lpFileSizeHigh);
|
||||
DWORD (*SearchExportedFunctionInEveryDLL)(char *_szCryptedName);
|
||||
DWORD (*SearchFunctionInImportedTableOfExe)(char *_szCryptedName);
|
||||
} tdstLoaderHandler;
|
||||
#endif /* U64 */
|
||||
/* END ANNECY OA } */
|
||||
|
||||
|
||||
#endif /* __AISTRUCT_H__*/
|
||||
|
19
Rayman_X/cpa/public/AI/AIBase/ActConst.h
Normal file
19
Rayman_X/cpa/public/AI/AIBase/ActConst.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#if !defined(__ACTCONST_H__)
|
||||
#define __ACTCONST_H__
|
||||
|
||||
#define C_ACTION_ENGINE_CONTINUE 0
|
||||
#define C_ACTION_ENGINE_STOP 1
|
||||
#define C_ACTION_ENGINE_STOP_RULE 2
|
||||
|
||||
#define C_ACTION_NOT_IMMEDIATE 0
|
||||
#define C_ACTION_NOT_FINISHED C_ACTION_NOT_IMMEDIATE
|
||||
/*#define C_ACTION_IMMEDIATE 4*/
|
||||
#define C_ACTION_FINISHED 4
|
||||
#define C_ACTION_CHANGE_COMPORT 8
|
||||
#define C_TREE_FINISHED 16
|
||||
#define C_ACTION_ENGINE_NOTDEFINED 32 /* to set the action type using the script (default case)*/
|
||||
|
||||
#define C_DefaultMetaActionNotFinished C_ACTION_NOT_FINISHED | C_ACTION_ENGINE_STOP
|
||||
#define C_DefaultMetaActionFinished C_ACTION_FINISHED | C_ACTION_ENGINE_CONTINUE
|
||||
|
||||
#endif
|
79
Rayman_X/cpa/public/AI/AIBase/Action.h
Normal file
79
Rayman_X/cpa/public/AI/AIBase/Action.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Action.h : Definition of general Action.*/
|
||||
/* auteur : Olivier Didelot.*/
|
||||
/* date : 15/10/1996*/
|
||||
/* modifications majeures : Olivier Couvreur*/
|
||||
/* date : 28/10/1996*/
|
||||
/* encore modifications majeures : Olivier Couvreur*/
|
||||
/* date : 7/11/1996*/
|
||||
/* encore modifications majeures : Olivier Didelot*/
|
||||
/* date : 19/11/1996*/
|
||||
/* modifications : Olivier Couvreur*/
|
||||
/* date : 20/01/1997 support for script and editor names + parameter types*/
|
||||
/* modifications : Fabien MORALES*/
|
||||
/* date : 21/01/1997 Blocking actions management*/
|
||||
/* modifications : Fabien MORALES*/
|
||||
/* date : 23/01/1997 Kill Perso*/
|
||||
/* modifications : Albert Pais*/
|
||||
/* date : January 28,1997 : adding Way and WP relative actions*/
|
||||
/* modifications : Fabien MORALES*/
|
||||
/* date : 29/01/1997 GoToPosition, ReachTarget*/
|
||||
/* modify : Olivier Couvreur*/
|
||||
/* date : 10/02/1997 great enhancement for automatic init support*/
|
||||
/* modify : Albert Pais*/
|
||||
/* date :February 11,1997 adding meta-action for reinitialising the way*/
|
||||
/* modifications : Fabien MORALES*/
|
||||
/* date : 10/02/1997 Actions TranslateModule, RotateModule, */
|
||||
/* TranslateModuleToPerso, RotateModuleToPerso*/
|
||||
/* modify : Olivier Couvreur*/
|
||||
/* date : 18/02/1997 CPA_EXPORT + new functions for editor*/
|
||||
/* modify : Yann Le Guyader*/
|
||||
/* date : 24/02/1997 New functions for camera*/
|
||||
/* modify : Olivier Couvreur 25/03/1997 ACTIVE_EDITOR support*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(__ACTION_H__)
|
||||
#define __ACTION_H__
|
||||
|
||||
/****************************************/
|
||||
#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
|
||||
/*******************************************************************************/
|
||||
|
||||
#include "specif/AIOption.h"
|
||||
#include "ActConst.h"
|
||||
|
||||
#define M_TestActionReturn(ActionReturn,Flag) ( ( (ActionReturn) & (Flag) ) == (Flag) )
|
||||
|
||||
/* ---------------*/
|
||||
/* general actions*/
|
||||
/* ---------------*/
|
||||
|
||||
#include "..\AIGame\TypePtr.h"
|
||||
|
||||
EXTERN_AI_DLL CPA_EXPORT unsigned char g_ucNewActionReturn; /* to set the action type using the script*/
|
||||
EXTERN_AI_DLL CPA_EXPORT unsigned char g_ucUseDefaultActionReturn; /* the g_ucNewActionReturn is not taking into account*/
|
||||
|
||||
|
||||
struct tdstNodeInterpret_ *fn_p_stDefaultActionInit(HIE_tdxHandleToSuperObject p_SuperObjPerso, struct tdstNodeInterpret_ *p_stTree);
|
||||
tducActionReturn fn_ucDefaultAction(HIE_tdxHandleToSuperObject p_SuperObjPerso);
|
||||
|
||||
#if !defined(OPTIMIZED_COMMAND)
|
||||
void fn_vInitMetaActionEntries(void);
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************/
|
||||
#undef EXTERN_AI_DLL
|
||||
|
||||
#endif /* __ACTION_H__*/
|
78
Rayman_X/cpa/public/AI/AIBase/Array.h
Normal file
78
Rayman_X/cpa/public/AI/AIBase/Array.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Array.h : Typed array for AI.*/
|
||||
/* author : Olivier Couvreur 28/11/1997*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(__ARRAY_H__)
|
||||
#define __ARRAY_H__
|
||||
|
||||
#define C_ucSizeOfMinimalArray 2
|
||||
#define C_ucSizeOfMaximalArray 255
|
||||
|
||||
#define C_TypeOfArray1 struct tdstArray1_
|
||||
#define C_SizeOfArray1 (sizeof (C_TypeOfArray1))
|
||||
|
||||
#define M_ARRAY_TYPE(array) ((array)->eType)
|
||||
#define M_ARRAY_SIZE(array) ((array)->ucMaxSize)
|
||||
|
||||
//FB120399
|
||||
// to optimize memory usage of array
|
||||
#ifndef ACTIVE_EDITOR
|
||||
#define OPTIMIZED_ARRAY
|
||||
#endif
|
||||
|
||||
// magic or not ?
|
||||
#if defined(OPTIMIZED_ARRAY)
|
||||
#define ARRAY_FACTOR 3
|
||||
#define C_TypeOfArrayElement tduGetSetParamForNode
|
||||
#define C_SizeOfArrayElement (sizeof(C_TypeOfArrayElement))
|
||||
#define M_ARRAY_ELEMENT(array,n) (&((array)->d_ArrayElement[(M_ARRAY_TYPE(array)==eDsgVarType_Vector)?ARRAY_FACTOR*n:n]))
|
||||
#define M_ARRAY_CLEAR(array) memset(&((array)->d_ArrayElement[0]),0, (M_ARRAY_TYPE(array)==eDsgVarType_Vector) ? ARRAY_FACTOR*M_ARRAY_SIZE(array)*C_SizeOfArrayElement : M_ARRAY_SIZE(array)*C_SizeOfArrayElement)
|
||||
|
||||
#else
|
||||
#define C_TypeOfArrayElement tduGetSetParam
|
||||
#define C_SizeOfArrayElement (sizeof(C_TypeOfArrayElement))
|
||||
#define M_ARRAY_ELEMENT(array,n) (&((array)->d_ArrayElement[n]))
|
||||
#define M_ARRAY_CLEAR(array) memset(M_ARRAY_ELEMENT(array,0),0, M_ARRAY_SIZE(array)*C_SizeOfArrayElement)
|
||||
#endif // OPTIMIZED_ARRAY
|
||||
|
||||
|
||||
/* BEGIN ROMTEAM Cristi Petrescu 98-11-*/
|
||||
#define M_ARRAY_COPY(pstDest,pstSource) \
|
||||
{ M_ARRAY_SIZE (pstDest) = M_ARRAY_SIZE (pstSource); \
|
||||
M_ARRAY_TYPE (pstDest) = M_ARRAY_TYPE (pstSource); \
|
||||
memcpy (M_ARRAY_ELEMENT (pstDest, 0), M_ARRAY_ELEMENT (pstSource, 0), M_ARRAY_SIZE (pstSource) * C_SizeOfArrayElement);}
|
||||
|
||||
#define M_ARRAY_COMPARE(pstArray1,pstArray2) \
|
||||
((M_ARRAY_SIZE (pstArray1) == M_ARRAY_SIZE (pstArray2)) && \
|
||||
(M_ARRAY_TYPE (pstArray1) != M_ARRAY_TYPE (pstArray2)) && \
|
||||
(memcmp (M_ARRAY_ELEMENT (pstArray1, 0), M_ARRAY_ELEMENT (pstArray2, 0), M_ARRAY_SIZE (pstArray1) * C_SizeOfArrayElement) == 0))
|
||||
/* END ROMTEAM Cristi Petrescu 98-11-*/
|
||||
|
||||
|
||||
typedef struct tdstArray1_
|
||||
{
|
||||
/*enum tdeVariableType_ eType;*/
|
||||
enum tdeDsgVarTypeId_ eType;
|
||||
/*unsigned char ucNbElement;*/
|
||||
unsigned char ucMaxSize;
|
||||
// OPTIMIZED_ARRAY
|
||||
C_TypeOfArrayElement d_ArrayElement[1];
|
||||
} tdstArray1;/* used to know the size of the an array with one element*/
|
||||
|
||||
typedef struct tdstArray_
|
||||
{
|
||||
/*enum tdeVariableType_ eType;*/
|
||||
enum tdeDsgVarTypeId_ eType;
|
||||
/*unsigned char ucNbElement; */
|
||||
unsigned char ucMaxSize;
|
||||
// OPTIMIZED_ARRAY
|
||||
C_TypeOfArrayElement d_ArrayElement[C_ucSizeOfMaximalArray];
|
||||
} tdstArray;/* use for every array pointer, easy to watch all element in debug mode*/
|
||||
|
||||
/*void fn_vPutInArray (struct tdstArray_ *p_stArray, unsigned char ucIndex, struct tdstGetSetParam_ *p_stParam);*/
|
||||
/*void fn_vGetFromArray(struct tdstArray_ *p_stArray, unsigned char ucIndex, struct tdstGetSetParam_ *p_stParam);*/
|
||||
|
||||
void fn_vInitArray(struct tdstArray_ *p_stArray,enum tdeDsgVarTypeId_ eDsgVarType,unsigned char ucNbElements,char *szParams[]);
|
||||
|
||||
#endif
|
308
Rayman_X/cpa/public/AI/AIBase/CFast.h
Normal file
308
Rayman_X/cpa/public/AI/AIBase/CFast.h
Normal file
@@ -0,0 +1,308 @@
|
||||
#if !defined(_CFAST_H_)
|
||||
#define _CFAST_H_
|
||||
|
||||
#include "..\AiBase\Specif\AiOption.h"
|
||||
|
||||
#include "GSParam.h"
|
||||
#include "StrIntel.h"
|
||||
#include "EnumType.h"
|
||||
#include "AI\AIGame\TypePtr.h"
|
||||
#include "AI\AIGame\ConvCst.h"
|
||||
|
||||
#define CFast_lMaxTreeDepth 20
|
||||
|
||||
#ifdef __cplusplus
|
||||
/*extern "C" {*/
|
||||
#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
|
||||
|
||||
/*
|
||||
* Array for all C functions.
|
||||
*/
|
||||
typedef struct CFast_tdst_ArrayFunctions_
|
||||
{
|
||||
/* char *mpsz_Name;*/
|
||||
void (*mfnv_Function)(HIE_tdxHandleToSuperObject);
|
||||
#ifdef U64
|
||||
//long ml_SizeOfCode;
|
||||
long ml_SizeOfTree;
|
||||
struct tdstNodeInterpret_ *mp_stPseudoTree;
|
||||
#endif
|
||||
} CFast_tdst_ArrayFunctions;
|
||||
|
||||
typedef void (*CFast_EvalFunc)(void);
|
||||
|
||||
/*
|
||||
* functions
|
||||
*/
|
||||
#define C_MAX_SIZE_FUNCTION_EDITOR_NAME 50
|
||||
#define C_MAX_SIZE_FUNCTION_SCRIPT_NAME 41
|
||||
#define C_MAX_FUNCTION_NB_IN_PARAM 6
|
||||
#define C_MAX_FUNCTION_NB_OUT_PARAM 1
|
||||
typedef struct tdstFunctionEntry_
|
||||
{
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
/* Function string used in editor*/
|
||||
char szFunctionEditorName[C_MAX_SIZE_FUNCTION_EDITOR_NAME+1];
|
||||
char szFunctionEditorName_En[C_MAX_SIZE_FUNCTION_EDITOR_NAME+1];
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
#if defined (AI_USE_SCRIPT)
|
||||
/* Function string used in script*/
|
||||
char szFunctionScriptName[C_MAX_SIZE_FUNCTION_SCRIPT_NAME+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
#if defined(_AI_LIB_)
|
||||
/* pointer on Function function*/
|
||||
tdp_fn_p_stFunctionFunctionPtr p_fn_p_stFunctionFunction;
|
||||
#endif /* _AI_LIB_*/
|
||||
#if defined (AI_USE_SCRIPT) || defined (U64_AIDEBUG)
|
||||
/* list of Function parameters (taken from szAutorizedTypeParam) in parameter*/
|
||||
char szFunctionTypeInParam[C_MAX_FUNCTION_NB_IN_PARAM+1];
|
||||
/* out parameter*/
|
||||
char szFunctionTypeOutParam[C_MAX_FUNCTION_NB_OUT_PARAM+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
unsigned char bUltraFunctionFlag;
|
||||
|
||||
#ifdef PROFILE_IA
|
||||
unsigned long ulCallCtr;
|
||||
unsigned long ulTimeCtr;
|
||||
unsigned long ulOwnTimeCtr;
|
||||
#endif /* PROFILE_IA*/
|
||||
} tdstFunctionEntry;
|
||||
extern tdstFunctionEntry a_stFunctionTable[] ;
|
||||
|
||||
/*
|
||||
* Keyword
|
||||
*/
|
||||
#define C_MAX_SIZE_KEYWORD_EDITOR_NAME 17
|
||||
#define C_MAX_SIZE_KEYWORD_SCRIPT_NAME 14
|
||||
#define C_MAX_KEYWORD_NB_IN_PARAM 3
|
||||
#define C_MAX_KEYWORD_NB_OUT_PARAM 1
|
||||
|
||||
#if defined(ACTIVE_EDITOR) || defined(AI_USE_SCRIPT) || defined(_AI_LIB_)
|
||||
|
||||
typedef struct tdstKeyWordEntry_
|
||||
{
|
||||
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
/* KeyWord string used in editor*/
|
||||
char szKeyWordEditorName[C_MAX_SIZE_KEYWORD_EDITOR_NAME+1];
|
||||
char szKeyWordEditorName_En[C_MAX_SIZE_KEYWORD_EDITOR_NAME+1];
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
#if defined (AI_USE_SCRIPT)
|
||||
/* KeyWord string used in script*/
|
||||
char szKeyWordScriptName[C_MAX_SIZE_KEYWORD_SCRIPT_NAME+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
#if defined(_AI_LIB_)
|
||||
/* pointer on KeyWord function*/
|
||||
tdp_fn_p_stKeyWordFunctionPtr p_fn_p_stKeyWordFunction;
|
||||
#endif /* _AI_LIB_*/
|
||||
#if defined (AI_USE_SCRIPT) || defined (U64_AIDEBUG)
|
||||
/* list of KeyWord parameters (taken from szAutorizedTypeParam) in parameter*/
|
||||
char szKeyWordTypeInParam[C_MAX_KEYWORD_NB_IN_PARAM+1];
|
||||
/* list of KeyWord parameters (taken from szAutorizedTypeParam) out parameter*/
|
||||
char szKeyWordTypeOutParam[C_MAX_KEYWORD_NB_OUT_PARAM+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
} tdstKeyWordEntry;
|
||||
|
||||
extern tdstKeyWordEntry a_stKeyWordTable[] ;
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* conditions
|
||||
*/
|
||||
#define C_MAX_SIZE_CONDITION_EDITOR_NAME 50
|
||||
#define C_MAX_SIZE_CONDITION_SCRIPT_NAME 40
|
||||
#define C_MAX_CONDITION_NB_PARAM 4
|
||||
|
||||
typedef struct tdstConditionEntry_
|
||||
{
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
/* Condition string used in editor*/
|
||||
char szConditionEditorName[C_MAX_SIZE_CONDITION_EDITOR_NAME+1];
|
||||
char szConditionEditorName_En[C_MAX_SIZE_CONDITION_EDITOR_NAME+1];
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
#if defined (AI_USE_SCRIPT)
|
||||
/* Condition string used in script*/
|
||||
char szConditionScriptName[C_MAX_SIZE_CONDITION_SCRIPT_NAME+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
#if defined(_AI_LIB_)
|
||||
/* pointer on Condition function*/
|
||||
tdp_fn_p_stConditionFunctionPtr p_fn_p_stConditionFunction;
|
||||
#endif /* _AI_LIB_*/
|
||||
#if defined (AI_USE_SCRIPT) || defined (U64_AIDEBUG)
|
||||
/* list of Condition parameters (taken from szAutorizedTypeParam) in parameter*/
|
||||
char szConditionTypeInParam[C_MAX_CONDITION_NB_PARAM+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
|
||||
unsigned char bUltraCondtionFlag;
|
||||
|
||||
#ifdef PROFILE_IA
|
||||
unsigned long ulCallCtr;
|
||||
unsigned long ulTimeCtr;
|
||||
unsigned long ulOwnTimeCtr;
|
||||
#endif /* PROFILE_IA*/
|
||||
} tdstConditionEntry;
|
||||
|
||||
extern tdstConditionEntry a_stConditionTable[] ;
|
||||
|
||||
/*
|
||||
* Meta-Action
|
||||
*/
|
||||
#define C_MAX_SIZE_META_ACTION_SCRIPT_NAME 37
|
||||
#define C_MAX_SIZE_META_ACTION_EDITOR_NAME 80
|
||||
#define C_MAX_NB_META_ACTION_PARAM C_MAX_NB_PARAM
|
||||
|
||||
typedef struct tdstMetaActionEntry_
|
||||
{
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
/* metaaction string used in editor*/
|
||||
char szMetaActionEditorName[C_MAX_SIZE_META_ACTION_EDITOR_NAME+1];
|
||||
char szMetaActionEditorName_En[C_MAX_SIZE_META_ACTION_EDITOR_NAME+1];
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
#if defined (AI_USE_SCRIPT)
|
||||
/* metaaction string used in script*/
|
||||
char szMetaActionScriptName[C_MAX_SIZE_META_ACTION_SCRIPT_NAME+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
#if defined(_AI_LIB_)
|
||||
/* pointer on metaaction INIT function*/
|
||||
tdp_fn_p_stMetaActionInitFunctionPtr p_fn_p_stMetaActionInitFunction;
|
||||
/* pointer on metaaction NEXT function*/
|
||||
tdp_fn_ucMetaActionFunctionPtr p_fn_ucMetaActionFunction;
|
||||
#endif /* _AI_LIB_*/
|
||||
|
||||
/* list of metaaction parameters (taken from szAutorizedTypeParam)*/
|
||||
char szMetaActionTypeParam[C_MAX_NB_META_ACTION_PARAM+1];
|
||||
} tdstMetaActionEntry;
|
||||
|
||||
extern tdstMetaActionEntry a_stMetaActionTable[] ;
|
||||
|
||||
/*
|
||||
* procedures
|
||||
*/
|
||||
#define C_MAX_SIZE_PROCEDURE_EDITOR_NAME 50
|
||||
#define C_MAX_SIZE_PROCEDURE_SCRIPT_NAME 40
|
||||
|
||||
#define C_MAX_PROCEDURE_NB_PARAM 8 /*ANNECY YLT Passage de 6 <20> 8 arguments (note: ceci ne prend pas plus de place en release binarise)*/
|
||||
|
||||
typedef struct tdstProcedureEntry_
|
||||
{
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
/* Procedure string used in editor*/
|
||||
char szProcedureEditorName[C_MAX_SIZE_PROCEDURE_EDITOR_NAME+1];
|
||||
char szProcedureEditorName_En[C_MAX_SIZE_PROCEDURE_EDITOR_NAME+1];
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
#if defined (AI_USE_SCRIPT)
|
||||
/* Procedure string used in script*/
|
||||
char szProcedureScriptName[C_MAX_SIZE_PROCEDURE_SCRIPT_NAME+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
#if defined(_AI_LIB_)
|
||||
/* pointer on Procedure function*/
|
||||
tdp_fn_p_stProcedureFunctionPtr p_fn_p_stProcedureFunction;
|
||||
#endif
|
||||
#if defined (AI_USE_SCRIPT) || defined (U64_AIDEBUG)
|
||||
/* list of Procedure parameters (taken from szAutorizedTypeParam) in parameter*/
|
||||
char szProcedureTypeParam[C_MAX_PROCEDURE_NB_PARAM+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
unsigned char bUltraProcedureFlag;
|
||||
|
||||
#ifdef PROFILE_IA
|
||||
unsigned long ulCallCtr;
|
||||
unsigned long ulTimeCtr;
|
||||
unsigned long ulOwnTimeCtr;
|
||||
#endif /* PROFILE_IA*/
|
||||
} tdstProcedureEntry;
|
||||
|
||||
extern tdstProcedureEntry a_stProcedureTable[] ;
|
||||
|
||||
/*
|
||||
* Operators
|
||||
*/
|
||||
#define C_MAX_SIZE_OPERATOR_EDITOR_NAME 4
|
||||
#define C_MAX_SIZE_OPERATOR_SCRIPT_NAME 26
|
||||
#define C_MAX_OPERATOR_NB_IN_PARAM 2
|
||||
#define C_MAX_OPERATOR_NB_OUT_PARAM 1
|
||||
|
||||
#if defined(ACTIVE_EDITOR) || defined(AI_USE_SCRIPT) || defined(_AI_LIB_)
|
||||
|
||||
typedef struct tdstOperatorEntry_
|
||||
{
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
/* Operator string used in editor*/
|
||||
char szOperatorEditorName[C_MAX_SIZE_OPERATOR_EDITOR_NAME+1];
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
#if defined (AI_USE_SCRIPT)
|
||||
/* Operator string used in script*/
|
||||
char szOperatorScriptName[C_MAX_SIZE_OPERATOR_SCRIPT_NAME+1];
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
#if defined(_AI_LIB_)
|
||||
/* pointer on Operator function*/
|
||||
tdp_fn_p_stOperatorFunctionPtr p_fn_p_stOperatorFunction;
|
||||
#endif /* _AI_LIB_*/
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
/* list of Operator parameters (taken from szAutorizedTypeParam) in parameter*/
|
||||
char szOperatorTypeInParam[C_MAX_OPERATOR_NB_IN_PARAM+1];
|
||||
/* out parameter*/
|
||||
char szOperatorTypeOutParam[C_MAX_OPERATOR_NB_OUT_PARAM+1];
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
} tdstOperatorEntry;
|
||||
|
||||
extern tdstOperatorEntry a_stOperatorTable[] ;
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* type (vector, ... )
|
||||
*/
|
||||
typedef struct tdstTypeEntry_
|
||||
{
|
||||
tdp_fn_p_stEvalTypePtr p_fn_p_stEvalTypePtr;
|
||||
} tdstTypeEntry;
|
||||
|
||||
extern tdstTypeEntry a_stTypeTable[] ;
|
||||
|
||||
EXTERN_AI_DLL CPA_EXPORT tdp_fn_p_stConditionFunctionPtr CFast_g_p_fn_CondPtr ;
|
||||
EXTERN_AI_DLL CPA_EXPORT tdp_fn_p_stOperatorFunctionPtr CFast_g_p_fn_OpPtr ;
|
||||
EXTERN_AI_DLL CPA_EXPORT tdp_fn_p_stProcedureFunctionPtr CFast_g_p_fn_ProcPtr ;
|
||||
EXTERN_AI_DLL CPA_EXPORT tdp_fn_p_stFunctionFunctionPtr CFast_g_p_fn_FuncPtr ;
|
||||
EXTERN_AI_DLL CPA_EXPORT tdp_fn_p_stKeyWordFunctionPtr CFast_g_p_fn_KeyWordPtr ;
|
||||
EXTERN_AI_DLL CPA_EXPORT tdp_fn_p_stMetaActionInitFunctionPtr CFast_g_p_fn_MetaInitPtr ;
|
||||
EXTERN_AI_DLL CPA_EXPORT tdp_fn_ucMetaActionFunctionPtr CFast_g_p_fn_MetaPtr ;
|
||||
|
||||
EXTERN_AI_DLL CPA_EXPORT tdstGetSetParam CFast_g_a_stParam[CFast_lMaxTreeDepth] ;
|
||||
EXTERN_AI_DLL CPA_EXPORT tdstNodeInterpret CFast_g_a_stPseudoTree[7][CFast_lMaxTreeDepth] ;
|
||||
EXTERN_AI_DLL CPA_EXPORT long CFast_g_a_lLong[CFast_lMaxTreeDepth] ;
|
||||
EXTERN_AI_DLL CPA_EXPORT tdeTypeInterpret CFast_g_aEvt2Eti[] ;
|
||||
EXTERN_AI_DLL CPA_EXPORT ACP_tdxBool CFast_g_bProcessReflex ;
|
||||
EXTERN_AI_DLL CPA_EXPORT ACP_tdxBool CFast_g_bMetaActionInRfx ;
|
||||
/*extern tdstNodeInterpret *M_CFast_GetReferenceNodeN(HIE_tdxHandleToSuperObject hSuperObjectPerso, long indice) ;*/
|
||||
#ifdef __cplusplus
|
||||
/*}*/
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
EXTERN_AI_DLL char gcGlobAleat;
|
||||
EXTERN_AI_DLL CPA_EXPORT CFast_tdst_ArrayFunctions CFast_gast_ArrayFunctions[];
|
||||
tdstNodeInterpret *fn_p_stEvalVector(HIE_tdxHandleToSuperObject p_SuperObjPerso, tdstNodeInterpret *p_stTree, tdstGetSetParam *p_stValue) ;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif /* _CFAST_H_ */
|
147
Rayman_X/cpa/public/AI/AIBase/DefNode.h
Normal file
147
Rayman_X/cpa/public/AI/AIBase/DefNode.h
Normal file
@@ -0,0 +1,147 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
DefNode.h : Node & ReadRule
|
||||
Author : Olivier Couvreur 25/09/97
|
||||
--------------------------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(M_DEFINE_NODE)
|
||||
#error You should define M_DEFINE_NODE accordingly before including this file !
|
||||
#endif
|
||||
|
||||
/* for script*/
|
||||
|
||||
/* in DEFINES.AI in Gamedata\World\_Common\Families*/
|
||||
#define C_DefineAIFiles "Defines.ai"
|
||||
#define C_CreateAIDefines_String "CreateAIDefines"
|
||||
#define C_ConstantRefString "ConstantRef"
|
||||
#define C_RealRefString "RealRef"
|
||||
|
||||
/* in .AI*/
|
||||
#define C_CreateAIModel_String "CreateAIModel"
|
||||
#define C_CreateIntellAIModel_String "CreateIntellAIModel"
|
||||
#define C_CreateReflexAIModel_String "CreateReflexAIModel"
|
||||
#define C_CreateVariableDeclarationAIModel_String "CreateVariableDeclarationAIModel"
|
||||
#define C_CreateMacroAIModel_String "CreateMacroAIModel"
|
||||
#define C_CreatePseudoTree_String "CreatePseudoTree"
|
||||
|
||||
/* in .NOD : CFAST*/
|
||||
#define C_MakeNodeString "MakeNode"
|
||||
|
||||
/* in .MAC*/
|
||||
#define C_CreateListOfMacro_String "CreateListOfMacro"
|
||||
#define C_CreateMacro_String "CreateMacro"
|
||||
|
||||
/* in .DEC */
|
||||
#define C_CreateVariables_String "CreateVariables"
|
||||
/* for SAI*/
|
||||
#define C_TypeSaveVariables_String "TypeSaveVariable"
|
||||
/* for OTI*/
|
||||
#define C_TypeInitVariables_String "TypeInitVariable"
|
||||
|
||||
/* in .CAR*/
|
||||
#define C_InitVariables_String "InitVariables"
|
||||
#define C_InitComportReflex_String "InitComportReflex"
|
||||
#define C_InitComportIntelligence_String "InitComportIntelligence"
|
||||
|
||||
/* in .RUL & .RFX*/
|
||||
|
||||
#define C_ScriptAIReferenceString "ScriptAIReference"
|
||||
|
||||
/* sections and subsections*/
|
||||
#define C_CreateIntelligence_String "CreateIntelligence"
|
||||
#define C_CreateComport_String "CreateComport"
|
||||
#define C_CreateRule_String "CreateRule"
|
||||
#define C_CreateSchedule_String "CreateSchedule"
|
||||
|
||||
/* entries (nodes)*/
|
||||
#define C_KeyWordString "KeyWord"
|
||||
#define C_ConditionString "Condition"
|
||||
#define C_MetaActionString "MetaAction"
|
||||
#define C_FieldString "Field"
|
||||
#define C_ConstantString "Constant"
|
||||
#define C_OperatorString "Operator"
|
||||
#define C_FunctionString "Function"
|
||||
#define C_ProcedureString "Procedure"
|
||||
#define C_DsgVarString "DsgVar"
|
||||
#define C_DsgVarRefString "DsgVarRef"
|
||||
#define C_RealString "Real"
|
||||
#define C_BeginMacroString "BeginMacro"
|
||||
#define C_EndMacroString "EndMacro"
|
||||
#define C_VectorString "Vector"
|
||||
#define C_ConstantVectorString "ConstantVector"
|
||||
#define C_PersoRefString "PersoRef"
|
||||
#define C_ActionRefString "ActionRef"
|
||||
#define C_WayPointString "WayPoint"
|
||||
#define C_ModuleString "Module"
|
||||
#define C_DsgVarIdString "DsgVarId"
|
||||
#define C_ComportRefString "ComportRef"
|
||||
#define C_ButtonString "Button"
|
||||
#define C_StringString "String"
|
||||
#define C_MaskString "Mask"
|
||||
#define C_LipSynchroRefString "LipSynchroRef"
|
||||
#define C_ObjectTableRefString "ObjectTableRef"
|
||||
#define C_SectorRefString "SectorRef"
|
||||
#define C_SuperObjectRefString "SuperObjectRef"
|
||||
#define C_FamilyRefString "FamilyRef"
|
||||
#define C_ModuleRefString "ModuleRef"
|
||||
#define C_SoundEventRefString "SoundEventRef"
|
||||
#define C_TextRefString "TextRef"
|
||||
#define C_FontRefString "FontRef"
|
||||
#define C_ParticleGeneratorString "ParticleGenerator"
|
||||
#define C_GameMaterialRefString "GameMaterialRef"
|
||||
#define C_ColorString "Color"
|
||||
#define C_ModelRefString "ModelRef"
|
||||
#define C_LightString "Light"
|
||||
#define C_CapsString "CapsRef"
|
||||
#define C_GraphString "GraphRef"
|
||||
#define C_MacroRefString "MacroRef"
|
||||
|
||||
/* 3 parameters : script string (readrule.h), node type (deftype.h), function pointer for initialization (readrule.c) */
|
||||
|
||||
M_DEFINE_NODE(C_KeyWordString ,E_ti_KeyWord ,fn_vInitNodeKeyWord)
|
||||
M_DEFINE_NODE(C_ConditionString ,E_ti_Condition ,fn_vInitNodeCondition)
|
||||
M_DEFINE_NODE(C_MetaActionString ,E_ti_MetaAction ,fn_vInitNodeMetaAction)
|
||||
M_DEFINE_NODE(C_FieldString ,E_ti_Field ,fn_vInitNodeField)
|
||||
M_DEFINE_NODE(C_ConstantString ,E_ti_Constant ,fn_vInitNodeConstant)
|
||||
M_DEFINE_NODE(C_ConstantRefString ,E_ti_Constant ,fn_vInitNodeConstantRef)
|
||||
M_DEFINE_NODE(C_OperatorString ,E_ti_Operator ,fn_vInitNodeOperator)
|
||||
M_DEFINE_NODE(C_FunctionString ,E_ti_Function ,fn_vInitNodeFunction)
|
||||
M_DEFINE_NODE(C_ProcedureString ,E_ti_Procedure ,fn_vInitNodeProcedure)
|
||||
M_DEFINE_NODE(C_DsgVarString ,E_ti_DsgVar ,fn_vInitNodeDsgVar)
|
||||
M_DEFINE_NODE(C_DsgVarRefString ,E_ti_DsgVarRef ,fn_vInitNodeDsgVarRef)
|
||||
M_DEFINE_NODE(C_RealString ,E_ti_Real ,fn_vInitNodeReal)
|
||||
M_DEFINE_NODE(C_RealRefString ,E_ti_Real ,fn_vInitNodeRealRef)
|
||||
M_DEFINE_NODE(C_BeginMacroString ,E_ti_BeginMacro ,fn_vInitNodeBeginMacro)
|
||||
M_DEFINE_NODE(C_EndMacroString ,E_ti_EndMacro ,fn_vInitNodeEndMacro)
|
||||
M_DEFINE_NODE(C_VectorString ,E_ti_Vector ,fn_vInitNodeVector)
|
||||
M_DEFINE_NODE(C_ConstantVectorString ,E_ti_ConstantVector,fn_vInitNodeConstantVector)
|
||||
M_DEFINE_NODE(C_PersoRefString ,E_ti_PersoRef ,fn_vInitNodePersoRef)
|
||||
M_DEFINE_NODE(C_ActionRefString ,E_ti_ActionRef ,fn_vInitNodeActionRef)
|
||||
M_DEFINE_NODE(C_WayPointString ,E_ti_WayPointRef ,fn_vInitNodeWayPoint)
|
||||
M_DEFINE_NODE(C_ModuleString ,E_ti_Module ,fn_vInitNodeModule)
|
||||
M_DEFINE_NODE(C_DsgVarIdString ,E_ti_DsgVarId ,fn_vInitNodeDsgVarId)
|
||||
M_DEFINE_NODE(C_ComportRefString ,E_ti_ComportRef ,fn_vInitNodeComportRef)
|
||||
M_DEFINE_NODE(C_ButtonString ,E_ti_Button ,fn_vInitNodeButton)
|
||||
M_DEFINE_NODE(C_StringString ,E_ti_String ,fn_vInitNodeString)
|
||||
M_DEFINE_NODE(C_MaskString ,E_ti_Mask ,fn_vInitNodeMask)
|
||||
#ifdef D_USE_LIPSYNC
|
||||
M_DEFINE_NODE(C_LipSynchroRefString ,E_ti_LipsSynchroRef,fn_vInitNodeLipSynchroRef)
|
||||
#endif /* D_USE_LIPSYNC*/
|
||||
/* should be deleted very soon*/
|
||||
M_DEFINE_NODE(C_SectorRefString ,E_ti_SuperObjectRef,fn_vInitNodeSuperObjectRef)
|
||||
M_DEFINE_NODE(C_SuperObjectRefString ,E_ti_SuperObjectRef,fn_vInitNodeSuperObjectRef)
|
||||
M_DEFINE_NODE(C_FamilyRefString ,E_ti_FamilyRef ,fn_vInitNodeFamilyRef)
|
||||
M_DEFINE_NODE(C_ModuleRefString ,E_ti_ModuleRef ,fn_vInitNodeModuleRef)
|
||||
M_DEFINE_NODE(C_SoundEventRefString ,E_ti_SoundEventRef ,fn_vInitNodeSoundEventRef)
|
||||
M_DEFINE_NODE(C_TextRefString ,E_ti_TextRef ,fn_vInitNodeTextRef)
|
||||
M_DEFINE_NODE(C_ObjectTableRefString ,E_ti_ObjectTableRef,fn_vInitNodeObjectTableRef)
|
||||
M_DEFINE_NODE(C_ParticleGeneratorString ,E_ti_ParticleGenerator,fn_vInitNodeParticleGenerator)
|
||||
M_DEFINE_NODE(C_GameMaterialRefString ,E_ti_GameMaterialRef, fn_vInitNodeGameMaterialRef)
|
||||
M_DEFINE_NODE(C_ColorString ,E_ti_Color , fn_vInitNodeColor)
|
||||
M_DEFINE_NODE(C_ModelRefString ,E_ti_ModelRef , fn_vInitNodeModelRef)
|
||||
M_DEFINE_NODE(C_LightString ,E_ti_Light ,fn_vInitNodeLight)
|
||||
M_DEFINE_NODE(C_CapsString ,E_ti_Caps ,fn_vInitNodeCaps)
|
||||
M_DEFINE_NODE(C_GraphString ,E_ti_Graph ,fn_vInitNodeGraph)
|
||||
M_DEFINE_NODE(C_MacroRefString ,E_ti_MacroRef ,fn_vInitNodeMacroRef)
|
||||
#if defined(M_DEFINE_NODE)
|
||||
#undef M_DEFINE_NODE
|
||||
#endif
|
58
Rayman_X/cpa/public/AI/AIBase/DefType.h
Normal file
58
Rayman_X/cpa/public/AI/AIBase/DefType.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
DefType.h : Node Type definitions
|
||||
Author : Olivier Couvreur 25/08/97
|
||||
--------------------------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(M_DEFINE_TYPE_INTERPRET)
|
||||
#error You should define M_DEFINE_TYPE_INTERPRET accordingly before including this file !
|
||||
#endif
|
||||
|
||||
/* 4 parameters : enum, pointer for interpretation, pointer for binary load, pointer for binary save */
|
||||
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_KeyWord ,fn_p_stEvalKeyWord ,fn_p_cLoadBinaryNodeKeyWord ,fn_p_cSaveBinaryNodeKeyWord)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Condition ,fn_p_stEvalCondition ,fn_p_cLoadBinaryNodeCondition ,fn_p_cSaveBinaryNodeCondition)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Operator ,fn_p_stEvalOperator ,fn_p_cLoadBinaryNodeOperator ,fn_p_cSaveBinaryNodeOperator)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Function ,fn_p_stEvalFunction ,fn_p_cLoadBinaryNodeFunction ,fn_p_cSaveBinaryNodeFunction)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Procedure ,fn_p_stEvalProcedure ,fn_p_cLoadBinaryNodeProcedure ,fn_p_cSaveBinaryNodeProcedure)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_MetaAction ,fn_p_stEvalMetaAction ,fn_p_cLoadBinaryNodeMetaAction ,fn_p_cSaveBinaryNodeMetaAction)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_BeginMacro ,fn_p_stEvalBeginMacro ,fn_p_cLoadBinaryNodeBeginMacro ,fn_p_cSaveBinaryNodeBeginMacro)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_EndMacro ,fn_p_stEvalEndMacro ,fn_p_cLoadBinaryNodeEndMacro ,fn_p_cSaveBinaryNodeEndMacro)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_EndTree ,fn_p_stEvalEndOfTree ,fn_p_cLoadBinaryNodeEndOfTree ,fn_p_cSaveBinaryNodeEndOfTree)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Field ,fn_p_stEvalField ,fn_p_cLoadBinaryNodeField ,fn_p_cSaveBinaryNodeField)
|
||||
/* M_DEFINE_TYPE_INTERPRET(E_ti_DsgVar ,fn_p_stEvalDsgVar ,fn_p_cLoadBinaryNodeDsgVar ,fn_p_cSaveBinaryNodeDsgVar) */
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_DsgVar ,fn_p_stEvalDsgVarRef ,fn_p_cLoadBinaryNodeDsgVar ,fn_p_cSaveBinaryNodeDsgVar)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_DsgVarRef ,fn_p_stEvalDsgVarRef ,fn_p_cLoadBinaryNodeDsgVarRef ,fn_p_cSaveBinaryNodeDsgVarRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Constant ,fn_p_stEvalConstant ,fn_p_cLoadBinaryNodeConstant ,fn_p_cSaveBinaryNodeConstant)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Real ,fn_p_stEvalReal ,fn_p_cLoadBinaryNodeReal ,fn_p_cSaveBinaryNodeReal)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Button ,fn_p_stEvalButton ,fn_p_cLoadBinaryNodeButton ,fn_p_cSaveBinaryNodeButton)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_ConstantVector ,fn_p_stEvalConstantVector ,fn_p_cLoadBinaryNodeConstantVector ,fn_p_cSaveBinaryNodeConstantVector)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Vector ,fn_p_stEvalVector ,fn_p_cLoadBinaryNodeVector ,fn_p_cSaveBinaryNodeVector)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Mask ,fn_p_stEvalMask ,fn_p_cLoadBinaryNodeMask ,fn_p_cSaveBinaryNodeMask)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Module ,fn_p_stEvalModuleRef ,fn_p_cLoadBinaryNodeModuleRef ,fn_p_cSaveBinaryNodeModuleRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_DsgVarId ,fn_p_stEvalDsgVarId ,fn_p_cLoadBinaryNodeDsgVarId ,fn_p_cSaveBinaryNodeDsgVarId)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_String ,fn_p_stEvalString ,fn_p_cLoadBinaryNodeString ,fn_p_cSaveBinaryNodeString)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_LipsSynchroRef ,fn_p_stEvalLipsSynchroRef ,fn_p_cLoadBinaryNodeLipsSynchroRef,fn_p_cSaveBinaryNodeLipsSynchroRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_FamilyRef ,fn_p_stEvalFamilyRef ,fn_p_cLoadBinaryNodeFamilyRef ,fn_p_cSaveBinaryNodeFamilyRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_PersoRef ,fn_p_stEvalPersoRef ,fn_p_cLoadBinaryNodePersoRef ,fn_p_cSaveBinaryNodePersoRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_ActionRef ,fn_p_stEvalActionRef ,fn_p_cLoadBinaryNodeActionRef ,fn_p_cSaveBinaryNodeActionRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_SuperObjectRef ,fn_p_stEvalSuperObjectRef ,fn_p_cLoadBinaryNodeSuperObjectRef ,fn_p_cSaveBinaryNodeSuperObjectRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_WayPointRef ,fn_p_stEvalWayPointRef ,fn_p_cLoadBinaryNodeWayPoint ,fn_p_cSaveBinaryNodeWayPoint)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_TextRef ,fn_p_stEvalTextRef ,fn_p_cLoadBinaryNodeTextRef ,fn_p_cSaveBinaryNodeTextRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_ComportRef ,fn_p_stEvalComportRef ,fn_p_cLoadBinaryNodeComportRef ,fn_p_cSaveBinaryNodeComportRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_ModuleRef ,fn_p_stEvalModuleRef ,fn_p_cLoadBinaryNodeModuleRef ,fn_p_cSaveBinaryNodeModuleRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_SoundEventRef ,fn_p_stEvalSoundEventRef ,fn_p_cLoadBinaryNodeSoundEventRef,fn_p_cSaveBinaryNodeSoundEventRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_ObjectTableRef ,fn_p_stEvalObjectTableRef ,fn_p_cLoadBinaryNodeObjectTableRef ,fn_p_cSaveBinaryNodeObjectTableRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_GameMaterialRef,fn_p_stEvalGameMaterialRef ,fn_p_cLoadBinaryNodeGameMaterialRef, fn_p_cSaveBinaryNodeGameMaterialRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_ParticleGenerator,fn_p_stEvalParticleGenerator,fn_p_cLoadBinaryNodeParticleGenerator,fn_p_cSaveBinaryNodeParticleGenerator)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Color ,fn_p_stEvalColor ,fn_p_cLoadBinaryNodeColor ,fn_p_cSaveBinaryNodeColor)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_ModelRef ,fn_p_stEvalModelRef ,fn_p_cLoadBinaryNodeModelRef ,fn_p_cSaveBinaryNodeModelRef)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Light ,fn_p_stEvalLight ,fn_p_cLoadBinaryNodeLight ,fn_p_cSaveBinaryNodeLight)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Caps ,fn_p_stEvalCaps ,fn_p_cLoadBinaryNodeCaps ,fn_p_cSaveBinaryNodeCaps )
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Graph ,fn_p_stEvalGraph ,fn_p_cLoadBinaryNodeGraph ,fn_p_cSaveBinaryNodeGraph)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_MacroRef ,fn_p_stEvalMacro ,fn_p_cLoadBinaryNodeNULL ,fn_p_cSaveBinaryNodeNULL)
|
||||
M_DEFINE_TYPE_INTERPRET(E_ti_Unknown ,fn_p_stEvalNULL ,fn_p_cLoadBinaryNodeNULL ,fn_p_cSaveBinaryNodeNULL)
|
||||
|
||||
#if defined(M_DEFINE_TYPE_INTERPRET)
|
||||
#undef M_DEFINE_TYPE_INTERPRET
|
||||
#endif
|
||||
|
201
Rayman_X/cpa/public/AI/AIBase/DsgMem.h
Normal file
201
Rayman_X/cpa/public/AI/AIBase/DsgMem.h
Normal file
@@ -0,0 +1,201 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* DsgMem.h : Definition of variables in the designer memory.*/
|
||||
/* auteur : Pierrick CREPY*/
|
||||
/* date : 10/1996*/
|
||||
/* modify : * 12/1996 O.C.*/
|
||||
/* modify : 09/01/1997 O.C.*/
|
||||
/* 970115 : Perso management (Fabien Morales)*/
|
||||
/* 970120 : AddList (Fabien Morales) */
|
||||
/* 970120 : 3DPoint are vector type (Fabien Morales) */
|
||||
/* 970212 : Vector designer variable type (Fabien Morales) */
|
||||
/* modify : Olivier Couvreur*/
|
||||
/* date : 18/02/1997 CPA_EXPORT + new functions for editor*/
|
||||
/* modify : Olivier Couvreur : new dsgvar structures*/
|
||||
/* modify : Olivier Couvreur 27/05/97 ZDD + ZDE*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef D_DsgMem
|
||||
#define D_DsgMem
|
||||
|
||||
/**************************************/
|
||||
#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
|
||||
|
||||
/*******************************************************************************/
|
||||
|
||||
/* include*/
|
||||
/* **************/
|
||||
|
||||
/* defines*/
|
||||
/* **********/
|
||||
#define C_TypeOfComport struct tdstComport_ *
|
||||
#define C_SizeOfComport (sizeof(C_TypeOfComport))
|
||||
|
||||
#define C_TypeOfAction tdxHandleToState
|
||||
#define C_SizeOfAction (sizeof(C_TypeOfAction))
|
||||
|
||||
#define C_TypeOfText FON_tdxHandleOfText
|
||||
#define C_SizeOfText (sizeof(C_TypeOfText))
|
||||
|
||||
#define C_TypeOfBoolean char
|
||||
#define C_SizeOfBoolean (sizeof (C_TypeOfBoolean))
|
||||
|
||||
#define C_TypeOf_128To127 char
|
||||
#define C_SizeOf_128To127 (sizeof (C_TypeOf_128To127))
|
||||
|
||||
#define C_TypeOf0To255 unsigned char
|
||||
#define C_SizeOf0To255 (sizeof (C_TypeOf0To255))
|
||||
|
||||
#define C_TypeOf_32768To32767 short
|
||||
#define C_SizeOf_32768To32767 (sizeof (C_TypeOf_32768To32767))
|
||||
|
||||
#define C_TypeOf0To65535 unsigned short
|
||||
#define C_SizeOf0To65535 (sizeof (C_TypeOf0To65535))
|
||||
|
||||
#define C_TypeOfInteger long
|
||||
#define C_SizeOfInteger (sizeof (C_TypeOfInteger))
|
||||
|
||||
#define C_TypeOfPositiveInteger unsigned long
|
||||
#define C_SizeOfPositiveInteger (sizeof (C_TypeOfInteger))
|
||||
|
||||
#define C_TypeOfFloat MTH_tdxReal
|
||||
#define C_SizeOfFloat (sizeof (C_TypeOfFloat))
|
||||
|
||||
#define C_TypeOfWayPoint WP_tdhWayPoint
|
||||
#define C_SizeOfWayPoint (sizeof (C_TypeOfWayPoint))
|
||||
|
||||
#define C_TypeOfPerso HIE_tdxHandleToSuperObject
|
||||
#define C_SizeOfPerso (sizeof (C_TypeOfPerso))
|
||||
|
||||
/* ANNECY OA - 05/08/99 { */
|
||||
#ifndef U64
|
||||
#define C_TypeOfSuperObject HIE_tdxHandleToSuperObject
|
||||
#define C_SizeOfSuperObject (sizeof (C_TypeOfPerso))
|
||||
#endif
|
||||
/* END ANNECY OA } */
|
||||
|
||||
#define C_TypeOfPersoInList HIE_tdxHandleToSuperObject
|
||||
#define C_SizeOfPersoInList (sizeof (C_TypeOfPersoInList))
|
||||
|
||||
#define C_TypeOfList1 struct tdstList1_
|
||||
#define C_SizeOfList1 (sizeof (C_TypeOfList1))
|
||||
|
||||
#define C_TypeOfVector struct MTH3D_tdstVector_
|
||||
#define C_SizeOfVector (sizeof (C_TypeOfVector))
|
||||
|
||||
#define C_TypeOfGameMaterial GMT_tdxHandleToGameMaterial
|
||||
#define C_SizeOfGameMaterial (sizeof(C_TypeOfGameMaterial))
|
||||
|
||||
#define C_TypeOfCaps unsigned long
|
||||
#define C_SizeOfCaps (sizeof (C_TypeOfCaps))
|
||||
|
||||
#define C_TypeOfGraph WP_tdHandleOfGraph
|
||||
#define C_SizeOfGraph (sizeof (C_TypeOfGraph))
|
||||
|
||||
/* Types & structures*/
|
||||
/* *********************/
|
||||
#include "..\AiBase\Specif\AiOption.h"
|
||||
#include "GSParam.h"
|
||||
#include "..\AiGame\EnumVar.h"
|
||||
|
||||
typedef struct tdstDsgVarInfo_
|
||||
{
|
||||
unsigned long ulOffsetInDsgMem;
|
||||
tdeDsgVarTypeId eDsgVarTypeId;
|
||||
SAI_tdeFlags eSaveType; /* for SAI*/
|
||||
tdeObjectTreeInit eInitType; /* for OTI */
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
char szDsgVarName[256];
|
||||
#endif
|
||||
} tdstDsgVarInfo;
|
||||
|
||||
typedef struct tdstDsgVar_
|
||||
{
|
||||
char *p_cDsgMemDefaultInit; /* to store model init values*/
|
||||
tdstDsgVarInfo *p_stDsgVarInfo; /* info about each variable designer*/
|
||||
unsigned long ulSize; /* size of this zone*/
|
||||
unsigned char ucNbDsgVar; /* number of variable designer*/
|
||||
} tdstDsgVar;
|
||||
|
||||
typedef struct tdstDsgMem_
|
||||
{
|
||||
tdstDsgVar **p_p_stDsgVar;
|
||||
char *p_cDsgMemBufferInit; /* to store init values for each perso*/
|
||||
char *p_cDsgMemBuffer; /* to store current values for each perso*/
|
||||
} tdstDsgMem;
|
||||
|
||||
/* for DsgMemBuffer */
|
||||
#define M_GetDsgMem(p_stMind) (AI_M_p_stGetDsgMem(p_stMind))
|
||||
#define M_GetDsgMemBuffer(p_stMind) (AI_M_p_stGetDsgMem(p_stMind)->p_cDsgMemBuffer)
|
||||
|
||||
#define M_GetDsgVar(p_stMind) (*(AI_M_p_stGetDsgMem(p_stMind)->p_p_stDsgVar))
|
||||
#define M_GetDsgVarInfo(p_stMind,ucId) (&(M_GetDsgVar(p_stMind)->p_stDsgVarInfo[ucId]))
|
||||
#define M_GetDsgVarOffset(p_stMind,ucId) (M_GetDsgVarInfo(p_stMind,ucId)->ulOffsetInDsgMem)
|
||||
#define M_GetDsgVarAddr(p_stMind,ucId) (M_GetDsgMemBuffer(p_stMind)+M_GetDsgVarOffset(p_stMind,ucId))
|
||||
|
||||
#define M_GetDsgVarType(p_stMind,ucId) (M_GetDsgVarInfo(p_stMind,ucId)->eDsgVarTypeId)
|
||||
#define M_GetDsgVarSaveType(p_stMind,ucId) (M_GetDsgVarInfo(p_stMind,ucId)->eSaveType)
|
||||
#define M_GetDsgVarInitType(p_stMind,ucId) (M_GetDsgVarInfo(p_stMind,ucId)->eInitType)
|
||||
|
||||
#define M_GetDsgVarSize(p_stMind) (AI_M_p_stGetDsgVar(p_stMind)->ulSize)
|
||||
#define M_GetNbDsgVar(p_stMind) (AI_M_p_stGetDsgVar(p_stMind)->ucNbDsgVar)
|
||||
|
||||
#define M_GetDsgMemDefaultInit(p_stMind) (AI_M_p_stGetDsgVar(p_stMind)->p_cDsgMemDefaultInit)
|
||||
#define M_GetDsgMemBufferInit(p_stMind) (AI_M_p_stGetDsgMem(p_stMind)->p_cDsgMemBufferInit)
|
||||
|
||||
#define M_GetDsgVarAddrInit(p_stMind,ucId) (M_GetDsgMemBufferInit(p_stMind)+M_GetDsgVarOffset(p_stMind,ucId))
|
||||
#define M_GetDsgVarAddrDefault(p_stMind,ucId) (M_GetDsgMemDefaultInit(p_stMind)+M_GetDsgVarOffset(p_stMind,ucId))
|
||||
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
#define M_GetDsgVarName(p_stMind,ucId) (M_GetDsgVarInfo(p_stMind,ucId)->szDsgVarName)
|
||||
#define M_SetDsgVarName(p_stMind,ucId,szName) strcpy((M_GetDsgVarInfo(p_stMind,ucId)->szDsgVarName),szName);
|
||||
#else
|
||||
#define M_GetDsgVarName(p_stMind,ucId) ""
|
||||
#define M_SetDsgVarName(p_stMind,ucId,szName)
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
|
||||
/* Function prototypes*/
|
||||
/* *********************/
|
||||
|
||||
#if defined(AI_USE_SCRIPT)
|
||||
/* to inittialize current DsgVar values (in perso)*/
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vInitDsgVar(struct AI_tdstMind_ *p_stMind,unsigned char ucDsgVarId, enum tdeDsgVarTypeId_ eDsgVarTypeId, char * szParams[]);
|
||||
/* to inittialize init DsgVar values (in perso)*/
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vInitDsgVarInit(struct AI_tdstMind_ *p_stMind,unsigned char ucDsgVarId,enum tdeDsgVarTypeId_ eDsgVarTypeId, char * szParams[]);
|
||||
/* to inittialize init DsgVar values of an array (in perso)*/
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vInitDsgVarArrayInit(struct AI_tdstMind_ *p_stMind,unsigned char ucDsgVarId,unsigned char ucIndex,enum tdeDsgVarTypeId_ eDsgVarTypeId, char * szParams[]);
|
||||
/* to initialize init DsgVar values (in model)*/
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vInitDsgVarDefault(struct AI_tdstMind_ *p_stMind,unsigned char ucDsgVarId,enum tdeDsgVarTypeId_ eDsgVarTypeId, char * szParams[]);
|
||||
#endif
|
||||
|
||||
EXTERN_AI_DLL CPA_EXPORT unsigned long fn_ulSizeOfDsgVar(enum tdeDsgVarTypeId_ eDsgVarTypeId, unsigned char ucNbElt);
|
||||
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucGetDsgVarValue(void *pMyVarAddr,unsigned char ucIndex,tdeDsgVarTypeId eDsgVarTypeId,tdstGetSetParam *p_stGetSetParam);
|
||||
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucSetDsgVarValue(void *pMyVarAddr,unsigned char ucIndex,tdeDsgVarTypeId eDsgVarTypeId,tdstGetSetParam *p_stGetSetParam);
|
||||
#endif
|
||||
|
||||
unsigned char fn_ucGetDsgVar(unsigned char ucId,unsigned char ucIndex,struct AI_tdstMind_ *p_stPerso,struct tdstGetSetParam_ *p_stGetSetParam);
|
||||
#if defined(__DEBUG_AI__)
|
||||
unsigned char fn_ucGetDsgVarInit(unsigned char ucId,unsigned char ucIndex,struct AI_tdstMind_ *p_stPerso,struct tdstGetSetParam_ *p_stGetSetParam);
|
||||
#endif
|
||||
unsigned char fn_ucSetDsgVar(unsigned char ucId,unsigned char ucIndex,struct AI_tdstMind_ *p_stPerso,struct tdstGetSetParam_ *p_stGetSetParam);
|
||||
|
||||
#include "List.h"
|
||||
#include "Array.h"
|
||||
|
||||
/*******************************************************************************/
|
||||
#undef EXTERN_AI_DLL
|
||||
|
||||
|
||||
#endif /*D_DsgMem*/
|
17
Rayman_X/cpa/public/AI/AIBase/EnumType.h
Normal file
17
Rayman_X/cpa/public/AI/AIBase/EnumType.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#if !defined(__ENUM_TYPE_H__)
|
||||
#define __ENUM_TYPE_H__
|
||||
|
||||
#define M_DEFINE_TYPE_INTERPRET(a,b,c,d) a,
|
||||
|
||||
typedef enum tdeTypeInterpret_
|
||||
{
|
||||
#include "DefType.h"
|
||||
|
||||
/*************** MUST BE AT END ***************/
|
||||
E_ti_NbTypes
|
||||
/*************** MUST BE AT END ***************/
|
||||
} tdeTypeInterpret;
|
||||
|
||||
#undef M_DEFINE_TYPE_INTERPRET
|
||||
|
||||
#endif /* __ENUM_TYPE_H__*/
|
459
Rayman_X/cpa/public/AI/AIBase/GSParam.h
Normal file
459
Rayman_X/cpa/public/AI/AIBase/GSParam.h
Normal file
@@ -0,0 +1,459 @@
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* GetSetParam.h : Exchange structure between node, field and designers variables*/
|
||||
/* auteur : Olivier Couvreur*/
|
||||
/* date : 18/12/1996*/
|
||||
/* modify : 31/12/1996 */
|
||||
/* modify : 09/01/1997*/
|
||||
/* 970115 : Vector management (Fabien Morales)*/
|
||||
/* 970120 : 3DPoint are vector type (Fabien Morales) */
|
||||
/* 970212 : Module & DsgVarId node types, Vector Dsg var type : macros (Fabien Morales)*/
|
||||
/* March 21,1997 : Modification concerneing ways and waypoints management.*/
|
||||
/* 970526 : (Olivier Couvreur) ZDD + ZDE stuff*/
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(__GETSET_PARAM_H__)
|
||||
#define __GETSET_PARAM_H__
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "GAM\locale\FonPub.h"
|
||||
|
||||
|
||||
#define C_INVALID_GET 0
|
||||
#define C_VALID_GET 1
|
||||
#define C_INVALID_SET 0
|
||||
#define C_VALID_SET 1
|
||||
|
||||
#define _WP_D_DEFINE_WAYPOINTS_
|
||||
#include "WP_Handl.h"
|
||||
#include "WP_Func.h"
|
||||
#undef _WP_D_DEFINE_WAYPOINTS_
|
||||
|
||||
/* for ZDD and ZDE*/
|
||||
#define AI_ZDX_CHARACTER 0
|
||||
#define AI_ZDX_MODULE 1
|
||||
|
||||
#include "VarType.h"
|
||||
#include "Ai_struc.h"
|
||||
|
||||
/* All r,g,b,a values are in range [0..100]*/
|
||||
typedef struct RGBAComponent_
|
||||
{
|
||||
unsigned char Red;
|
||||
unsigned char Green;
|
||||
unsigned char Blue;
|
||||
unsigned char Alpha;
|
||||
} RGBAComponent;
|
||||
|
||||
typedef union RGBAStruct_
|
||||
{
|
||||
long Color;
|
||||
RGBAComponent Component;
|
||||
} RGBAStruct;
|
||||
|
||||
#define RGBA_Color(n) ((n).Color)
|
||||
#define RGBA_Component(n) ((n).Component)
|
||||
#define RGBA_Red(n) (RGBA_Component(n).Red)
|
||||
#define RGBA_Green(n) (RGBA_Component(n).Green)
|
||||
#define RGBA_Blue(n) (RGBA_Component(n).Blue)
|
||||
#define RGBA_Alpha(n) (RGBA_Component(n).Alpha)
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
typedef union tduGetSetParam_
|
||||
{
|
||||
MTH_tdxReal xValue;
|
||||
long lValue;
|
||||
unsigned long ulValue;
|
||||
short wValue;
|
||||
unsigned short uwValue;
|
||||
char cValue;
|
||||
unsigned char ucValue;
|
||||
unsigned char bf7Value:7;
|
||||
unsigned char bf6Value:6;
|
||||
unsigned char bf5Value:5;
|
||||
unsigned char bf4Value:4;
|
||||
unsigned char bf3Value:3;
|
||||
unsigned char bf2Value:2;
|
||||
unsigned char bf1Value:1;
|
||||
RGBAStruct ColorValue;
|
||||
char *szString;
|
||||
struct tdstEngineObject_ *p_stEngObjValue;
|
||||
tdxHandleToState tdxstHandleToState;
|
||||
HIE_tdxHandleToSuperObject hSuperObject; /* for hSector etc...*/
|
||||
WP_tdhWayPoint m_hWayPoint;
|
||||
GMT_tdxMask xMask;
|
||||
tdxHandleOfLipsSynchroTable hLipsSynchro;
|
||||
tdxHandleToObjectsTablesList hObjectTable;
|
||||
tdxHandleToFamilyList hFamily;
|
||||
SND_tdxHandleToSoundEvent pSoundEvent;
|
||||
struct tdstComport_ *pComport;
|
||||
FON_tdxHandleOfText hText;
|
||||
tdxHandleToParticleGenerator hParticleGenerator;
|
||||
GMT_tdxHandleToGameMaterial hGameMaterial;
|
||||
AI_tdstAIModel *p_stModel;
|
||||
MTH3D_tdstVector stVectorValue;
|
||||
GLI_tdxHandleToLight p_stLight;
|
||||
WP_tdHandleOfGraph hGraph;
|
||||
struct tdstMacro_ *p_stMacro;
|
||||
|
||||
} tduGetSetParam;
|
||||
|
||||
typedef union tduGetSetParamForNode_
|
||||
{
|
||||
MTH_tdxReal xValue;
|
||||
long lValue;
|
||||
unsigned long ulValue;
|
||||
short wValue;
|
||||
unsigned short uwValue;
|
||||
char cValue;
|
||||
unsigned char ucValue;
|
||||
RGBAStruct ColorValue;
|
||||
char *szString;
|
||||
struct tdstEngineObject_ *p_stEngObjValue;
|
||||
tdxHandleToState tdxstHandleToState;
|
||||
HIE_tdxHandleToSuperObject hSuperObject; /* for Sector etc...*/
|
||||
WP_tdhWayPoint m_hWayPoint;
|
||||
GMT_tdxMask xMask;
|
||||
tdxHandleOfLipsSynchroTable hLipsSynchro;
|
||||
tdxHandleToObjectsTablesList hObjectTable;
|
||||
tdxHandleToFamilyList hFamily;
|
||||
SND_tdxHandleToSoundEvent pSoundEvent;
|
||||
struct tdstComport_ *pComport;
|
||||
FON_tdxHandleOfText hText;
|
||||
tdxHandleToParticleGenerator hParticleGenerator;
|
||||
GMT_tdxHandleToGameMaterial hGameMaterial;
|
||||
AI_tdstAIModel *p_stModel;
|
||||
MTH3D_tdstVector *p_stVectorValue;
|
||||
GLI_tdxHandleToLight p_stLight;
|
||||
WP_tdHandleOfGraph hGraph;
|
||||
struct tdstMacro_ *p_stMacro;
|
||||
|
||||
} tduGetSetParamForNode;
|
||||
|
||||
|
||||
/* in order to access to tduGetSetParam : don't use these directly*/
|
||||
#define M_tduGetSetParam_Clear(n) memset((void*)(n),0,sizeof(*(n)));
|
||||
|
||||
#define M_tduGetSetParam_szString(n) ((n)->szString)
|
||||
#define M_tduGetSetParam_xValue(n) ((n)->xValue)
|
||||
#define M_tduGetSetParam_lValue(n) ((n)->lValue)
|
||||
#define M_tduGetSetParam_ulValue(n) ((n)->ulValue)
|
||||
/* ANNECY MT - 12/04/99 { */
|
||||
#if defined(__DEBUG_AI__)
|
||||
#define M_tduGetSetParam_p_stSupObjValue(n) ((n)->p_stEngObjValue ? M_GetSuperObject((n)->p_stEngObjValue) : NULL)
|
||||
#else
|
||||
#define M_tduGetSetParam_p_stSupObjValue(n) M_GetSuperObject((n)->p_stEngObjValue)
|
||||
#endif /* __DEBUG_AI__ */
|
||||
/* END ANNECY MT } */
|
||||
#define M_tduGetSetParam_p_stEngObjValue(n) ((n)->p_stEngObjValue)
|
||||
#define M_tduGetSetParam_boolValue(n) M_tduGetSetParam_lValue(n)
|
||||
#define M_tduGetSetParam_HandleToState(n) ((n)->tdxstHandleToState)
|
||||
#define M_tduGetSetParam_stVertexValue(n) M_tduGetSetParam_stVectorValue(n)
|
||||
#define M_tduGetSetParam_p_stVectorValue(n) ((n)->p_stVectorValue)
|
||||
#define M_tduGetSetParam_stVectorValue(n) ((n)->stVectorValue)
|
||||
#define M_tduGetSetParam_hWayPoint(n) ((n)->m_hWayPoint)
|
||||
#define M_GetSetParam_lZDMIdValue(n) M_GetSetParam_lValue(n)
|
||||
#define M_tduGetSetParam_hLipsSynchro(n) ((n)->hLipsSynchro)
|
||||
#define M_tduGetSetParam_hFamily(n) ((n)->hFamily)
|
||||
#define M_tduGetSetParam_hObjectTable(n) ((n)->hObjectTable)
|
||||
#define M_tduGetSetParam_hSuperObject(n) ((n)->hSuperObject)
|
||||
#define M_tduGetSetParam_pSoundEvent(n) ((n)->pSoundEvent)
|
||||
#define M_tduGetSetParam_pComport(n) ((n)->pComport)
|
||||
#define M_tduGetSetParam_hText(n) ((n)->hText)
|
||||
#define M_tduGetSetParam_hParticleGenerator(n) ((n)->hParticleGenerator)
|
||||
#define M_tduGetSetParam_hGameMaterial(n) ((n)->hGameMaterial)
|
||||
#define M_tduGetSetParam_p_stModel(n) ((n)->p_stModel)
|
||||
|
||||
#define M_tduGetSetParam_ColorValue(n) RGBA_Color(M_tduGetSetParam_Color(n))
|
||||
#define M_tduGetSetParam_Color(n) ((n)->ColorValue)
|
||||
#define M_tduGetSetParam_RedValue(n) RGBA_Red(M_tduGetSetParam_Color(n))
|
||||
#define M_tduGetSetParam_GreenValue(n) RGBA_Green(M_tduGetSetParam_Color(n))
|
||||
#define M_tduGetSetParam_BlueValue(n) RGBA_Blue(M_tduGetSetParam_Color(n))
|
||||
#define M_tduGetSetParam_AlphaValue(n) RGBA_Alpha(M_tduGetSetParam_Color(n))
|
||||
#define M_tduGetSetParam_p_stLight(n) ((n)->p_stLight)
|
||||
#define M_tduGetSetParam_ubf32Caps(n) ((n)->ulValue)
|
||||
#define M_tduGetSetParam_hGraph(n) ((n)->hGraph)
|
||||
#define M_tduGetSetParam_p_stMacro(n) ((n)->p_stMacro)
|
||||
|
||||
#if !defined(U64) /**** DR ****/
|
||||
#define M_tduGetSetParam_wValue(n) ((n)->wValue)
|
||||
#define M_tduGetSetParam_uwValue(n) ((n)->uwValue)
|
||||
#define M_tduGetSetParam_cValue(n) ((n)->cValue)
|
||||
#define M_tduGetSetParam_ucValue(n) ((n)->ucValue)
|
||||
#define M_tduGetSetParam_bf7Value(n) ((n)->bf7Value)
|
||||
#define M_tduGetSetParam_bf6Value(n) ((n)->bf6Value)
|
||||
#define M_tduGetSetParam_bf5Value(n) ((n)->bf5Value)
|
||||
#define M_tduGetSetParam_bf4Value(n) ((n)->bf4Value)
|
||||
#define M_tduGetSetParam_bf3Value(n) ((n)->bf3Value)
|
||||
#define M_tduGetSetParam_bf2Value(n) ((n)->bf2Value)
|
||||
#define M_tduGetSetParam_bf1Value(n) ((n)->bf1Value)
|
||||
#define M_tduGetSetParam_xMaskValue(n) ((n)->xMask)
|
||||
#else /* U64 *** DR ****/
|
||||
#define M_tduGetSetParam_wValue(n) ((short)((n)->lValue))
|
||||
#define M_tduGetSetParam_uwValue(n) ((unsigned short)((n)->lValue))
|
||||
#define M_tduGetSetParam_cValue(n) ((char)((n)->lValue))
|
||||
#ifdef CODEWARRIOR
|
||||
#define M_tduGetSetParam_ucValue(n) ((n)->lValue)
|
||||
#else
|
||||
#define M_tduGetSetParam_ucValue(n) ((unsigned char)((n)->lValue))
|
||||
#endif
|
||||
#define M_tduGetSetParam_bf7Value(n) ((unsigned char)((n)->lValue))
|
||||
#define M_tduGetSetParam_bf6Value(n) ((unsigned char)((n)->lValue))
|
||||
#define M_tduGetSetParam_bf5Value(n) ((unsigned char)((n)->lValue))
|
||||
#define M_tduGetSetParam_bf4Value(n) ((unsigned char)((n)->lValue))
|
||||
#define M_tduGetSetParam_bf3Value(n) ((unsigned char)((n)->lValue))
|
||||
#define M_tduGetSetParam_bf2Value(n) ((unsigned char)((n)->lValue))
|
||||
#define M_tduGetSetParam_bf1Value(n) ((unsigned char)((n)->lValue))
|
||||
#ifdef CODEWARRIOR
|
||||
#define M_tduGetSetParam_xMaskValue(n) ((n)->lValue)
|
||||
#else
|
||||
#define M_tduGetSetParam_xMaskValue(n) ((GMT_tdxMask)((n)->lValue))
|
||||
#endif
|
||||
#endif /* U64 *** DR ****/
|
||||
|
||||
|
||||
|
||||
/* for U64*/
|
||||
typedef struct tdstGetSetParam_
|
||||
{
|
||||
#if defined(U64)
|
||||
/* dummy indirection as in tdstNodeInterpret_*/
|
||||
union
|
||||
{
|
||||
#endif
|
||||
union tduGetSetParam_ uParam;
|
||||
#if defined(U64)
|
||||
} uDummy; /* must be the same name as in tdstNodeInterpret_ definition*/
|
||||
#endif
|
||||
enum tdeVariableType_ eType;
|
||||
} tdstGetSetParam;
|
||||
|
||||
/* in order to access fields of tdstGetSetParam structure : use these macros instead*/
|
||||
#if defined(U64)
|
||||
#define M_GetSetParam_Param(n) (&((n)->uDummy.uParam))
|
||||
#else
|
||||
#define M_GetSetParam_Param(n) (&((n)->uParam))
|
||||
#endif
|
||||
|
||||
#define M_GetSetParam_Type(n) ((n)->eType)
|
||||
#define M_GetSetParam_Clear(n) M_tduGetSetParam_Clear(M_GetSetParam_Param(n));M_GetSetParam_Type(n)=E_vt_None;
|
||||
|
||||
#define M_GetSetParam_szString(n) M_tduGetSetParam_szString(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_xValue(n) M_tduGetSetParam_xValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_lValue(n) M_tduGetSetParam_lValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_ulValue(n) M_tduGetSetParam_ulValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_wValue(n) M_tduGetSetParam_wValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_uwValue(n) M_tduGetSetParam_uwValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_cValue(n) M_tduGetSetParam_cValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_ucValue(n) M_tduGetSetParam_ucValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_bf7Value(n) M_tduGetSetParam_bf7Value(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_bf6Value(n) M_tduGetSetParam_bf6Value(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_bf5Value(n) M_tduGetSetParam_bf5Value(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_bf4Value(n) M_tduGetSetParam_bf4Value(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_bf3Value(n) M_tduGetSetParam_bf3Value(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_bf2Value(n) M_tduGetSetParam_bf2Value(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_bf1Value(n) M_tduGetSetParam_bf1Value(M_GetSetParam_Param(n))
|
||||
/* ANNECY MT - 12/04/99 { */
|
||||
#if defined(__DEBUG_AI__)
|
||||
#define M_GetSetParam_p_stSupObjValue(n) (M_tduGetSetParam_p_stEngObjValue(M_GetSetParam_Param(n)) ? M_GetSuperObject(M_tduGetSetParam_p_stEngObjValue(M_GetSetParam_Param(n))) : NULL)
|
||||
#else
|
||||
#define M_GetSetParam_p_stSupObjValue(n) M_GetSuperObject(M_tduGetSetParam_p_stEngObjValue(M_GetSetParam_Param(n)))
|
||||
#endif /* __DEBUG_AI__ */
|
||||
/* END ANNECY MT } */
|
||||
#define M_GetSetParam_p_stEngineObjValue(n) M_tduGetSetParam_p_stEngObjValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_lPersoId(n) M_GetSetParam_lValue(n)
|
||||
#define M_GetSetParam_ActionReturnValue(n) M_GetSetParam_lValue(n)
|
||||
#define M_GetSetParam_ActionValue(n) M_tduGetSetParam_HandleToState(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_lZdxId(n) M_GetSetParam_lValue(n)
|
||||
#define M_GetSetParam_stVertexValue(n) M_GetSetParam_stVectorValue(n)
|
||||
#define M_GetSetParam_p_stVectorValue(n) M_tduGetSetParam_p_stVectorValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_stVectorValue(n) M_tduGetSetParam_stVectorValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_WayPointValue(n) M_tduGetSetParam_hWayPoint(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_lModuleValue(n) M_GetSetParam_lValue(n)
|
||||
#define M_GetSetParam_lDsgVarIdValue(n) M_GetSetParam_lValue(n)
|
||||
#define M_GetSetParam_xMaskValue(n) M_tduGetSetParam_xMaskValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_ulTimeValue(n) M_GetSetParam_ulValue(n)
|
||||
#define M_GetSetParam_hLipsSynchro(n) M_tduGetSetParam_hLipsSynchro(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_hFamily(n) M_tduGetSetParam_hFamily(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_hObjectTable(n) M_tduGetSetParam_hObjectTable(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_SuperObjectValue(n) M_tduGetSetParam_hSuperObject(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_SectorValue(n) M_GetSetParam_SuperObjectValue(n)
|
||||
#define M_GetSetParam_DNMLimbTypeValue(n) M_GetSetParam_lValue(n)
|
||||
#define M_GetSetParam_SoundEvent(n) M_tduGetSetParam_pSoundEvent(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_pComport(n) M_tduGetSetParam_pComport(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_hText(n) M_tduGetSetParam_hText(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_hParticleGenerator(n) M_tduGetSetParam_hParticleGenerator(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_hGameMaterial(n) M_tduGetSetParam_hGameMaterial(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_p_stModel(n) M_tduGetSetParam_p_stModel(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_Color(n) M_tduGetSetParam_Color(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_ColorValue(n) M_tduGetSetParam_ColorValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_RedValue(n) M_tduGetSetParam_RedValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_GreenValue(n) M_tduGetSetParam_GreenValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_BlueValue(n) M_tduGetSetParam_BlueValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_AlphaValue(n) M_tduGetSetParam_AlphaValue(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_LightValue(n) M_tduGetSetParam_p_stLight(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_CapsValue(n) M_tduGetSetParam_ubf32Caps(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_GraphValue(n) M_tduGetSetParam_hGraph(M_GetSetParam_Param(n))
|
||||
#define M_GetSetParam_p_stMacroValue(n) M_tduGetSetParam_p_stMacro(M_GetSetParam_Param(n))
|
||||
|
||||
/* in order to access to designer variables*/
|
||||
/* WARNING : must follow C_TYPEOf.... constants defined in DsgMem.h*/
|
||||
#define M_GetSetParam_Dsg_Boolean(n) M_GetSetParam_cValue(n)
|
||||
#define M_GetSetParam_Dsg__128To127(n) M_GetSetParam_cValue(n)
|
||||
#define M_GetSetParam_Dsg_0To255(n) M_GetSetParam_ucValue(n)
|
||||
#define M_GetSetParam_Dsg__32768To32767(n) M_GetSetParam_wValue(n)
|
||||
#define M_GetSetParam_Dsg_0To65535(n) M_GetSetParam_uwValue(n)
|
||||
#define M_GetSetParam_Dsg_Integer(n) M_GetSetParam_lValue(n)
|
||||
#define M_GetSetParam_Dsg_PositiveInteger(n) M_GetSetParam_ulValue(n)
|
||||
#define M_GetSetParam_Dsg_Float(n) M_GetSetParam_xValue(n)
|
||||
#define M_GetSetParam_Dsg_Perso(n) M_GetSetParam_lPersoId(n)
|
||||
#define M_GetSetParam_Dsg_PersoInList(n) M_GetSetParam_cValue(n)
|
||||
#define M_GetSetParam_Dsg_List(n) M_GetSetParam_lValue(n)
|
||||
#define M_GetSetParam_Dsg_WayPoint(n) M_GetSetParam_WayPointValue(n)
|
||||
#define M_GetSetParam_Dsg_Vector(n) (&M_GetSetParam_stVectorValue(n))
|
||||
#define M_GetSetParam_Dsg_Comport(n) M_GetSetParam_pComport(n)
|
||||
#define M_GetSetParam_Dsg_Action(n) M_GetSetParam_ActionValue(n)
|
||||
#define M_GetSetParam_Dsg_Text(n) M_GetSetParam_hText(n)
|
||||
#define M_GetSetParam_Dsg_GameMaterial(n) M_GetSetParam_hGameMaterial(n)
|
||||
#define M_GetSetParam_Dsg_Caps(n) M_GetSetParam_CapsValue(n)
|
||||
#define M_GetSetParam_Dsg_Graph(n) M_GetSetParam_GraphValue(n)
|
||||
|
||||
/* in order to choose between lValue or xValue */
|
||||
#define M_ReturnParam_lValue(n) \
|
||||
( \
|
||||
(M_GetSetParam_Type(n)==E_vt_Float) \
|
||||
? ( MTH_M_xRealToLong(M_GetSetParam_xValue(n)) ) \
|
||||
: ( M_GetSetParam_lValue(n) ) \
|
||||
)
|
||||
|
||||
#define M_ReturnParam_xValue(n) \
|
||||
( \
|
||||
(M_GetSetParam_Type(n)==E_vt_Float) \
|
||||
? ( M_GetSetParam_xValue(n) ) \
|
||||
: ( MTH_M_xLongToReal(M_GetSetParam_lValue(n)) ) \
|
||||
)
|
||||
|
||||
/* in order to simplify affectation during interpretation*/
|
||||
#define M_Full_GetSetParam_Integer(p_stValue,lValue) \
|
||||
M_GetSetParam_lValue(p_stValue)=(long) (lValue); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Integer;
|
||||
|
||||
#define M_Full_GetSetParam_Float(p_stValue,xValue) \
|
||||
M_GetSetParam_xValue(p_stValue)=(xValue); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Float;
|
||||
|
||||
#define M_Full_GetSetParam_ActionReturn(p_stValue,ucActionReturn) \
|
||||
M_GetSetParam_ActionReturnValue(p_stValue)=(ucActionReturn); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_MetaActionReturn;
|
||||
|
||||
#define M_Full_GetSetParam_Perso(p_stValue,pPerso) \
|
||||
M_GetSetParam_p_stEngineObjValue(p_stValue) = ((pPerso==NULL)?NULL:M_GetEngineObject(pPerso)); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Perso;
|
||||
|
||||
/* ANNECY OA - 05/08/99 { */
|
||||
#ifndef U64
|
||||
#define M_Full_GetSetParam_SuperObject(p_stValue,pSuperObject) \
|
||||
M_GetSetParam_SuperObjectValue(p_stValue) = (pSuperObject); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_SuperObject;
|
||||
#endif
|
||||
/* END ANNECY OA } */
|
||||
|
||||
#define M_Full_GetSetParam_hLipsSynchro(p_stValue,hLipsSynchro) \
|
||||
M_GetSetParam_hLipsSynchro(p_stValue) = hLipsSynchro; \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_LipsSynchro;
|
||||
|
||||
#define M_Full_GetSetParam_hObjectTable(p_stValue,hObjectTable) \
|
||||
M_GetSetParam_hObjectTable(p_stValue) = hObjectTable; \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_ObjectTable;
|
||||
|
||||
#define M_Full_GetSetParam_hFamily(p_stValue,hFamily) \
|
||||
M_GetSetParam_hFamily(p_stValue) = hFamily; \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Family;
|
||||
|
||||
#define M_Full_GetSetParam_p_stVertex(p_stValue,p_stVertex) \
|
||||
MTH3D_M_vCopyVector(&M_GetSetParam_stVertexValue(p_stValue),p_stVertex); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Vector;
|
||||
|
||||
#define M_Full_GetSetParam_Button(p_stValue,lValue) \
|
||||
M_GetSetParam_lValue(p_stValue)=(long)(lValue); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Button;
|
||||
|
||||
#define M_Full_GetSetParam_List(p_stValue,lValue) \
|
||||
M_GetSetParam_Dsg_List(p_stValue)=(long) ((tdstList*) (lValue) ); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_List;
|
||||
|
||||
#define M_Full_GetSetParam_WayPoint(p_stValue,lWP)\
|
||||
M_GetSetParam_WayPointValue(p_stValue) = (lWP);\
|
||||
M_GetSetParam_Type(p_stValue) = E_vt_WayPoint;
|
||||
|
||||
#define M_Full_GetSetParam_Module(p_stValue,lModule) \
|
||||
M_GetSetParam_lModuleValue(p_stValue)=(long) (lModule); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Module;
|
||||
|
||||
#define M_Full_GetSetParam_DsgVarId(p_stValue,lDsgVarId) \
|
||||
M_GetSetParam_lDsgVarIdValue(p_stValue)=(long) (lDsgVarId); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_DsgVarId;
|
||||
|
||||
#define M_Full_GetSetParam_String(p_stValue, szString) \
|
||||
M_GetSetParam_szString(p_stValue) = (szString); \
|
||||
M_GetSetParam_Type(p_stValue) = E_vt_String;
|
||||
|
||||
#define M_Full_GetSetParam_Mask(p_stValue,xMask) \
|
||||
M_GetSetParam_lValue(p_stValue) = (long) (xMask); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Mask;
|
||||
|
||||
#define M_Full_GetSetParam_Time(p_stValue,ulValue) \
|
||||
M_GetSetParam_ulTimeValue(p_stValue)=(unsigned long) (ulValue); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_PositiveInteger;
|
||||
|
||||
#define M_Full_GetSetParam_SoundEvent(p_stValue,pSndEvent) \
|
||||
M_GetSetParam_SoundEvent(p_stValue)=(pSndEvent); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_SoundEvent;
|
||||
|
||||
#define M_Full_GetSetParam_pComport(p_stValue,pComport) \
|
||||
M_GetSetParam_pComport(p_stValue)=(pComport); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Comport;
|
||||
|
||||
#define M_Full_GetSetParam_Action(p_stValue,hAction) \
|
||||
M_GetSetParam_ActionValue(p_stValue)=(hAction); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Action;
|
||||
|
||||
#define M_Full_GetSetParam_hText(p_stValue,hText) \
|
||||
M_GetSetParam_hText(p_stValue)=(hText); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Text;
|
||||
|
||||
#define M_Full_GetSetParam_hParticleGenerator(p_stValue,hParticleGenerator) \
|
||||
M_GetSetParam_hParticleGenerator(p_stValue)=(hParticleGenerator); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_ParticleGenerator;
|
||||
|
||||
#define M_Full_GetSetParam_hGameMaterial(p_stValue, hGameMaterial) \
|
||||
M_GetSetParam_hGameMaterial(p_stValue)=(hGameMaterial); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_GameMaterial;
|
||||
|
||||
#define M_Full_GetSetParam_ColorValue(p_stValue,ColorValue) \
|
||||
M_GetSetParam_ColorValue(p_stValue)=(long) (ColorValue); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Color;
|
||||
|
||||
#define M_Full_GetSetParam_p_stModel(p_stValue,ModelValue) \
|
||||
M_GetSetParam_p_stModel(p_stValue)=(AI_tdstAIModel*) (ModelValue); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Model;
|
||||
|
||||
#define M_Full_GetSetParam_Light(p_stValue,LightValue) \
|
||||
M_GetSetParam_LightValue(p_stValue)=(LightValue); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Light;
|
||||
|
||||
#define M_Full_GetSetParam_Caps(p_stValue, CapsValue) \
|
||||
M_GetSetParam_CapsValue(p_stValue)=(CapsValue); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Caps;
|
||||
|
||||
#define M_Full_GetSetParam_Graph(p_stValue, GraphValue) \
|
||||
M_GetSetParam_GraphValue(p_stValue)=(GraphValue); \
|
||||
M_GetSetParam_Type(p_stValue)=E_vt_Graph;
|
||||
|
||||
#define M_IsFloatType(p_stParam) (M_GetSetParam_Type((p_stParam))==E_vt_Float)
|
||||
#define M_IsVectorType(p_stParam) (M_GetSetParam_Type((p_stParam))==E_vt_Vector)
|
||||
|
||||
|
||||
#endif /* __GETSET_PARAM_H__ */
|
||||
|
||||
|
39
Rayman_X/cpa/public/AI/AIBase/Getset.h
Normal file
39
Rayman_X/cpa/public/AI/AIBase/Getset.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* create : 23/10/96 Olivier Couvreur */
|
||||
/* modify : 30/10/96 Olivier Couvreur */
|
||||
/* 970115 : Field Position in perso (Fabien Morales)*/
|
||||
/* 970120 : Field ComportOnGeneration in perso (Fabien Morales)*/
|
||||
/* 970128 : Fields from the AimData structure (Fabien Morales)*/
|
||||
/* 970731 : Script & Editor Names + Lint (Olivier Couvreur)*/
|
||||
/* modify : Olivier Couvreur*/
|
||||
/* date : 18/02/1997 CPA_EXPORT + new functions for editor*/
|
||||
/* modify : Olivier Couvreur 25/03/1997 ACTIVE_EDITOR support*/
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(__GET_SET_H__)
|
||||
#define __GET_SET_H__
|
||||
|
||||
/**************************************/
|
||||
#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
|
||||
|
||||
/*******************************************************************************/
|
||||
|
||||
/* get set functions */
|
||||
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucSetFieldValue(enum tdeFieldId_ eFieldId, HIE_tdxHandleToSuperObject hSuperObjPerso, struct tdstGetSetParam_ *p_stGetSetParam);
|
||||
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucGetFieldValue(enum tdeFieldId_ eFieldId, HIE_tdxHandleToSuperObject hSuperObjPerso, struct tdstGetSetParam_ *p_stGetSetParam);
|
||||
|
||||
/*******************************************************************************/
|
||||
#undef EXTERN_AI_DLL
|
||||
|
||||
#endif
|
101
Rayman_X/cpa/public/AI/AIBase/List.h
Normal file
101
Rayman_X/cpa/public/AI/AIBase/List.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* list.h : perso list for AI.*/
|
||||
/* author : Olivier Couvreur 28/11/1997*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(__LIST_H__)
|
||||
#define __LIST_H__
|
||||
|
||||
/* Function Prototypes for List of perso*/
|
||||
/*///////////////////////////////////////*/
|
||||
#define C_ucSizeOfMinimalList 2
|
||||
#define C_ucSizeOfMaximalList 30 /* the biggest list can have only C_ucSizeOfMaximalList */
|
||||
#define C_ucEndOfList 255
|
||||
|
||||
#define C_TypeOfPersoInList HIE_tdxHandleToSuperObject
|
||||
#define C_SizeOfPersoInList (sizeof (C_TypeOfPersoInList))
|
||||
|
||||
#define C_TypeOfList1 struct tdstList1_
|
||||
#define C_SizeOfList1 (sizeof (C_TypeOfList1))
|
||||
|
||||
/* Macros*/
|
||||
/*************/
|
||||
#define M_Min(a,b) (((a)>(b)) ? (b) : (a))
|
||||
|
||||
/* Macros for List of perso*/
|
||||
/*//////////////////////////*/
|
||||
#define M_bListEmptyTest(p_List) (((p_List)->ucNbElt) == 0)
|
||||
|
||||
#define M_ucNbEltInList(p_List) ((p_List)->ucNbElt)
|
||||
#define M_ucGetMaxSizeOfList(p_List) ((p_List)->ucMaxSize)
|
||||
|
||||
#define M_ClearList(p_List) (p_List)->ucNbElt = 0;
|
||||
|
||||
#define M_InitList(p_List, ucNbEltMax) \
|
||||
{\
|
||||
M_ClearList(p_List);\
|
||||
(p_List)->ucMaxSize = ucNbEltMax;\
|
||||
}
|
||||
|
||||
/*Only for debug !!y!!*/
|
||||
#define M_Init3List(p_List) (p_List)->ucNbElt = 3;
|
||||
|
||||
/*Scan every perso in a list in order to read or modif the list.*/
|
||||
#define M_InitScanList(p_List, p_p_Perso) p_p_Perso=p_List->d_TabElt
|
||||
#define M_EndingCondScanList(p_List, p_p_Perso) (p_p_Perso < (p_List->d_TabElt + p_List->ucNbElt))
|
||||
#define M_GoNextScanList(p_List, p_p_Perso) p_p_Perso++
|
||||
|
||||
/* Types & structures for List of perso*/
|
||||
/*//////////////////////////////////////*/
|
||||
/*tdePosInList is used for the fn_ListChoice function.*/
|
||||
typedef enum tdePosInList_{
|
||||
E_pil_First,/*we want to get the first elements in shorted list.*/
|
||||
E_pil_Last,/*we want to get the last elements in shorted list.*/
|
||||
E_pil_StartedPos,/*we want to get the elements beginning at a specific position. Here we want to start with the second elemenent.*/
|
||||
E_pil_StartedPos3,/*we want to get the elements beginning at the third position.*/
|
||||
E_pil_StartedPosMAx = (255+2/*minimal position*/-E_pil_StartedPos)/*we want to get the elements beginning at the third position.*/
|
||||
}tdePosInList;
|
||||
|
||||
typedef char Bool;
|
||||
|
||||
typedef struct tdstList1_ {
|
||||
unsigned char ucNbElt;
|
||||
unsigned char ucMaxSize;
|
||||
HIE_tdxHandleToSuperObject d_TabElt[1];
|
||||
} tdstList1;/* used to know the size of the a list with one element*/
|
||||
|
||||
typedef struct tdstList_ {
|
||||
unsigned char ucNbElt;
|
||||
unsigned char ucMaxSize;
|
||||
HIE_tdxHandleToSuperObject d_TabElt[C_ucSizeOfMaximalList];
|
||||
} tdstList;/* use for every list pointer, easy to watch all element in debug mode*/
|
||||
|
||||
|
||||
void fn_vPutInList (tdstList *p_List, HIE_tdxHandleToSuperObject p_Perso);
|
||||
void fn_vInsertPersoAtPositionInList (tdstList *p_List, HIE_tdxHandleToSuperObject p_Perso, unsigned char ucPosition);
|
||||
Bool fn_bFindPersoInList(tdstList *p_List, HIE_tdxHandleToSuperObject p_Perso);
|
||||
Bool fn_bFindModelInList(tdstList *p_List, AI_tdstAIModel *_p_stModel);
|
||||
Bool fn_bFindFamilyInList(tdstList *p_List, tdxHandleToFamilyList hFamily);
|
||||
Bool fn_bFindPersoAndDeleteInList (tdstList *p_List, HIE_tdxHandleToSuperObject p_Perso);
|
||||
HIE_tdxHandleToSuperObject fn_p_stGetPersoInList(tdstList *p_List, unsigned char ucPosition);
|
||||
void fn_vDeletePersoAtPositionInList (tdstList *p_List, unsigned char ucPosition);
|
||||
void fn_vSortListByFamily(tdstList *p_List, tdxHandleToFamilyList hFamily);
|
||||
void fn_vSortListByModel(tdstList *p_List, AI_tdstAIModel *_p_stModel);
|
||||
void fn_vUnionList (tdstList *p_ListA, tdstList *p_ListB, tdstList *p_ListC);
|
||||
void fn_vInterList (tdstList *p_ListA, tdstList *p_ListB, tdstList *p_ListC);
|
||||
void fn_vDiffList (tdstList *p_ListA, tdstList *p_ListB, tdstList *p_ListC);
|
||||
void fn_vAddList (tdstList *p_ListA, tdstList *p_ListB);
|
||||
void fn_v_InitList(tdstList *p_List);
|
||||
void fn_v_Init3List(tdstList *p_List);/*!!y!!*/
|
||||
|
||||
void fn_vAffectZddInList(tdstList *, HIE_tdxHandleToSuperObject, unsigned char, ACP_tdxIndex);
|
||||
void fn_vAffectZdeInList(tdstList *, HIE_tdxHandleToSuperObject, unsigned char, ACP_tdxIndex, GMT_tdxMask uwMask);
|
||||
void fn_vAffectTypeZdeWithTypeZdeInList(tdstList *, HIE_tdxHandleToSuperObject, GMT_tdxMask xPersoMask, GMT_tdxMask xOthersMask);
|
||||
|
||||
unsigned char fn_ucAtLeastOnePersoInZdd(HIE_tdxHandleToSuperObject p_stPerso, unsigned char ucModulOrCharact, ACP_tdxIndex xZoneId);
|
||||
unsigned char fn_ucAtLeastOnePersoInZde(HIE_tdxHandleToSuperObject p_stPerso, unsigned char ucModulOrCharact, ACP_tdxIndex xZoneId, GMT_tdxMask xMask);
|
||||
|
||||
struct tdstNodeInterpret_ * fn_p_stListSelect(tdstList * p_List, char b_cInverse, struct tdstNodeInterpret_ *p_stTree/*, struct tdstGetSetParam_ * p_stParam*/);
|
||||
struct tdstNodeInterpret_ * fn_p_stListSort (tdstList * p_List, unsigned char ucWantedNbElt, char b_cIncrease, struct tdstNodeInterpret_ *p_stTree/*, struct tdstGetSetParam_ * p_stParam*/);
|
||||
|
||||
#endif
|
73
Rayman_X/cpa/public/AI/AIBase/ReadRule.h
Normal file
73
Rayman_X/cpa/public/AI/AIBase/ReadRule.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* ReadFile.h : Manage the reading of script file.*/
|
||||
/* auteur : Olivier Didelot.*/
|
||||
/* date : 29/08/1996*/
|
||||
/* 18/2/97 modify Olivier Couvreur : C_...String for Editor*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#if !defined(__READRULE_H__)
|
||||
#define __READRULE_H__
|
||||
|
||||
/*////////////////////*/
|
||||
/* Global Variables //*/
|
||||
/*////////////////////*/
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
#if !defined(__DeclareGlobalVariableReadRule_h__)
|
||||
#define EXTERN extern
|
||||
#else
|
||||
#define EXTERN
|
||||
#endif /*__DeclareGlobalVariableReadRule_h__*/
|
||||
|
||||
#if defined(AI_USE_SCRIPT)
|
||||
EXTERN SCR_tdst_Link_Table g_stMacroLinkTable;
|
||||
EXTERN SCR_tdst_Link_Table g_stComportLinkTable;
|
||||
EXTERN SCR_tdst_Link_Table g_stModelLinkTable;
|
||||
EXTERN SCR_tdst_Link_Table g_stDsgVarLinkTable;
|
||||
EXTERN SCR_tdst_Link_Table g_stDefinesLinkTable;
|
||||
/*ANNECY CT 22/01/98*/
|
||||
EXTERN SCR_tdst_Link_Table gs_stLightLinkTable;
|
||||
/*ENDANNECY CT}*/
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
|
||||
void fn_vReadAIDefines(char *szDefineFilename);
|
||||
|
||||
#define M_DEFINE_NODE(a,b,c)
|
||||
#include "DefNode.h"
|
||||
#undef M_DEFINE_NODE
|
||||
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
/* Macros definition.*/
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
#define M_IsScriptAIReference(szWord) (!stricmp(szWord, C_ScriptAIReferenceString))
|
||||
|
||||
/* For the AIModel.*/
|
||||
#define M_IsIntellAIModel(szWord) (!stricmp(szWord, C_CreateIntellAIModel_String))
|
||||
#define M_IsReflexAIModel(szWord) (!stricmp(szWord, C_CreateReflexAIModel_String))
|
||||
#define M_IsVariableDeclarationAIModel(szWord) (!stricmp(szWord, C_CreateVariableDeclarationAIModel_String))
|
||||
#define M_IsMacroAIModel(szWord) (!stricmp(szWord, C_CreateMacroAIModel_String))
|
||||
|
||||
/* For .DEC (SAI + OTI)*/
|
||||
#define M_IsTypeSaveVariable(szWord) (!stricmp(szWord, C_TypeSaveVariables_String))
|
||||
#define M_IsTypeInitVariable(szWord) (!stricmp(szWord, C_TypeInitVariables_String))
|
||||
|
||||
/* For DEFINES.AI*/
|
||||
#define M_IsConstantRef(szWord) (!stricmp(szWord, C_ConstantRefString))
|
||||
#define M_IsRealRef(szWord) (!stricmp(szWord, C_RealRefString))
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
/* Functions definition.*/
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
/* cf AI_proto.h*/
|
||||
|
||||
#endif /*__READRULE_H__*/
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
437
Rayman_X/cpa/public/AI/AIBase/StrIntel.h
Normal file
437
Rayman_X/cpa/public/AI/AIBase/StrIntel.h
Normal file
@@ -0,0 +1,437 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Strintel.h : data structures for intelligency engine*/
|
||||
/* auteur : Olivier Didelot.*/
|
||||
/* date : 08/08/1996*/
|
||||
/* modifications majeures : * 12/1996 O.C.*/
|
||||
/* 970115 : Vector management (Fabien Morales)*/
|
||||
/* 970120 : minor changes (O.C.)*/
|
||||
/* January 28,1997 Adding Way and Waypoints management*/
|
||||
/* 970212 : Module & DsgVarId node types (Fabien Morales)*/
|
||||
/* modify : Olivier Couvreur 18/02/97 CPA_EXPORT + new functions for editor*/
|
||||
/* modify : Olivier Couvreur 05/03/97 Model can be gathered between several perso + Alloc and Free functions rewritten*/
|
||||
/* modify : Olivier Couvreur 25/03/97 NbNode is not an unsigned char anymore + NoComportInit support*/
|
||||
/* modify : Olivier Couvreur 25/05/97 ZDD + ZDD stuff*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(__STRINTEL_H__)
|
||||
#define __STRINTEL_H__
|
||||
|
||||
#include "GSParam.h"
|
||||
#ifdef USE_IPT_DX5
|
||||
#include "IPT_DX5.h" /* InPuT (absolutely before GAM.h)*/
|
||||
#else /* USE_IPT_WIN */
|
||||
#include "IPT.h" /* InPuT (absolutely before GAM.h)*/
|
||||
#endif /* USE_IPT_WIN */
|
||||
#include "specif/AIOption.h"
|
||||
|
||||
#if defined(U64)
|
||||
#include "AIGame/EnumAct.h" /* tables of action names*/
|
||||
#include "AIGame/EnumCond.h" /* tables of conditions names*/
|
||||
#include "AIGame/EnumKey.h" /* tables of keywords names*/
|
||||
#include "AIGame/EnumFunc.h" /* tables of functions names*/
|
||||
#include "AIGame/EnumOper.h" /* tables of operator*/
|
||||
#include "AIGame/EnumProc.h" /* tables of Procedure.*/
|
||||
#include "AIGame/EnumFild.h" /* tables of fields*/
|
||||
#endif
|
||||
|
||||
#if defined(REVERSE_RULES)
|
||||
#pragma message("*** REVERSE_RULES is defined ***");
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
/*#pragma message("*** Compiling in C++ for debug only ***")*/
|
||||
/*#pragma message("*** Remove /Tp in Settings (C/C++ Project Options) to compile in C ***")*/
|
||||
#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
|
||||
|
||||
/*******************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Macros for access to field of struct tdstTreeInterpret*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#if defined(OPTIMIZE_NB_NODES)
|
||||
#define M_GetNbNodeInterpret(p_Tree) fn_uwGetNbNodeInterpret((p_Tree))
|
||||
#define M_SetNbNodeInterpret(p_Tree, NNode)
|
||||
#define M_GetNodeInterpret(p_Tree) ((p_Tree)->p_stNodeInterpret)
|
||||
#else
|
||||
#define M_GetNbNodeInterpret(p_Tree) ((p_Tree)->uwNbNode)
|
||||
#define M_SetNbNodeInterpret(p_Tree, NNode) (M_GetNbNodeInterpret(p_Tree)=(NNode))
|
||||
#define M_GetNodeInterpret(p_Tree) ((p_Tree)->p_stNodeInterpret)
|
||||
#endif
|
||||
#define M_GetNodeInterpretN(p_Tree, NNode) (&(M_GetNodeInterpret(p_Tree)[NNode]))
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Macros for access to field of struct tdstMacro*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define M_GetMacroInitTree(p_stMacro) ((p_stMacro)->p_stInitTree)
|
||||
#define M_GetMacroCurrentTree(p_stMacro) ((p_stMacro)->p_stCurrentTree)
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Macros for access to field of struct tdstListOfMacro*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define M_GetNameMacro(p_stMacro) ((p_stMacro)->szName)
|
||||
#define M_GetMacro(p_stListMacro) ((p_stListMacro)->p_stMacro)
|
||||
#define M_GetMacroN(p_stListMacro, N) (M_GetMacro(p_stListMacro)+N)
|
||||
#define M_GetNbMacro(p_stListMacro) (p_stListMacro->ucNbMacro)
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Macros for access to field of struct tdstComport*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define M_GetNameComport(p_stComp) ((p_stComp)->szName)
|
||||
#define M_GetComportSchedule(p_stComp) ((p_stComp)->p_stSchedule)
|
||||
#define M_GetTreeComportSchedule(p_stComp) (M_GetNodeInterpret(M_GetComportSchedule(p_stComp)))
|
||||
#define M_GetComportRules(p_stComp) ((p_stComp)->p_stRules)
|
||||
#define M_GetComportRuleN(p_stComp, NRule) (&(M_GetComportRules(p_stComp)[NRule]))
|
||||
#define M_GetComportNbRules(p_stComp) ((p_stComp)->ucNbRules)
|
||||
#define M_GetComportNRules(p_stComp, N) ((p_stComp)[N].p_stRules)
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Macros for access to field of struct tdstScriptAI*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define M_GetScriptAINbComport(p_stScr) ((p_stScr)->ulNbComport)
|
||||
#define M_GetScriptAIComport(p_stScr) ((p_stScr)->p_stComport)
|
||||
#define M_GetScriptAIComportN(p_stScr, N) (&(M_GetScriptAIComport(p_stScr)[N]))
|
||||
#define M_GetScriptAIActionTableNbEntry(p_stScr) ((p_stScr)->ucActionTableNbEntry)
|
||||
#define M_GetScriptAINoComportInitDefault(p_stScr) ((p_stScr)->ulNoComportInitDefault)
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Macros for access to field of struct tdstIntelligence*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define M_GetCurrentComport(p_stInt) ((p_stInt)->p_stCurrentComport)
|
||||
#define M_GetPrevComport(p_stInt) ((p_stInt)->p_stPrevComport)
|
||||
#define M_GetRules(p_stInt) (M_GetComportRules(M_GetCurrentComport(p_stInt)))
|
||||
#define M_GetRuleN(p_stInt, NRule) (&(M_GetRules(p_stInt)[(NRule)]))
|
||||
#define M_GetNbRules(p_stInt) (M_GetComportNbRules(M_GetCurrentComport(p_stInt)))
|
||||
#define M_GetScriptAI(p_stInt) (*((p_stInt)->p_p_stScriptAI))
|
||||
#define M_GetNbComport(p_stInt) (M_GetScriptAINbComport(M_GetScriptAI(p_stInt)))
|
||||
#define M_GetComport(p_stInt) (M_GetScriptAIComport(M_GetScriptAI(p_stInt)))
|
||||
#define M_GetComportN(p_stInt, N) (M_GetScriptAIComportN(M_GetScriptAI(p_stInt), N))
|
||||
#define M_GetCurrentSchedule(p_stInt) ((p_stInt)->p_stCurrentSchedule)
|
||||
#define M_GetNoComportInit(p_stInt) ((p_stInt)->ulNoComportInit)
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Macros for access to field of struct tdstNodeInterpret*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define M_DepthInterpret(p_Tree) ((p_Tree)->ucDepth)
|
||||
|
||||
#if defined(__DEBUG_AI__)
|
||||
#define M_GetTypeInterpret(p_Tree) ((p_Tree)->eType)
|
||||
#define M_SetTypeInterpret(p_Tree,n) ((p_Tree)->eType)=(enum tdeTypeInterpret_) (n)
|
||||
#else
|
||||
#define M_GetTypeInterpret(p_Tree) (enum tdeTypeInterpret_) ((p_Tree)->eType)
|
||||
#define M_SetTypeInterpret(p_Tree,n) ((p_Tree)->eType)=(unsigned char) (n)
|
||||
#endif /* __DEBUG_AI__*/
|
||||
|
||||
#if defined(OPTIMIZE_SWAP_PARAMETER)
|
||||
#define M_NodeToSkip(p_Tree) ((p_Tree)->uwNodeToSkip)
|
||||
#endif /* OPTIMIZE_SWAP_PARAMETER*/
|
||||
|
||||
#if defined(U64)
|
||||
#define M_TypeUnionInterpret(p_Tree) (&((p_Tree)->uDummy.uId))
|
||||
#else
|
||||
#define M_TypeUnionInterpret(p_Tree) (&((p_Tree)->uId))
|
||||
#endif /* U64*/
|
||||
|
||||
#if defined(ACTIVE_AIDEBUG) /**** DR ****/
|
||||
#define M_GetBreakPoint(p_Tree) ((p_Tree)->bBreakPoint)
|
||||
#define M_SetBreakPoint(p_Tree,n) ((p_Tree)->bBreakPoint = (ACP_tdxBool)(n))
|
||||
#endif /*ACTIVE_AIDEBUG*/
|
||||
|
||||
#define M_eCondIdInterpret(p_Tree) (M_TypeUnionInterpret(p_Tree)->eCondId)
|
||||
#define M_eKeyWordIdInterpret(p_Tree) (M_TypeUnionInterpret(p_Tree)->eKeyWordId)
|
||||
#define M_eOperatorIdInterpret(p_Tree) (M_TypeUnionInterpret(p_Tree)->eOperatorId)
|
||||
#define M_eFuncIdInterpret(p_Tree) (M_TypeUnionInterpret(p_Tree)->eFuncId)
|
||||
#define M_eFieldIdInterpret(p_Tree) (M_TypeUnionInterpret(p_Tree)->eFieldId)
|
||||
#define M_eMetaActionIdInterpret(p_Tree) (M_TypeUnionInterpret(p_Tree)->eMetaActionId)
|
||||
#define M_hInputHandleIdInterpret(p_Tree) (M_TypeUnionInterpret(p_Tree)->hInputAction)
|
||||
#define M_eProcedureIdInterpret(p_Tree) (M_TypeUnionInterpret(p_Tree)->eProcedureId)
|
||||
#define M_szStringInterpret(p_Tree) (M_GetSetParam_szString(p_Tree))
|
||||
#define M_lValueInterpret(p_Tree) (M_GetSetParam_lValue(p_Tree))
|
||||
#define M_xValueInterpret(p_Tree) (M_GetSetParam_xValue(p_Tree))
|
||||
#define M_lPersoIdInterpret(p_Tree) (M_GetSetParam_lPersoId(p_Tree))
|
||||
#define M_lKeyLinkInterpret(p_Tree) (M_GetSetParam_lValue(p_Tree))
|
||||
#define M_p_stPersoRefInterpret(p_Tree) (M_GetSetParam_p_stEngineObjValue(p_Tree))
|
||||
#define M_ucVarIdInterpret(p_Tree) (M_GetSetParam_lValue(p_Tree))
|
||||
#define M_lZdxIdInterpret(p_Tree) (M_GetSetParam_lZdxId(p_Tree))
|
||||
#define M_p_stVectorInterpret(p_Tree) (M_GetSetParam_p_stVectorValue(p_Tree))
|
||||
#define M_lWayPointInterpret(p_Tree) (M_GetSetParam_WayPointValue(p_Tree))
|
||||
#define M_lModuleInterpret(p_Tree) (M_GetSetParam_lModuleValue(p_Tree))
|
||||
#define M_lDsgVarIdInterpret(p_Tree) (M_GetSetParam_lDsgVarIdValue(p_Tree))
|
||||
#define M_ActionInterpret(p_Tree) (M_GetSetParam_ActionValue(p_Tree))
|
||||
#define M_xMaskInterpret(p_Tree) (M_GetSetParam_xMaskValue(p_Tree))
|
||||
#define M_hLipSynchroHandleIdInterpret(p_Tree) (M_GetSetParam_hLipsSynchro(p_Tree))
|
||||
#define M_hFamilyHandleIdInterpret(p_Tree) (M_GetSetParam_hFamily(p_Tree))
|
||||
#define M_SuperObjectInterpret(p_Tree) (M_GetSetParam_SuperObjectValue(p_Tree))
|
||||
#define M_lChannelInterpret(p_Tree) (M_GetSetParam_lChannelValue(p_Tree))
|
||||
#define M_SoundEventInterpret(p_Tree) (M_GetSetParam_SoundEvent(p_Tree))
|
||||
#define M_ComportInterpret(p_Tree) (M_GetSetParam_pComport(p_Tree))
|
||||
#define M_TextInterpret(p_Tree) (M_GetSetParam_hText(p_Tree))
|
||||
#define M_ParticleGeneratorInterpret(p_Tree) (M_GetSetParam_hParticleGenerator(p_Tree))
|
||||
#define M_GameMaterialInterpret(p_Tree) (M_GetSetParam_hGameMaterial(p_Tree))
|
||||
#define M_ObjectTableInterpret(p_Tree) (M_GetSetParam_hObjectTable(p_Tree))
|
||||
#define M_ColorValueInterpret(p_Tree) (M_GetSetParam_ColorValue(p_Tree))
|
||||
#define M_p_stModelInterpret(p_Tree) (M_GetSetParam_p_stModel(p_Tree))
|
||||
#define M_ClearNodeInterpret(p_Tree) memset((void*) (p_Tree),0,sizeof(struct tdstNodeInterpret_));
|
||||
#define M_IsTheEndOfTree(p_Tree) (M_GetTypeInterpret(p_Tree) == E_ti_EndTree)
|
||||
#define M_p_stLightInterpret(p_Tree) (M_GetSetParam_LightValue(p_Tree))
|
||||
#define M_ulCapsInterpret(p_Tree) (M_GetSetParam_CapsValue(p_Tree))
|
||||
#define M_p_stGraphInterpret(p_Tree) (M_GetSetParam_GraphValue(p_Tree))
|
||||
#define M_p_stMacroInterpret(p_Tree) (M_GetSetParam_p_stMacroValue(p_Tree))
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Usefull misc. definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#if defined(__DEBUG_AI__)
|
||||
#define M_VerifyNbParamAction(p_stTree, NParam) \
|
||||
if (fn_ucGetTreeNbParam((p_stTree)) != NParam) \
|
||||
{ \
|
||||
M_AIFatalError(E_uwAIFatalWrongParamAction); \
|
||||
}
|
||||
|
||||
#define M_VerifyTypeOfParamAction(p_stParam, eType) \
|
||||
if (M_GetSetParam_Type(p_stParam) != eType) \
|
||||
{ \
|
||||
M_AIFatalError(E_uwAIFatalWrongTypeParamAction); \
|
||||
}
|
||||
|
||||
#define M_Verify2TypesOfParamAction(p_stParam, eType1, eType2) \
|
||||
if ( (M_GetSetParam_Type(p_stParam) != eType1) && (M_GetSetParam_Type(p_stParam) != eType2) ) \
|
||||
{ \
|
||||
M_AIFatalError(E_uwAIFatalWrongTypeParamAction); \
|
||||
}
|
||||
#else
|
||||
#define M_VerifyNbParamAction(p_stTree, NParam)
|
||||
#define M_VerifyTypeOfParamAction(p_stParam, eType)
|
||||
#define M_Verify2TypesOfParamAction(p_stParam, eType1, eType2)
|
||||
#endif /* __DEBUG_AI__*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Structures definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "EnumType.h"
|
||||
|
||||
typedef union tduIdInterpret_
|
||||
{
|
||||
enum tdeCondId_ eCondId;
|
||||
enum tdeKeyWordId_ eKeyWordId;
|
||||
enum tdeOperatorId_ eOperatorId;
|
||||
enum tdeFuncId_ eFuncId;
|
||||
enum tdeProcedureId_ eProcedureId;
|
||||
enum tdeFieldId_ eFieldId;
|
||||
enum tdeMetaActionId_ eMetaActionId;
|
||||
IPT_tdxHandleToEntryElement hInputAction;
|
||||
} tduIdInterpret;
|
||||
|
||||
typedef struct tdstNodeInterpret_
|
||||
{
|
||||
union
|
||||
{
|
||||
union tduIdInterpret_ uId;
|
||||
union tduGetSetParamForNode_ uParam; /*this trick allow us to have sizeof(uParam)=4 instead of 12 : great for U64*/
|
||||
}
|
||||
#if defined(U64)
|
||||
uDummy
|
||||
#endif
|
||||
;
|
||||
/* this trick allow us to have sizeof(eType)=1 instead of 4 : it is benefit if we respect alignment : great for U64*/
|
||||
#if defined(__DEBUG_AI__)
|
||||
enum tdeTypeInterpret_ eType;
|
||||
#endif /* __DEBUG_AI__*/
|
||||
#if defined(OPTIMIZE_SWAP_PARAMETER)
|
||||
unsigned short uwNodeToSkip;
|
||||
#endif /* OPTIMIZE_SWAP_PARAMETER*/
|
||||
unsigned char ucDepth;
|
||||
#if !defined(__DEBUG_AI__)
|
||||
unsigned char eType;
|
||||
#endif
|
||||
#if defined(ACTIVE_AIDEBUG)
|
||||
ACP_tdxBool bBreakPoint; /**** DR ****/
|
||||
#endif /*ACTIVE_AIDEBUG*/
|
||||
|
||||
} tdstNodeInterpret;
|
||||
|
||||
typedef struct tdstTreeInterpret_
|
||||
{
|
||||
struct tdstNodeInterpret_ *p_stNodeInterpret;
|
||||
#if !defined(OPTIMIZE_NB_NODES)
|
||||
unsigned short uwNbNode; /* For debug*/
|
||||
#endif
|
||||
} tdstTreeInterpret;
|
||||
|
||||
typedef struct tdstMacro_
|
||||
{
|
||||
#if defined(__DEBUG_AI__)
|
||||
char szName[256];
|
||||
#endif
|
||||
struct tdstTreeInterpret_ *p_stInitTree;
|
||||
struct tdstTreeInterpret_ *p_stCurrentTree;
|
||||
} tdstMacro;
|
||||
|
||||
typedef struct tdstListOfMacro_
|
||||
{
|
||||
struct tdstMacro_ *p_stMacro;
|
||||
unsigned char ucNbMacro; /* For second pass.*/
|
||||
} tdstListOfMacro;
|
||||
|
||||
typedef struct tdstComport_
|
||||
{
|
||||
#if defined(__DEBUG_AI__)
|
||||
char szName[256];
|
||||
#endif
|
||||
struct tdstTreeInterpret_ *p_stRules;
|
||||
/* For Schedule.*/
|
||||
struct tdstTreeInterpret_ *p_stSchedule;
|
||||
//XB 05/08/99
|
||||
#ifndef D_THROW_CFAST_AI
|
||||
//End XB
|
||||
long CFast_lMyIndex;
|
||||
//XB 05/08/99
|
||||
#endif /* D_THROW_CFAST_AI */
|
||||
//End XB
|
||||
unsigned char ucNbRules;
|
||||
} tdstComport;
|
||||
|
||||
typedef struct tdstScriptAI_
|
||||
{
|
||||
struct tdstComport_ *p_stComport;
|
||||
unsigned long ulNbComport;
|
||||
unsigned long ulNoComportInitDefault;
|
||||
unsigned char ucActionTableNbEntry;
|
||||
} tdstScriptAI;
|
||||
|
||||
typedef struct tdstIntelligence_
|
||||
{
|
||||
struct tdstScriptAI_ **p_p_stScriptAI;
|
||||
struct tdstNodeInterpret_ *p_stCurrentSchedule;
|
||||
struct tdstComport_ *p_stCurrentComport;
|
||||
/* Current comport when we execute the last ChangeComport.*/
|
||||
struct tdstComport_ *p_stPrevComport;
|
||||
struct tdstActionTable_ *p_stActionTable;
|
||||
unsigned long ulNoComportInit;
|
||||
} tdstIntelligence;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Strintel.c functions*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/*EXTERN_AI_DLL CPA_EXPORT */
|
||||
void fn_vReinitComport(struct tdstIntelligence_ *p_stIntelligence);
|
||||
unsigned char fn_ucChangeComportIntell(struct tdstIntelligence_ *p_stIntelligence, struct tdstComport_ *p_stComport);
|
||||
|
||||
unsigned char fn_ucGetTreeNbParam(struct tdstNodeInterpret_ *p_stTree);
|
||||
|
||||
#if defined(OPTIMIZE_NB_NODES)
|
||||
EXTERN_AI_DLL CPA_EXPORT unsigned short fn_uwGetNbNodeInterpret(struct tdstTreeInterpret_ *p_stTree);
|
||||
#endif /* OPTIMIZE_NB_NODES*/
|
||||
|
||||
|
||||
/**************************************************************/
|
||||
/* AI init functions used by allocations */
|
||||
/**************************************************************/
|
||||
/*
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vInitComport(struct tdstComport_ *p_stComport);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vInitRule(struct tdstTreeInterpret_ *p_stRule);
|
||||
*/
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vInitNodeInterpret(struct tdstNodeInterpret_ *p_stNode, long lVal, enum tdeTypeInterpret_ eTypeInterpret, unsigned char ucDepth);
|
||||
|
||||
/*
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFullInitNodeInterpret(struct tdstIntelligence_ *p_stIntelligence,
|
||||
unsigned long ulNbComport,
|
||||
unsigned char ucNbRules,
|
||||
unsigned short uwNbNode,
|
||||
long lVal,
|
||||
enum tdeTypeInterpret_ eTypeInterpret,
|
||||
unsigned char ucDepth);
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************/
|
||||
/* AI allocation functions for macros : */
|
||||
/**************************************************************/
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vAllocListOfMacro(struct AI_tdstMind_ *p_stMind, unsigned char ucNbMacro);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vAllocNodeMacro(tdstMacro *p_stMacro, unsigned short ucNbNode);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstListOfMacro_ *fn_p_stAllocListOfMacro(unsigned char ucNbMacro);
|
||||
|
||||
/**************************************************************/
|
||||
/* AI allocation functions : */
|
||||
/**************************************************************/
|
||||
EXTERN_AI_DLL CPA_EXPORT struct AI_tdstAIModel_ *fn_p_stAllocAIModel();
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstScriptAI_ *fn_p_stAllocScriptAI(unsigned char ucActionTableNbEntry);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstIntelligence_ *fn_p_stAllocIntelligence(struct tdstScriptAI_ **p_p_stScriptAI,unsigned char ucActionTableNbEntry);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstActionTableEntry_ *fn_p_stAllocActionTableEntry(unsigned char ucActionTableEntry);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstActionTable_ *fn_p_stAllocActionTable(unsigned char ucActionTableNbEntry);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstComport_ *fn_p_stAllocComport(unsigned long ulNbComport);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstTreeInterpret_ *fn_p_stAllocRule(unsigned char ucNbRules);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstNodeInterpret_ *fn_p_stAllocNodeInterpret(unsigned short uwNbNode);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstTreeInterpret_ *fn_p_stAllocSchedule(unsigned short uwNbNode);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vCreateNodeString(struct tdstNodeInterpret_ *p_stNode, char *szString);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vCreateNodeVector(struct tdstNodeInterpret_ *p_stNode);
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
/**************************************************************/
|
||||
/* AI deallocation functions : */
|
||||
/**************************************************************/
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeNodeContent(struct tdstNodeInterpret_ *p_stNode);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeNodeInterpretAll(struct tdstNodeInterpret_ **p_p_stNode,unsigned short uwNbNodes);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeRuleContent(struct tdstTreeInterpret_ *p_stRules);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeRuleAll(struct tdstTreeInterpret_ **p_p_stRules,unsigned char ucNbRules);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeScheduleContent(struct tdstTreeInterpret_ *p_stSchedule);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeScheduleAll(struct tdstTreeInterpret_ **p_p_stSchedule);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeComportContent(struct tdstComport_ *p_stComport);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeComportAll(struct tdstComport_ **p_p_stComport,unsigned long ulNbComport);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeScriptAIContent(struct tdstScriptAI_ *p_stScriptAI);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeScriptAIAll(struct tdstScriptAI_ **p_p_stScriptAI);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeAIModelContent(struct AI_tdstAIModel_ *p_stAIModel);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeAIModelAll(struct AI_tdstAIModel_ **p_p_stAIModel);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeActionTableEntryContent(struct tdstActionTableEntry_ *p_stActionTableEntry);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeActionTableEntryAll(struct tdstActionTableEntry_ **p_p_stActionTableEntry,unsigned ucActionTableNbEntry);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeActionTableContent(struct tdstActionTable_ *p_stActionTable);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeActionTableAll(struct tdstActionTable_ **p_p_stActionTable);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeIntelligenceContent(struct tdstIntelligence_ *p_stIntelligence);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeIntelligenceAll(struct tdstIntelligence_ **p_p_stIntelligence);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeReflexAll(struct tdstIntelligence_ **p_p_stReflex);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeMindContent(struct AI_tdstMind_ *p_stMind);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeMindAll(struct AI_tdstMind_ **p_p_stMind);
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
|
||||
/*******************************************************************/
|
||||
/* AI allocation and deallocation functions for variable designer: */
|
||||
/*******************************************************************/
|
||||
/* allocations*/
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vAllocVariableDesigner(struct AI_tdstMind_ *p_stMind,unsigned long ulSizeDsgMem,unsigned char ucNbParam);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstDsgVarInfo_ *fn_p_stAllocDsgVarInfo(unsigned char ucNbDsgVar);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstDsgVar_ *fn_p_stAllocDsgVar(unsigned long ulSize,unsigned char ucNbDsgVar);
|
||||
EXTERN_AI_DLL CPA_EXPORT char *fn_p_cAllocDsgMemBuffer(unsigned long ulSize);
|
||||
EXTERN_AI_DLL CPA_EXPORT struct tdstDsgMem_ *fn_p_stAllocDsgMem(struct tdstDsgVar_ **p_p_stDsgVar,unsigned long ulSize);
|
||||
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
/* deallocations*/
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeDesignerVariable(struct AI_tdstMind_ *p_stMind);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeDsgVarInfoContent(struct tdstDsgVarInfo_ *p_stDsgVarInfo);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeDsgVarInfoAll(struct tdstDsgVarInfo_ **p_p_stDsgVarInfo,unsigned char ucNbDsgVar);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeDsgVarContent(struct tdstDsgVar_ *p_stDsgVar);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeDsgVarAll(struct tdstDsgVar_ **p_p_stDsgVar);
|
||||
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeDsgMemBuffer(char **p_p_cDsgMemBuffer);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeDsgMemContent(struct tdstDsgMem_ *p_stDsgMem);
|
||||
EXTERN_AI_DLL CPA_EXPORT void fn_vFreeDsgMemAll(struct tdstDsgMem_ **p_p_stDsgMem);
|
||||
#endif /* ACTIVE_EDITOR*/
|
||||
|
||||
/*******************************************************************************/
|
||||
#undef EXTERN_AI_DLL
|
||||
|
||||
#endif /* __STRINTEL_H__*/
|
56
Rayman_X/cpa/public/AI/AIBase/VarType.h
Normal file
56
Rayman_X/cpa/public/AI/AIBase/VarType.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#if !defined(__VAR_TYPE_H__)
|
||||
#define __VAR_TYPE_H__
|
||||
|
||||
typedef enum tdeVariableType_{
|
||||
E_vt_None=0,
|
||||
E_vt_Boolean, /*TRUE or FALSE value. a char is used, after we will use a bit field*/
|
||||
E_vt__128To127, /*char */
|
||||
E_vt_0To255, /*unsigned char*/
|
||||
E_vt__32768To32767, /*short*/
|
||||
E_vt_0To65535, /*unsigned short */
|
||||
E_vt_Integer, /*long*/
|
||||
E_vt_PositiveInteger, /*unsigned long*/
|
||||
E_vt_Float, /* MTH_tdxReal for example for store a distance*/
|
||||
E_vt_String, /* char **/
|
||||
E_vt_WayPoint, /* handle to a waypoint*/
|
||||
E_vt_Perso, /* tdstPerso * : pointer at a perso*/
|
||||
E_vt_List, /*List of C_ucSizeOfMinimalList element. E_vt_List+n specifies a list with C_ucSizeOfMinimalList+n-2 elements*/
|
||||
E_vt_1bit, /* 1 bit*/
|
||||
E_vt_2bit, /* 2 bit*/
|
||||
E_vt_3bit, /* 3 bit*/
|
||||
E_vt_4bit, /* 4 bit*/
|
||||
E_vt_5bit, /* 5 bit*/
|
||||
E_vt_6bit, /* 6 bit*/
|
||||
E_vt_7bit, /* 7 bit*/
|
||||
E_vt_MetaActionReturn, /*unsigned char*/
|
||||
E_vt_Vector, /* MTH3D_tdstVector*/
|
||||
E_vt_Module, /* long*/
|
||||
E_vt_DsgVarId, /* long*/
|
||||
E_vt_Action, /* tdxHandleToState*/
|
||||
E_vt_Button,
|
||||
E_vt_Mask, /* GMTMask*/
|
||||
E_vt_Surface,
|
||||
E_vt_LipsSynchro, /* CGHT*/
|
||||
E_vt_ObjectTable, /* CGHT*/
|
||||
/*E_vt_Sector,*/
|
||||
E_vt_SuperObject, /* for object*/
|
||||
E_vt_Environment,
|
||||
E_vt_Family,
|
||||
E_vt_SoundEvent,
|
||||
E_vt_Comport,
|
||||
E_vt_Font,
|
||||
E_vt_Text,
|
||||
E_vt_ParticleGenerator, /* JO 09/10/97*/
|
||||
E_vt_GameMaterial,
|
||||
E_vt_Color,
|
||||
E_vt_Model,
|
||||
E_vt_Array,
|
||||
E_vt_Light,
|
||||
E_vt_Caps,
|
||||
E_vt_Graph,
|
||||
/*********************************/
|
||||
E_Nb_vt /* MUST BE AT END */
|
||||
/*********************************/
|
||||
} tdeVariableType;
|
||||
|
||||
#endif /* __VAR_TYPE_H__*/
|
79
Rayman_X/cpa/public/AI/AIBase/WPEngDsp.h
Normal file
79
Rayman_X/cpa/public/AI/AIBase/WPEngDsp.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/***********************************************************************************************/
|
||||
/* File Name : WPEngDsp.h*/
|
||||
/* Goal : Header file for displaying Waypoints in the 3D Engine*/
|
||||
/* Author : Marc FASCIA*/
|
||||
/* Date : 04/03/98*/
|
||||
/***********************************************************************************************/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#if !defined(__WP_ENGINE_DISPLAY__)
|
||||
#define __WP_ENGINE_DISPLAY__
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
INCLUDE FILES :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "Acp_Base.h"
|
||||
#include "MTH.h"
|
||||
#include "POS.h"
|
||||
#include "GLI.h"
|
||||
#include "GLD.h"
|
||||
#include "SPO.h"
|
||||
|
||||
/***********************************************************************************************/
|
||||
/* Name : WP_SendWaypointsToViewport*/
|
||||
/* Description : Displays the Geo Objs for WP*/
|
||||
/* Author : Marc FASCIA*/
|
||||
/* Date : 04/03/98*/
|
||||
/* Optimized ? : No*/
|
||||
/***********************************************************************************************/
|
||||
void WP_SendWaypointsToViewport( GLD_tdstViewportAttributes * p_stViewport, unsigned long ulDrawMask );
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
---------------------- OLD VERSION ---------------------------
|
||||
--------------------------------------------------------------
|
||||
|
||||
#ifndef HieFriend
|
||||
#define HieFriend
|
||||
#endif
|
||||
#include "SPO.h"
|
||||
#include "SPO\HieSpObj.h"
|
||||
|
||||
#include "Acp_Base.h"
|
||||
#include "MTH.h"
|
||||
#include "POS.h"
|
||||
#include "GLI.h"
|
||||
#include "GLD.h"
|
||||
|
||||
#define _WP_D_WAYPOINT_FRIEND_
|
||||
|
||||
// *********************************************************************************************
|
||||
// Name : WP_WPAttachInHierarchy
|
||||
// Description : Adds the WP SPO in the SPO hierarchy
|
||||
// *********************************************************************************************
|
||||
void WP_WPAttachInHierarchy( HIE_tdstSuperObject * p_stRootSPO );
|
||||
|
||||
// *********************************************************************************************
|
||||
// Name : WP_WPIsolateFromHierarchy
|
||||
// Description : Removes the WP SPO in the SPO hierarchy
|
||||
// *********************************************************************************************
|
||||
void WP_WPIsolateFromHierarchy();
|
||||
|
||||
---------------------------------------------------------
|
||||
------------- END OF OLD VERSION ------------------------
|
||||
---------------------------------------------------------*/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __WP_ENGINE_DISPLAY__*/
|
||||
|
318
Rayman_X/cpa/public/AI/AIBase/WPWayPt.h
Normal file
318
Rayman_X/cpa/public/AI/AIBase/WPWayPt.h
Normal file
@@ -0,0 +1,318 @@
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
HEADER FILE FOR :
|
||||
Definition of functions and sturctures for waypoints
|
||||
------------------------------------------------------------------------------------------
|
||||
File Name :
|
||||
WPWayPt.h
|
||||
------------------------------------------------------------------------------------------
|
||||
Creation :
|
||||
* Date :
|
||||
March 10, 1997
|
||||
* Author :
|
||||
Albert PAIS
|
||||
------------------------------------------------------------------------------------------
|
||||
Contents :
|
||||
This files defines functions and structures for managing waypoints.
|
||||
------------------------------------------------------------------------------------------
|
||||
Remarks :
|
||||
Part of code comes from previous waypoint.c/.h
|
||||
------------------------------------------------------------------------------------------
|
||||
See Also :
|
||||
WPWayPt.c for implementation
|
||||
------------------------------------------------------------------------------------------
|
||||
Module tag :
|
||||
WP
|
||||
------------------------------------------------------------------------------------------
|
||||
Modification :
|
||||
* Date :
|
||||
* Author :
|
||||
* Modify :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#if !defined(__WPWAYPT_TYPES__)
|
||||
#define __WPWAYPT_TYPES__
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
#define WPWAYPT_UNDEF
|
||||
#define ONLY_TYPES
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
INCLUDE FILES :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#include "Acp_Base.h"
|
||||
#include "SPO.h"
|
||||
/*#include "SCR.h"*/
|
||||
#include "MTH.h"
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
File Name :
|
||||
WP_Handl.h
|
||||
----------------------------------------
|
||||
Required for :
|
||||
Defines waypoint handles.
|
||||
----------------------------------------
|
||||
*/
|
||||
#define _WP_D_DEFINE_WAYPOINTS_
|
||||
#include "WP_Handl.h"
|
||||
#include "WP_Func.h"
|
||||
|
||||
|
||||
#if defined(WPWAYPT_UNDEF)
|
||||
#undef ONLY_TYPES
|
||||
#undef WPWAYPT_UNDEF
|
||||
#endif /* !WPWAYPT_UNDEF */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
TYPE AND STRUCTURE DEFINITION :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
----------------------------------------
|
||||
Type definition :
|
||||
Waypoint structure and handle
|
||||
----------------------------------------
|
||||
Structure Name :
|
||||
WP_tdstWayPoint_
|
||||
Type def :
|
||||
WP_tdstWayPoint
|
||||
Handle :
|
||||
WP_tdhWayPoint
|
||||
----------------------------------------
|
||||
Creation Date :
|
||||
March 10,1997
|
||||
Author :
|
||||
Albert PAIS
|
||||
----------------------------------------
|
||||
Members :
|
||||
* Type : MTH3D_tdstVector
|
||||
Name : m_stVertex
|
||||
Meaning : The position of the waypoint
|
||||
* Type : MTH_tdxReal
|
||||
Name : m_xRadius
|
||||
Meaning : The raidus of the waypoint
|
||||
* Type : HIE_tdxHandleToSuperObject
|
||||
Name : m_hSuperObject
|
||||
Meaning : The owner of the waypoint
|
||||
(invalid value if the waypoint is
|
||||
static).
|
||||
* Type : unsigned char
|
||||
Name : m_ucUsedCount
|
||||
Meaning : The used count of the waypoint
|
||||
---------------------------------------
|
||||
*/
|
||||
#ifdef _WP_D_WAYPOINT_FRIEND_
|
||||
typedef struct WP_tdstWayPoint_
|
||||
{
|
||||
/* ANNECY AV {*/
|
||||
/* struct GEO_tdstGeometricObject_ *m_p_stGeoObj; Not used anymore*/
|
||||
/* END ANNECY AV }*/
|
||||
MTH3D_tdstVector m_stVertex;
|
||||
MTH_tdxReal m_xRadius;
|
||||
HIE_tdxHandleToSuperObject m_hSuperObject;
|
||||
/* ANNECY AV {*/
|
||||
/* unsigned char m_ucUsedCount; // Not used anymore*/
|
||||
/* END ANNECY AV }*/
|
||||
}WP_tdstWayPoint;
|
||||
#endif /* _WP_D_WAYPOINT_FRIEND_ */
|
||||
/* allready defined in WP_Handl.h
|
||||
typedef struct WP_tdstWayPoint_* WP_tdhWayPoint;
|
||||
*/
|
||||
|
||||
#endif /* !__WPWAYPT_TYPES__ */
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
|
||||
#if !defined(__WPWAYPT_VARS__)
|
||||
#define __WPWAYPT_VARS__
|
||||
|
||||
#undef WP_WAYPOINT_EXTERN
|
||||
#undef extern
|
||||
#if !defined(WP_D_WAYPOINT_GLOBALS_)
|
||||
#define WP_WAYPOINT_EXTERN extern
|
||||
#else /* !WP_D_WAYPOINT_GLOBALS_ */
|
||||
#define WP_WAYPOINT_EXTERN
|
||||
#endif /* !WP_D_WAYPOINT_GLOBALS_ */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
VARIABLE DECLARATION :
|
||||
<type> <variable name>
|
||||
#if defined(WP_D_WAYPOINT_GLOBALS_)
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-CONSTANT DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/* allready defined in WP_Handl.h
|
||||
#define WP_C_hWayPointInvalid ((WP_tdhWayPoint)0)
|
||||
*/
|
||||
|
||||
#undef extern
|
||||
#endif /* !__WPWAYPT_VARS__ */
|
||||
|
||||
#if !defined (__WPWAYPT_PROTOS__)
|
||||
#define __WPWAYPT_PROTOS__
|
||||
|
||||
/****************************************/
|
||||
#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*/
|
||||
/****************************************/
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#if defined(_WP_D_WAYPOINT_FRIEND_)
|
||||
/* Friend modules can access directly to the field :*/
|
||||
#define WP_M_vWayPointGetStructureField(_hWayPt,_pxPointer,_SlotName)\
|
||||
(*(_pxPointer) = (_hWayPt)->m_st##_SlotName)
|
||||
#define WP_M_xWayPointGetScalarField(_hWayPt,_Prefix,_SlotName)\
|
||||
((_hWayPt)->m_##_Prefix ##_SlotName)
|
||||
#define WP_M_vWayPointSetStructureField(_hWayPt,_pxPointer,_SlotName)\
|
||||
((_hWayPt)->m_st##_SlotName = *(_pxPointer))
|
||||
#define WP_M_vWayPointSetScalarField(_hWayPt,_xScalar,_Prefix,_SlotName)\
|
||||
((_hWayPt)->m_##_Prefix ##_SlotName = (_xScalar))
|
||||
|
||||
#define WP_M_uwWayPointSizeOf()\
|
||||
((unsigned short)(sizeof(struct WP_tdstWayPoint_)))
|
||||
|
||||
|
||||
#else /* _WP_D_WAYPOINT_FRIEND_ */
|
||||
/* Non friend modules accesss fields through functions */
|
||||
#define WP_M_vWayPointGetStructureField(_hWayPt,_pxPointer,_SlotName)\
|
||||
(WP_fnv_WayPoint_Get##_SlotName(_hWayPt,_pxPointer))
|
||||
#define WP_M_xWayPointGetScalarField(_hWayPt,_Prefix,_SlotName)\
|
||||
(WP_fn##_Prefix_WayPoint_Get##_SlotName(_hWayPt))
|
||||
#define WP_M_vWayPointSetStructureField(_hWayPt,_pxPointer,_SlotName)\
|
||||
(WP_fnv_WayPoint_Set##_SlotName(_hWayPt,_pxPointer))
|
||||
#define WP_M_vWayPointSetScalarField(_hWayPt,_xScalar,_Prefix,_SlotName)\
|
||||
(WP_fnv_WayPoint_Set##_SlotName(_hWayPt,_xScalar))
|
||||
|
||||
#define WP_M_uwWayPointSizeOf()\
|
||||
WP_fnuw_WayPoint_SizeOf()
|
||||
#endif /* _WP_D_WAYPOINT_FRIEND_ */
|
||||
|
||||
/* accessing to fields :*/
|
||||
#define WP_M_vWayPointGetVertex(_hWayPt,_pstVertex)\
|
||||
WP_M_vWayPointGetStructureField(_hWayPt,_pstVertex,Vertex)
|
||||
#define WP_M_vWayPointSetVertex(_hWayPt,_pstNuevoVertex)\
|
||||
WP_M_vWayPointSetStructureField(_hWayPt,_pstNuevoVertex,Vertex)
|
||||
|
||||
#define WP_M_xWayPointGetRadius(_hWayPt)\
|
||||
WP_M_xWayPointGetScalarField(_hWayPt,x,Radius)
|
||||
#define WP_M_vWayPointSetRadius(_hWayPt,_xNuevoRadius)\
|
||||
WP_M_vWayPointSetScalarField(_hWayPt,_xNuevoRadius,x,Radius)
|
||||
|
||||
#define WP_M_hWayPointGetSuperObject(_hWayPt)\
|
||||
WP_M_xWayPointGetScalarField(_hWayPt,h,SuperObject)
|
||||
#define WP_M_vWayPointSetSuperObject(_hWayPt,_hNuevoSuperObj)\
|
||||
WP_M_vWayPointSetScalarField(_hWayPt,_hNuevoSuperObj,h,SuperObject)
|
||||
|
||||
#define WP_M_ucWayPointGetUsedCount(_hWayPt)\
|
||||
WP_M_xWayPointGetScalarField(_hWayPt,uc,UsedCount)
|
||||
#define WP_M_vWayPointSetUsedCount(_hWayPt,_ucNuevoUsedCount)\
|
||||
WP_M_vWayPointSetScalarField(_hWayPt,_ucNuevoUsedCount,uc,UsedCount)
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
CPA_EXPORT void fn_vDrawWayPoint(struct WP_tdstWayPoint_ *p_stWayPt);
|
||||
/* creation function :*/
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_WayPoint_Create(void);
|
||||
/* destruction */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_Destroy(WP_tdhWayPoint);
|
||||
/* add reference and release */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_AddRef(WP_tdhWayPoint);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_Release(WP_tdhWayPoint);
|
||||
/* "constructor" : */
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_WayPoint_Build(MTH3D_tdstVector*,MTH_tdxReal,HIE_tdxHandleToSuperObject);
|
||||
/* duplicate : */
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_WayPoint_Duplicate(WP_tdhWayPoint);
|
||||
/* copy */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_Copy(WP_tdhWayPoint,WP_tdhWayPoint);
|
||||
/* sizeof */
|
||||
CPA_EXPORT unsigned short WP_fnuw_WayPoint_SizeOf(void);
|
||||
/* accessing to members :*/
|
||||
CPA_EXPORT void WP_fnv_WayPoint_GetVertex(WP_tdhWayPoint,MTH3D_tdstVector*);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_SetVertex(WP_tdhWayPoint,MTH3D_tdstVector*);
|
||||
|
||||
CPA_EXPORT MTH_tdxReal WP_fnx_WayPoint_GetRadius(WP_tdhWayPoint);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_SetRadius(WP_tdhWayPoint,MTH_tdxReal);
|
||||
|
||||
CPA_EXPORT HIE_tdxHandleToSuperObject WP_fnh_WayPoint_GetSuperObject(WP_tdhWayPoint);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_SetSuperObject(WP_tdhWayPoint,HIE_tdxHandleToSuperObject);
|
||||
|
||||
CPA_EXPORT unsigned char WP_fnuc_WayPoint_GetUsedCount(WP_tdhWayPoint);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_SetUsedCount(WP_tdhWayPoint,unsigned char);
|
||||
|
||||
/* validity of handles : */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_Invalidate(WP_tdhWayPoint*);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_WayPoint_IsValid(WP_tdhWayPoint);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_WayPoint_IsInvalid(WP_tdhWayPoint);
|
||||
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_WayPoint_IsDynamic(WP_tdhWayPoint);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_WayPoint_IsStatic(WP_tdhWayPoint);
|
||||
|
||||
/* loading waypoints */
|
||||
#if !defined(U64)
|
||||
CPA_EXPORT SCR_tde_Anl_ReturnValue WP_fne_WayPoint_ScriptCallBackLoad(SCR_tdst_File_Description *,char *,char **, SCR_tde_Anl_Action);
|
||||
CPA_EXPORT SCR_tde_Anl_ReturnValue WP_fne_WayPoint_ScriptSubSectionCallBackLoad(SCR_tdst_File_Description *,char *,char **, SCR_tde_Anl_Action);
|
||||
/*ANNECY Bart 19/01/98 {*/
|
||||
CPA_EXPORT SCR_tde_Anl_ReturnValue WP_fne_WPGraph_ScriptCallBackLoad(SCR_tdst_File_Description *,char *,char **, SCR_tde_Anl_Action);
|
||||
CPA_EXPORT SCR_tde_Anl_ReturnValue WP_fne_WPSommet_ScriptCallBackLoad(SCR_tdst_File_Description *,char *,char **, SCR_tde_Anl_Action);
|
||||
CPA_EXPORT void WP_fn_vReloadWPGraph(char* szNameOfGraph);
|
||||
/*ENDANNECY Bart }*/
|
||||
|
||||
#endif /* U64 */
|
||||
|
||||
/* export link table */
|
||||
CPA_EXPORT struct SCR_tdst_Link_Table_ *WP_fnp_WayPoint_GetLinkTable (void);
|
||||
|
||||
/* add by jt*/
|
||||
/* compute second pass */
|
||||
/*CPA_EXPORT void WP_fnv_WayPoint_LinkTableSecondPass (void);*/
|
||||
|
||||
/* tools */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_ComputeLocation(WP_tdhWayPoint,MTH3D_tdstVector*);
|
||||
|
||||
#endif /* !__WPWAYPT_PROTOS__ */
|
||||
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
|
||||
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
245
Rayman_X/cpa/public/AI/AIBase/WP_Edi.h
Normal file
245
Rayman_X/cpa/public/AI/AIBase/WP_Edi.h
Normal file
@@ -0,0 +1,245 @@
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
HEADER FILE FOR :
|
||||
Prototype of waypoints, links and ways exported functions
|
||||
------------------------------------------------------------------------------------------
|
||||
File Name :
|
||||
WP_F_nc.h
|
||||
------------------------------------------------------------------------------------------
|
||||
Creation :
|
||||
* Date :
|
||||
March 14,1997
|
||||
* Author :
|
||||
Albert Pais
|
||||
------------------------------------------------------------------------------------------
|
||||
Contents :
|
||||
defines prototype and functions used for waypoints, links and
|
||||
ways
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/****************************************/
|
||||
#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*/
|
||||
/****************************************/
|
||||
|
||||
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
WAYPOINT FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef _WP_D_DEFINE_WAYPOINTS_
|
||||
|
||||
#if !defined (__WP_WAYPOINTS_FUNCTIONS_PROTOS__)
|
||||
#define __WP_WAYPOINTS_FUNCTIONS_PROTOS__
|
||||
|
||||
/* creation function :*/
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_WayPoint_Create(void);
|
||||
/* destruction */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_Destroy(WP_tdhWayPoint);
|
||||
/* add reference and release */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_AddRef(WP_tdhWayPoint);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_Release(WP_tdhWayPoint);
|
||||
|
||||
/* "constructor" : */
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_WayPoint_Build(MTH3D_tdstVector*,MTH_tdxReal,HIE_tdxHandleToSuperObject);
|
||||
/* duplicate : */
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_WayPoint_Duplicate(WP_tdhWayPoint);
|
||||
/* copy */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_Copy(WP_tdhWayPoint,WP_tdhWayPoint);
|
||||
/* sizeof */
|
||||
CPA_EXPORT unsigned short WP_fnuw_WayPoint_SizeOf(void);
|
||||
/* accessing to members :*/
|
||||
CPA_EXPORT void WP_fnv_WayPoint_GetVertex(WP_tdhWayPoint,MTH3D_tdstVector*);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_SetVertex(WP_tdhWayPoint,MTH3D_tdstVector*);
|
||||
|
||||
CPA_EXPORT MTH_tdxReal WP_fnx_WayPoint_GetRadius(WP_tdhWayPoint);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_SetRadius(WP_tdhWayPoint,MTH_tdxReal);
|
||||
|
||||
CPA_EXPORT HIE_tdxHandleToSuperObject WP_fnh_WayPoint_GetSuperObject(WP_tdhWayPoint);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_SetSuperObject(WP_tdhWayPoint,HIE_tdxHandleToSuperObject);
|
||||
|
||||
/* validity of handles : */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_Invalidate(WP_tdhWayPoint*);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_WayPoint_IsValid(WP_tdhWayPoint);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_WayPoint_IsInvalid(WP_tdhWayPoint);
|
||||
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_WayPoint_IsDynamic(WP_tdhWayPoint);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_WayPoint_IsStatic(WP_tdhWayPoint);
|
||||
|
||||
CPA_EXPORT SCR_tdst_Link_Table* WP_fnp_WayPoint_GetLinkTable (void);
|
||||
|
||||
/* loading waypoints */
|
||||
CPA_EXPORT SCR_tde_Anl_ReturnValue WP_fne_WayPoint_ScriptCallBackLoad
|
||||
(SCR_tdst_File_Description *,char *,char **, SCR_tde_Anl_Action);
|
||||
/* tools */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_ComputeLocation(WP_tdhWayPoint,MTH3D_tdstVector*);
|
||||
|
||||
#endif /*__WP_WAYPOINTS_FUNCTIONS_PROTOS__ */
|
||||
|
||||
#endif /* _WP_D_DEFINE_WAYPOINTS_ */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
LINK FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef _WP_D_DEFINE_LINKS_
|
||||
|
||||
#if !defined (__WP_LINKS_FUNCTIONS_PROTOS__)
|
||||
#define __WP_LINKS_FUNCTIONS_PROTOS__
|
||||
|
||||
/* creation function :*/
|
||||
CPA_EXPORT WP_tdhLink WP_fnh_Link_Create(void);
|
||||
/* destruction */
|
||||
CPA_EXPORT void WP_fnv_Link_Destroy(WP_tdhLink);
|
||||
/* add reference and release */
|
||||
CPA_EXPORT void WP_fnv_Link_AddRef(WP_tdhLink);
|
||||
CPA_EXPORT void WP_fnv_Link_Release(WP_tdhLink);
|
||||
/* "constructor" : */
|
||||
CPA_EXPORT WP_tdhLink WP_fnh_Link_Build(void *,ACP_tdstDynaParam*,WP_tde_ucConnectionType,WP_tde_ucConnectionDynamicType,WP_tduc_SamplingRate);
|
||||
/* duplicate : */
|
||||
CPA_EXPORT WP_tdhLink WP_fnh_Link_Duplicate(WP_tdhLink);
|
||||
/* copy */
|
||||
CPA_EXPORT void WP_fnv_Link_Copy(WP_tdhLink,WP_tdhLink);
|
||||
/* sizeof */
|
||||
CPA_EXPORT unsigned short WP_fnuw_Link_SizeOf(void);
|
||||
/* accessing to members :*/
|
||||
CPA_EXPORT void WP_fnv_Link_GetDynamicParameter(WP_tdhLink,ACP_tdstDynaParam*);
|
||||
CPA_EXPORT void WP_fnv_Link_SetDynamicParameter(WP_tdhLink,ACP_tdstDynaParam*);
|
||||
CPA_EXPORT WP_tde_ucConnectionType WP_fneuc_Link_GetConnectionType(WP_tdhLink);
|
||||
CPA_EXPORT void WP_fnv_Link_SetConnectionType(WP_tdhLink,WP_tde_ucConnectionType);
|
||||
|
||||
CPA_EXPORT WP_tde_ucConnectionDynamicType WP_fneuc_Link_GetConnectionDynamicType(WP_tdhLink);
|
||||
CPA_EXPORT void WP_fnv_Link_SetConnectionDynamicType(WP_tdhLink,WP_tde_ucConnectionDynamicType);
|
||||
|
||||
CPA_EXPORT unsigned char WP_fnuc_Link_GetCurrentSample(WP_tdhLink);
|
||||
CPA_EXPORT void WP_fnv_Link_SetCurrentSample(WP_tdhLink,unsigned char);
|
||||
|
||||
/* validity of handles : */
|
||||
CPA_EXPORT void WP_fnv_Link_Invalidate(WP_tdhLink*);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_Link_IsValid(WP_tdhLink);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_Link_IsInvalid(WP_tdhLink);
|
||||
|
||||
/* allocate fields :*/
|
||||
CPA_EXPORT void WP_fnv_Link_Allocate(WP_tdhLink,WP_tde_ucConnectionType,WP_tde_ucConnectionDynamicType);
|
||||
/* free structures : */
|
||||
CPA_EXPORT void WP_fnv_Link_Free(WP_tdhLink);
|
||||
|
||||
/* changing connection type :*/
|
||||
CPA_EXPORT void WP_fnv_Link_ChangeConnectionTypeBezier(WP_tdhLink,MTH3D_tdhBezierCurve);
|
||||
CPA_EXPORT MTH3D_tdhBezierCurve WP_fnv_Link_GetConnectionTypeBezierCurve(WP_tdhLink);
|
||||
CPA_EXPORT void WP_fnv_Link_ChangeConnectionTypeCircleArc(WP_tdhLink,MTH3D_tdhCircleArcCurve);
|
||||
CPA_EXPORT MTH3D_tdhCircleArcCurve WP_fnv_Link_GetConnectionTypeCircleArcCurve(WP_tdhLink);
|
||||
CPA_EXPORT void WP_fnv_Link_ChangeConnectionTypeStaticLineObject(WP_tdhLink,WP_tdhWayPoint);
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnv_Link_GetConnectionTypeStaticLineObjectWayPoint(WP_tdhLink);
|
||||
CPA_EXPORT void WP_fnv_Link_ChangeConnectionTypeDynamicLine(WP_tdhLink,WP_tdhWayPoint);
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnv_Link_GetConnectionTypeDynamicLineWayPoint(WP_tdhLink);
|
||||
|
||||
CPA_EXPORT void WP_fnv_Link_UpdateDynamicInfo(WP_tdhLink);
|
||||
|
||||
#endif /*__WP_LINKS_FUNCTIONS_PROTOS__ */
|
||||
|
||||
#endif /* _WP_D_DEFINE_LINKS_ */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
WAY FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef _WP_D_DEFINE_WAYS_
|
||||
|
||||
#if !defined (__WP_WAYS_FUNCTIONS_PROTOS__)
|
||||
#define __WP_WAYS_FUNCTIONS_PROTOS__
|
||||
|
||||
/* creation function :*/
|
||||
CPA_EXPORT WP_tdhWay WP_fnh_Way_Create(void);
|
||||
/* destruction */
|
||||
CPA_EXPORT void WP_fnv_Way_Destroy(WP_tdhWay);
|
||||
/* add reference and release */
|
||||
CPA_EXPORT void WP_fnv_Way_AddRef(WP_tdhWay);
|
||||
CPA_EXPORT void WP_fnv_Way_Release(WP_tdhWay);
|
||||
/* current wp index : */
|
||||
CPA_EXPORT void WP_fnv_Way_SetCurrentWPIndex(WP_tdhWay,WP_tduc_WPIndex);
|
||||
|
||||
/* "constructor" : */
|
||||
CPA_EXPORT WP_tdhWay WP_fnh_Way_Build(WP_tduc_WPIndex);
|
||||
/* "Destructor" */
|
||||
CPA_EXPORT void WP_fnv_Way_Free(WP_tdhWay);
|
||||
/* allocate : */
|
||||
CPA_EXPORT void WP_fnv_Way_Alloc(WP_tdhWay,WP_tduc_WPIndex);
|
||||
/* re-size the way : */
|
||||
CPA_EXPORT void WP_fnv_Way_Realloc(WP_tdhWay,WP_tduc_WPIndex);
|
||||
/* duplicate : */
|
||||
CPA_EXPORT WP_tdhWay WP_fnh_Way_Duplicate(WP_tdhWay);
|
||||
/* copy */
|
||||
CPA_EXPORT void WP_fnv_Way_Copy(WP_tdhWay,WP_tdhWay);
|
||||
/* sizeof */
|
||||
CPA_EXPORT unsigned short WP_fnuw_Way_SizeOf(void);
|
||||
/* accessing to members :*/
|
||||
CPA_EXPORT WP_tdhWayPoint* WP_fnd_h_Way_GetWayPointArray(WP_tdhWay);
|
||||
CPA_EXPORT void WP_fnv_Way_SetWayPointArray(WP_tdhWay,WP_tdhWayPoint*);
|
||||
|
||||
CPA_EXPORT WP_tdhLink* WP_fnd_h_Way_GetLinkArray(WP_tdhWay);
|
||||
CPA_EXPORT void WP_fnv_Way_SetLinkArray(WP_tdhWay,WP_tdhLink*);
|
||||
|
||||
CPA_EXPORT WP_tduc_WPIndex WP_fnuc_Way_GetSizeWay(WP_tdhWay);
|
||||
CPA_EXPORT void WP_fnv_Way_SetSizeWay(WP_tdhWay,WP_tduc_WPIndex);
|
||||
|
||||
CPA_EXPORT WP_tduc_WPIndex WP_fnuc_Way_GetCurrentWPIndex(WP_tdhWay);
|
||||
CPA_EXPORT void WP_fnv_Way_SetCurrentWPIndex(WP_tdhWay,WP_tduc_WPIndex);
|
||||
|
||||
CPA_EXPORT unsigned char WP_fnuc_Way_GetUsedCount(WP_tdhWay);
|
||||
CPA_EXPORT void WP_fnv_Way_SetUsedCount(WP_tdhWay,unsigned char);
|
||||
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_Way_GetElementFromWayPointArray(WP_tdhWay,WP_tduc_WPIndex);
|
||||
CPA_EXPORT void WP_fnv_Way_SetElementFromWayPointArray(WP_tdhWay,WP_tduc_WPIndex,WP_tdhWayPoint);
|
||||
|
||||
CPA_EXPORT WP_tdhLink WP_fnh_Way_GetElementFromLinkArray(WP_tdhWay,WP_tduc_WPIndex);
|
||||
CPA_EXPORT void WP_fnv_Way_SetElementFromLinkArray(WP_tdhWay,WP_tduc_WPIndex,WP_tdhLink);
|
||||
|
||||
/* validity of handles : */
|
||||
CPA_EXPORT void WP_fnv_Way_Invalidate(WP_tdhWay*);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_Way_IsValid(WP_tdhWay);
|
||||
CPA_EXPORT ACP_tdxBool WP_fnb_Way_IsInvalid(WP_tdhWay);
|
||||
|
||||
/* adding and removing waypoints : */
|
||||
CPA_EXPORT void WP_fnv_Way_InsertWayPoint(WP_tdhWay,WP_tdhWayPoint, WP_tdhLink,WP_tdhLink,WP_tduc_WPIndex);
|
||||
CPA_EXPORT void WP_fnv_Way_DeleteWayPoint(WP_tdhWay,WP_tduc_WPIndex,WP_tdhLink);
|
||||
|
||||
/* retrieving waypoints : */
|
||||
CPA_EXPORT WP_tduc_WPIndex WP_fnuc_Way_PositionWayPoint(WP_tdhWay,WP_tdhWayPoint);
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_Way_NextWayPoint(WP_tdhWay);
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_Way_PrevWayPoint(WP_tdhWay);
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_Way_CurrentWayPoint(WP_tdhWay);
|
||||
|
||||
CPA_EXPORT SCR_tdst_Link_Table* WP_fnp_Way_GetLinkTable (void);
|
||||
|
||||
/* load*/
|
||||
CPA_EXPORT SCR_tde_Anl_ReturnValue WP_fne_Way_ScriptCallBackLoad
|
||||
(SCR_tdst_File_Description*,char*,char**,SCR_tde_Anl_Action);
|
||||
/* Tools :*/
|
||||
CPA_EXPORT void WP_fnv_Way_InitBeforeFollowing(HIE_tdxHandleToSuperObject,WP_tdhWay);
|
||||
/* function called when the specific vertex has been reached */
|
||||
CPA_EXPORT unsigned char WP_fnuc_Way_CurrentVertexReached(HIE_tdxHandleToSuperObject,WP_tdhWay);
|
||||
/* function called to get the speed : */
|
||||
CPA_EXPORT MTH_tdxReal WP_fnx_Way_GetCurrentSpeed(HIE_tdxHandleToSuperObject,WP_tdhWay);
|
||||
/* function called to get the vertex to reach */
|
||||
CPA_EXPORT void WP_fnv_Way_GetNextPoint(HIE_tdxHandleToSuperObject,WP_tdhWay,MTH3D_tdstVector*,MTH_tdxReal*);
|
||||
|
||||
|
||||
#endif /* __WP_WAYS_FUNCTIONS_PROTOS__ */
|
||||
|
||||
#endif /* _WP_D_DEFINE_WAYS_ */
|
||||
|
||||
#endif /* !ONLY_TYPES */
|
89
Rayman_X/cpa/public/AI/AIBase/WP_Func.h
Normal file
89
Rayman_X/cpa/public/AI/AIBase/WP_Func.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
HEADER FILE FOR :
|
||||
Prototype of waypoints, links and ways exported functions
|
||||
------------------------------------------------------------------------------------------
|
||||
File Name :
|
||||
WP_F_nc.h
|
||||
------------------------------------------------------------------------------------------
|
||||
Creation :
|
||||
* Date :
|
||||
March 14,1997
|
||||
* Author :
|
||||
Albert Pais
|
||||
------------------------------------------------------------------------------------------
|
||||
Contents :
|
||||
defines prototype and functions used for waypoints, links and
|
||||
ways
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
WAYPOINT FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef _WP_D_DEFINE_WAYPOINTS_
|
||||
|
||||
#if !defined (__WP_WAYPOINTS_FUNCTIONS_PROTOS__)
|
||||
#define __WP_WAYPOINTS_FUNCTIONS_PROTOS__
|
||||
|
||||
/****************************************/
|
||||
#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*/
|
||||
/****************************************/
|
||||
|
||||
/* add reference and release */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_AddRef(WP_tdhWayPoint);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_Release(WP_tdhWayPoint);
|
||||
|
||||
/* retrieve radius : */
|
||||
CPA_EXPORT MTH_tdxReal WP_fnx_WayPoint_GetRadius(WP_tdhWayPoint);
|
||||
/* loading waypoints */
|
||||
|
||||
/* LOL*/
|
||||
#if defined(AI_USE_SCRIPT)
|
||||
CPA_EXPORT SCR_tde_Anl_ReturnValue WP_fne_WayPoint_ScriptCallBackLoad(SCR_tdst_File_Description *,char *,char **, SCR_tde_Anl_Action);
|
||||
CPA_EXPORT SCR_tde_Anl_ReturnValue WP_fne_WayPoint_ScriptSubSectionCallBackLoad(SCR_tdst_File_Description *,char *,char **, SCR_tde_Anl_Action);
|
||||
CPA_EXPORT SCR_tdst_Link_Value* WP_fnh_WayPoint_GetLoaded(char*);
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
|
||||
/* tools */
|
||||
CPA_EXPORT void WP_fnv_WayPoint_ComputeLocation(WP_tdhWayPoint,MTH3D_tdstVector*);
|
||||
|
||||
/* LOL*/
|
||||
#if defined(AI_USE_SCRIPT)
|
||||
CPA_EXPORT void WP_fnv_WayPoint_InitLinkTable(void);
|
||||
CPA_EXPORT void WP_fnv_WayPoint_CloseLinkTable(void);
|
||||
|
||||
CPA_EXPORT SCR_tdst_Link_Table* WP_fnp_WayPoint_GetLinkTable (void);
|
||||
CPA_EXPORT WP_tdhWayPoint WP_fnh_WayPoint_GetHandleFromLinkTable(SCR_tdst_Link_Value*);
|
||||
#endif /* AI_USE_SCRIPT */
|
||||
|
||||
#endif /*__WP_WAYPOINTS_FUNCTIONS_PROTOS__ */
|
||||
|
||||
#endif /* _WP_D_DEFINE_WAYPOINTS_ */
|
||||
|
||||
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
78
Rayman_X/cpa/public/AI/AIBase/WP_Handl.h
Normal file
78
Rayman_X/cpa/public/AI/AIBase/WP_Handl.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
HEADER FILE FOR :
|
||||
Definitions of waypoints, link and ways handles.
|
||||
------------------------------------------------------------------------------------------
|
||||
File Name :
|
||||
WP_Handl.h
|
||||
------------------------------------------------------------------------------------------
|
||||
Creation :
|
||||
* Date :
|
||||
March 15,1997
|
||||
* Author :
|
||||
Albert Pais
|
||||
------------------------------------------------------------------------------------------
|
||||
Contents :
|
||||
Defines waypoints, links and ways handles
|
||||
Defines some macro-constants
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
Waypoint handle definition :
|
||||
*/
|
||||
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#if defined(_WP_D_DEFINE_WAYPOINTS_)
|
||||
#if !defined(__WP_WAYPOINT_HANDLE_TYPES__)
|
||||
#define __WP_WAYPOINT_HANDLE_TYPES__
|
||||
|
||||
/*ANNECY JMD {*/
|
||||
typedef struct WP_tdstArc_* WP_tdHandleOfArc;
|
||||
typedef struct WP_tdstListOfArc_ *WP_tdHandleOfListOfArc ;
|
||||
typedef struct WP_tdstGraph_ *WP_tdHandleOfGraph;
|
||||
typedef struct WP_tdstGraphNode_ *WP_tdhGraphNode ;
|
||||
/*ENDANNECY JMD }*/
|
||||
|
||||
|
||||
typedef struct WP_tdstWayPoint_* WP_tdhWayPoint;
|
||||
#define WP_C_hWayPointInvalid ((WP_tdhWayPoint)0)
|
||||
#define C_SectionWayPointDescription "WayPoint"
|
||||
#define C_SubSectionIsolateWayPointDescription "Isolate"
|
||||
#define C_SubSectionInWayWayPointDescription "InWay"
|
||||
#define C_ScriptWayPointSuffixe "wp"
|
||||
|
||||
/*ANNECY Bart 19/01/98 {*/
|
||||
#define C_SectionWPGraphDescription "WPGraph"
|
||||
#define C_SectionWPSommetDescription "WPSommet"
|
||||
/*ENDANNECY Bart }*/
|
||||
|
||||
|
||||
|
||||
#endif /* __WP_WAYPOINT_HANDLE_TYPES__ */
|
||||
#endif /* _WP_D_DEFINE_WAYPOINTS_ */
|
||||
|
||||
/*
|
||||
Link handle definition :
|
||||
*/
|
||||
|
||||
#if defined(_WP_D_DEFINE_LINKS_)
|
||||
|
||||
#if !defined(__WP_LINK_HANDLE_TYPES__)
|
||||
#define __WP_LINK_HANDLE_TYPES__
|
||||
|
||||
typedef struct WP_tdstLink_* WP_tdhLink;
|
||||
#define WP_C_hLinkInvalid ((WP_tdhLink)0)
|
||||
|
||||
#endif /* __WP_LINK_HANDLE_TYPES__ */
|
||||
#endif /* _WP_D_DEFINE_LINKS_ */
|
||||
|
||||
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
154
Rayman_X/cpa/public/AI/AIBase/WParc.h
Normal file
154
Rayman_X/cpa/public/AI/AIBase/WParc.h
Normal file
@@ -0,0 +1,154 @@
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#if !defined(__WPWAYARC_TYPES__)
|
||||
#define __WPWAYARC_TYPES__
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
#define WPWAYARC_UNDEF
|
||||
#define ONLY_TYPES
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
INCLUDE FILES :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#include "Acp_Base.h"
|
||||
#include <LST.h>
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
File Name :
|
||||
WP_Handl.h
|
||||
----------------------------------------
|
||||
Required for :
|
||||
Defines waypoint handles.
|
||||
----------------------------------------
|
||||
*/
|
||||
#include "WP_Handl.h"
|
||||
#include "WP_Func.h"
|
||||
|
||||
|
||||
#if defined(WPWAYARC_UNDEF)
|
||||
#undef ONLY_TYPES
|
||||
#undef WPWAYARC_UNDEF
|
||||
#endif /* !WPWAYARC_UNDEF */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
TYPE AND STRUCTURE DEFINITION :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef _WP_D_WPARC_FREIND_
|
||||
|
||||
LST2_M_DynamicUseListOf(WP_tdHandleOfArc) ;
|
||||
|
||||
typedef struct WP_tdstListOfArc_ {
|
||||
LST2_M_DynamicAnchorDeclaration(WP_tdHandleOfArc) m_hArc;
|
||||
} WP_tdstListOfArc;
|
||||
|
||||
typedef struct WP_tdstArc_ {
|
||||
LST2_M_DynamicElementDeclaration(WP_tdHandleOfArc)
|
||||
WP_tdhGraphNode m_hNode; /* destination */
|
||||
unsigned long m_ulCapability; /* capabilities needed to go through */
|
||||
unsigned long m_ulCapabilityInit ;
|
||||
long m_lWeight; /* weight of the transition, MUST be positif */
|
||||
long m_lWeightInit;
|
||||
}WP_tdstWayArc;
|
||||
#endif /* _WP_D_WPARC_FREIND_ */
|
||||
|
||||
#endif /* !__WPWAYARC_TYPES__ */
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
|
||||
#if !defined(__WPWAYARC_VARS__)
|
||||
#define __WPWAYARC_VARS__
|
||||
|
||||
#undef WP_WAYPOINT_EXTERN
|
||||
#undef extern
|
||||
#if !defined(WP_D_WAYPOINT_GLOBALS_)
|
||||
#define WP_WAYPOINT_EXTERN extern
|
||||
#else /* !WP_D_WAYPOINT_GLOBALS_ */
|
||||
#define WP_WAYPOINT_EXTERN
|
||||
#endif /* !WP_D_WAYPOINT_GLOBALS_ */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
VARIABLE DECLARATION :
|
||||
<type> <variable name>
|
||||
#if defined(WP_D_WAYPOINT_GLOBALS_)
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-CONSTANT DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/* allready defined in WP_Handl.h
|
||||
#define WP_C_hWayPointInvalid ((WP_tdhWayPoint)0)
|
||||
*/
|
||||
|
||||
#undef extern
|
||||
#endif /* !__WPWAYARC_VARS__ */
|
||||
|
||||
#if !defined (__WPWAYARC_PROTOS__)
|
||||
#define __WPWAYARC_PROTOS__
|
||||
|
||||
/****************************************/
|
||||
#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*/
|
||||
/****************************************/
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
CPA_EXPORT WP_tdHandleOfArc WPARC_CreateArc (WP_tdhGraphNode hNode, long lWeight, unsigned long ulCapability) ;
|
||||
CPA_EXPORT void WPARC_fn_vDestroyArc (WP_tdHandleOfArc hArc);
|
||||
CPA_EXPORT long WPARC_fn_lSetWeight (WP_tdHandleOfArc hArc, long lWeight) ;
|
||||
CPA_EXPORT long WPARC_fn_lGetWeight (WP_tdHandleOfArc hArc) ;
|
||||
CPA_EXPORT long WPARC_fn_lSetCapability (WP_tdHandleOfArc hArc, unsigned long ulCapability) ;
|
||||
CPA_EXPORT unsigned long WPARC_fn_ulGetCapability (WP_tdHandleOfArc hArc) ;
|
||||
|
||||
CPA_EXPORT WP_tdHandleOfListOfArc WPARCLST_fn_hInit (void) ;
|
||||
CPA_EXPORT void WPARCLST_fn_vDestroy (WP_tdHandleOfListOfArc hList) ;
|
||||
CPA_EXPORT void WPARCLST_fn_vAdd (WP_tdHandleOfListOfArc hListOfArc, WP_tdhGraphNode hNode, long lWeight, unsigned long ulCapability) ;
|
||||
CPA_EXPORT void WPARCLST_fn_vRemove (WP_tdHandleOfListOfArc hListOfArc, WP_tdhGraphNode hNode) ;
|
||||
|
||||
CPA_EXPORT long WPARCLST_fn_lChangeCapabilities (WP_tdHandleOfListOfArc hListOfArc, WP_tdhGraphNode hNode, unsigned long ulCapability, long lValue) ;
|
||||
CPA_EXPORT long WPARCLST_fn_lGetCapabilities (WP_tdHandleOfListOfArc hListOfArc, WP_tdhGraphNode hNode, unsigned long* p_ulCapability) ;
|
||||
CPA_EXPORT long WPARCLST_fn_lChangeWeight (WP_tdHandleOfListOfArc hListOfArc, WP_tdhGraphNode hNode, long lWeight) ;
|
||||
CPA_EXPORT long WPARCLST_fn_lGetWeight (WP_tdHandleOfListOfArc hListOfArc, WP_tdhGraphNode hNode, long *p_lWeight) ;
|
||||
#endif /* !__WPWAYARC_PROTOS__ */
|
||||
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
|
||||
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
239
Rayman_X/cpa/public/AI/AIBase/WPgraphe.h
Normal file
239
Rayman_X/cpa/public/AI/AIBase/WPgraphe.h
Normal file
@@ -0,0 +1,239 @@
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#if !defined(__WPGRAPH_TYPES__)
|
||||
#define __WPGRAPH_TYPES__
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
#define WPGRAPH_UNDEF
|
||||
#define ONLY_TYPES
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
INCLUDE FILES :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#include "Acp_Base.h"
|
||||
#include "SPO.h"
|
||||
#include "MTH.h"
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
File Name :
|
||||
WP_Handl.h
|
||||
----------------------------------------
|
||||
Required for :
|
||||
Defines waypoint handles.
|
||||
----------------------------------------
|
||||
*/
|
||||
#include "WP_Handl.h"
|
||||
#include "WP_Func.h"
|
||||
|
||||
|
||||
#if defined(WPGRAPH_UNDEF)
|
||||
#undef ONLY_TYPES
|
||||
#undef WPGRAPH_UNDEF
|
||||
#endif /* !WPWAYPT_UNDEF */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
TYPE AND STRUCTURE DEFINITION :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*#ifdef _WP_D_WPGRAPH_FRIEND_*/
|
||||
|
||||
LST2_M_DynamicUseListOf(WP_tdhGraphNode) ;
|
||||
|
||||
typedef struct WP_tdstGraphNode_ {
|
||||
LST2_M_DynamicElementDeclaration(WP_tdhGraphNode)
|
||||
WP_tdhWayPoint m_hWayPoint ; /* reference to the WayPoint */
|
||||
long m_lTypeOfWP; /*BART*/
|
||||
long m_lTypeOfWPInit; /*BART*/
|
||||
WP_tdHandleOfListOfArc m_hListOfArc ; /* list of link of the node */
|
||||
} WP_tdstGraphNode;
|
||||
|
||||
|
||||
typedef struct WP_tdstGraph_ {
|
||||
LST2_M_DynamicAnchorDeclaration(WP_tdhGraphNode) m_hListOfNode ;
|
||||
#ifdef GAM_USE_SCRIPT
|
||||
char* m_szNameOfGraph;
|
||||
char* m_szReferenceSection;
|
||||
#endif
|
||||
} WP_tdstGraph;
|
||||
|
||||
/*#endif /* _WP_D_WPGRAPH_FRIEND_ */
|
||||
|
||||
#endif /* !__WPGRAPH_TYPES__ */
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
|
||||
#if !defined(__WPGRAPH_VARS__)
|
||||
#define __WWPGRAPH_VARS__
|
||||
|
||||
#undef WP_WAYPOINT_EXTERN
|
||||
#undef extern
|
||||
#if !defined(WP_D_WPGRAPH_GLOBALS_)
|
||||
#define WP_WAYPOINT_EXTERN extern
|
||||
#else /* !WP_D_WPGRAPH_GLOBALS_ */
|
||||
#define WP_WAYPOINT_EXTERN
|
||||
#endif /* !WP_D_WPGRAPH_GLOBALS_ */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
VARIABLE DECLARATION :
|
||||
<type> <variable name>
|
||||
#if defined(WP_D_WAYPOINT_GLOBALS_)
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-CONSTANT DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/* allready defined in WP_Handl.h
|
||||
#define WP_C_hWayPointInvalid ((WP_tdhWayPoint)0)
|
||||
*/
|
||||
|
||||
#undef extern
|
||||
#endif /* !__WPWAYPT_VARS__ */
|
||||
|
||||
#if !defined (__WPGRAPH_PROTOS__)
|
||||
#define __WPGRAPH_PROTOS__
|
||||
|
||||
/****************************************/
|
||||
#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*/
|
||||
/****************************************/
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/* list of graph */
|
||||
CPA_EXPORT WP_tdHandleOfGraph WPG_fn_hGetGraph (char* _szName);
|
||||
CPA_EXPORT void WPG_fn_vAddGlobalGraph(WP_tdHandleOfGraph hGraph) ;
|
||||
CPA_EXPORT void WPG_fn_vDestroyAllGraph (void) ;
|
||||
|
||||
/* Graph managment */
|
||||
/*CPA_EXPORT WP_tdHandleOfGraph WPG_fn_hCreate (void) ;*/
|
||||
CPA_EXPORT WP_tdHandleOfGraph WPG_fn_hCreate (char* _szName, char* _szReference) ;
|
||||
|
||||
/*ROMTEAM Network (Gabriela Dumitrascu 15/03/98)*/
|
||||
CPA_EXPORT char* WPG_fn_pGetNameOfGraph(WP_tdHandleOfGraph hGraph);
|
||||
CPA_EXPORT void WPG_fn_vSetNameOfGraph(WP_tdHandleOfGraph hGraph, const char* _szName);
|
||||
CPA_EXPORT char* WPG_fn_pGetReferenceSection(WP_tdHandleOfGraph hGraph);
|
||||
CPA_EXPORT void WPG_fn_vSetReferenceSection(WP_tdHandleOfGraph hGraph, const char* _szReferenceSection);
|
||||
|
||||
CPA_EXPORT void WPG_fn_vCopy (WP_tdHandleOfGraph hDst,WP_tdHandleOfGraph hSrc);
|
||||
/*ENDROMTEAM Network (Gabriela Dumitrascu)*/
|
||||
|
||||
CPA_EXPORT void WPG_fn_vDestroy (WP_tdHandleOfGraph hGraph) ;
|
||||
CPA_EXPORT long WPG_fn_lAddWayPointIfNotExists (WP_tdHandleOfGraph _hGraph,
|
||||
WP_tdhWayPoint _hWayPoint, long _lTypeOfWP); /*BART*/
|
||||
CPA_EXPORT long WPG_fn_lAddWayPoint (WP_tdHandleOfGraph _hGraph,
|
||||
WP_tdhWayPoint _hWayPoint, long _lTypeOfWP); /*BART*/
|
||||
CPA_EXPORT long WPG_fn_lChangeTypeOfWP (WP_tdHandleOfGraph _hGraph, WP_tdhWayPoint _hWayPoint, long _lTypeOfWP); /* BART*/
|
||||
|
||||
CPA_EXPORT long WPG_fn_lRemoveWayPoint (WP_tdHandleOfGraph hGraph,
|
||||
WP_tdhWayPoint hWayPoint) ;
|
||||
CPA_EXPORT long WPG_fn_lAddArcToWayPoint (WP_tdHandleOfGraph hGraph,
|
||||
WP_tdhWayPoint hSrcWayPoint,
|
||||
WP_tdhWayPoint hDstWayPoint,
|
||||
long lWeight, unsigned long ulCapability) ;
|
||||
CPA_EXPORT long WPG_fn_lRemoveArcFromWayPoint (WP_tdHandleOfGraph hGraph,
|
||||
WP_tdhWayPoint hSrcWayPoint,
|
||||
WP_tdhWayPoint hDstWayPoint ) ;
|
||||
|
||||
CPA_EXPORT long WPG_fn_lChangeLinkCapabilities (WP_tdHandleOfGraph hGraph,
|
||||
WP_tdhWayPoint hSrcWayPoint,
|
||||
WP_tdhWayPoint hDstWayPoint,
|
||||
unsigned long ulCapability, long lValue ) ;
|
||||
CPA_EXPORT long WPG_fn_lGetLinkCapabilities (WP_tdHandleOfGraph hGraph,
|
||||
WP_tdhWayPoint hSrcWayPoint,
|
||||
WP_tdhWayPoint hDstWayPoint,
|
||||
unsigned long* p_ulCapability ) ;
|
||||
CPA_EXPORT long WPG_fn_lChangeLinkWeight (WP_tdHandleOfGraph hGraph,
|
||||
WP_tdhWayPoint hSrcWayPoint,
|
||||
WP_tdhWayPoint hDstWayPoint,
|
||||
long lWeight) ;
|
||||
CPA_EXPORT long WPG_fn_lGetLinkWeight (WP_tdHandleOfGraph hGraph,
|
||||
WP_tdhWayPoint hSrcWayPoint,
|
||||
WP_tdhWayPoint hDstWayPoint,
|
||||
long *p_lWeight ) ;
|
||||
|
||||
CPA_EXPORT void WPG_fn_vReinitGraph (WP_tdHandleOfGraph hGraph) ;
|
||||
|
||||
|
||||
CPA_EXPORT WP_tdHandleOfGraph WPG_fn_lShortestPath (WP_tdHandleOfGraph hGraph,
|
||||
WP_tdhWayPoint hSrcWayPoint,
|
||||
WP_tdhWayPoint hDstWayPoint,
|
||||
unsigned long ulCapability) ;
|
||||
/*bart:*/
|
||||
CPA_EXPORT WP_tdHandleOfGraph WPG_fn_lBuildOrderedPath(WP_tdHandleOfGraph hGraph, WP_tdhWayPoint hStartWP);
|
||||
|
||||
CPA_EXPORT WP_tdhWayPoint WPG_fn_hGetFirstWaypointOfGraph (WP_tdHandleOfGraph hGraph) ;
|
||||
CPA_EXPORT WP_tdhWayPoint WPG_fn_hGetLastWaypointOfGraph (WP_tdHandleOfGraph hGraph) ;
|
||||
CPA_EXPORT long WPG_fn_lNumberOfWaypointOfGraph (WP_tdHandleOfGraph hGraph) ;
|
||||
CPA_EXPORT WP_tdhWayPoint WPG_fn_hGetWaypointOfGraph (WP_tdHandleOfGraph hGraph,
|
||||
int iIndex, long* _plTypeOfWP) ; /*BART*/
|
||||
|
||||
CPA_EXPORT char *WPG_fn_szGetReferenceSection (WP_tdHandleOfGraph hGraph) ;
|
||||
|
||||
|
||||
/* Graph node managment */
|
||||
CPA_EXPORT WP_tdhGraphNode WPG_fn_hCreateNode (WP_tdhWayPoint _hWayPoint, long _lTypeOfWP); /*BART*/
|
||||
CPA_EXPORT void WPG_fn_vDestroyNode (WP_tdhGraphNode hNode) ;
|
||||
CPA_EXPORT void WPG_fn_vAddArc (WP_tdhGraphNode hSrcNode, WP_tdhGraphNode hDstNode,
|
||||
unsigned long ulCapability, long lWeight) ;
|
||||
CPA_EXPORT void WPG_fn_vRemoveArc (WP_tdhGraphNode hSrcNode,
|
||||
WP_tdhGraphNode hDstNode ) ;
|
||||
CPA_EXPORT WP_tdHandleOfListOfArc WPG_fn_hGetArcList (WP_tdhGraphNode hSrcNode) ;
|
||||
|
||||
CPA_EXPORT long WPG_fn_lChangeArcCapabilities (WP_tdhGraphNode hSrcNode, WP_tdhGraphNode hDstNode, unsigned long ulCapability, long lValue) ;
|
||||
CPA_EXPORT long WPG_fn_lGetArcCapabilities (WP_tdhGraphNode hSrcNode, WP_tdhGraphNode hDstNode, unsigned long* p_ulCapability) ;
|
||||
CPA_EXPORT long WPG_fn_lChangeArcWeight ( WP_tdhGraphNode hSrcNode, WP_tdhGraphNode hDstNode, long lWeight) ;
|
||||
CPA_EXPORT long WPG_fn_lGetArcWeight ( WP_tdhGraphNode hSrcNode, WP_tdhGraphNode hDstNode, long *p_lWeight) ;
|
||||
|
||||
/*DMJ*/
|
||||
|
||||
/*ROMTEAM Networks (Gabriela Dumitrascu 05/03/98)*/
|
||||
/* export link table */
|
||||
CPA_EXPORT struct SCR_tdst_Link_Table_ *WPG_fnp_Graph_GetLinkTable (void);
|
||||
/*ENDROMTEAM Networks (Gabriela Dumitrascu)*/
|
||||
|
||||
#endif /* !__WPGRAPH_PROTOS__ */
|
||||
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
|
||||
|
||||
/* in order to compile AI in C++ and link with GAM in C*/
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
72
Rayman_X/cpa/public/AI/AIBase/specif/AIOption.h
Normal file
72
Rayman_X/cpa/public/AI/AIBase/specif/AIOption.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*///////////////////////////////////////////////////////////*/
|
||||
/* //*/
|
||||
/* Management of the Module : AI (Intelligence) //*/
|
||||
/* //*/
|
||||
/*///////////////////////////////////////////////////////////*/
|
||||
/* //*/
|
||||
/* AIOption.h : Generic compilation options for AI //*/
|
||||
/* // //*/
|
||||
/*///////////////////////////////////////////////////////////*/
|
||||
|
||||
#if !defined(__AIOPTION_H__)
|
||||
#define __AIOPTION_H__
|
||||
|
||||
/* important for external use of Ai files*/
|
||||
#if defined(ACTIVE_EDITOR)
|
||||
#if !defined(_AI_LIB_)
|
||||
#define _AI_LIB_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
// debug infor for AI
|
||||
#if defined(_AI_LIB_)
|
||||
*/
|
||||
#if defined(ACTIVE_EDITOR) || ( defined(VISUAL) && defined(_DEBUG) )
|
||||
#if !defined(__DEBUG_AI__)
|
||||
#define __DEBUG_AI__
|
||||
#endif
|
||||
#else /* release without editor*/
|
||||
#if !defined(OPTIMIZED_COMMAND)
|
||||
#define OPTIMIZED_COMMAND
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ai debuger is active with editors*/
|
||||
#if defined (ACTIVE_EDITOR) && !defined(ACTIVE_AIDEBUG)
|
||||
#define ACTIVE_AIDEBUG /*** DR ***/
|
||||
#endif
|
||||
|
||||
/* IA debug errors and warnings*/
|
||||
#define __FATAL_ERR_AI__
|
||||
#define __WARNING_ERR_AI__
|
||||
|
||||
/* script or binary options */
|
||||
#define AI_USE_SCRIPT
|
||||
|
||||
/* OPTIMIZATION FLAGS */
|
||||
/* to activate SwapParameters optimizations : it seems to work*/
|
||||
#define OPTIMIZE_SWAP_PARAMETER
|
||||
|
||||
/* to activate Action table optimizations : not tested yet*/
|
||||
#define OPTIMIZE_ACTION_TABLE
|
||||
|
||||
/* to activate Nb Nodes optimizations : don't use uwNbNode anymore : it seems to work too*/
|
||||
#if !defined(ACTIVE_EDITOR)
|
||||
#define OPTIMIZE_NB_NODES
|
||||
#endif
|
||||
/*
|
||||
#else
|
||||
#if !defined(OPTIMIZED_COMMAND)
|
||||
#define OPTIMIZED_COMMAND
|
||||
#endif
|
||||
#if !defined(__DEBUG_AI__)
|
||||
#define __DEBUG_AI__
|
||||
#endif
|
||||
#if !defined(AI_USE_SCRIPT)
|
||||
#define AI_USE_SCRIPT
|
||||
#endif
|
||||
#endif
|
||||
*/
|
||||
|
||||
#endif /*__AIOPTION_H__*/
|
Reference in New Issue
Block a user