reman3/Rayman_X/cpa/tempgrp/AI/AIBase/DsgMemC.h

241 lines
14 KiB
C

#ifndef D_DsgMemC
#define D_DsgMemC
/**************************************/
#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 the real indice of variable */
/*******************************************************************************************************************/
#define M_CFast_ucGetRealIndice(Indice1) (unsigned char)M_lDsgVarIdInterpret(p_stRefTree+Indice1)
#define M_CFast_hGetPersoRef(Indice) (HIE_tdxHandleToSuperObject)M_GetSuperObject(M_p_stPersoRefInterpret(p_stRefTree+Indice))
/*******************************************************************************************************************/
/* Get Functions to access DsgVar */
/*******************************************************************************************************************/
/*
MTH_tdxReal CFast_fn_xGetDsgVarFloat(unsigned char ucId, AI_tdstMind *p_stPerso);
C_TypeOfPerso CFast_fn_hGetDsgVarPerso(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_Vector
MTH3D_tdstVector *CFast_fn_p_stGetDsgVarVector(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_Caps
unsigned long CFast_fn_ucGetDsgVarCaps(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_Graph
C_TypeOfGraph CFast_fn_hGetDsgVarGraph(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_WayPoint
C_TypeOfWayPoint CFast_fn_hGetDsgVarWayPoint(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_Action
C_TypeOfAction CFast_fn_xGetDsgVarAction(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_Comport
C_TypeOfComport CFast_fn_xGetDsgVarComport(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_List
C_TypeOfList1 * CFast_fn_p_xGetDsgVarList(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_Boolean
long CFast_fn_lGetDsgVarBoolean(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType__128To127
long CFast_fn_lGetDsgVar_128To127(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_0To255
long CFast_fn_lGetDsgVar0To255(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType__32768To32767
long CFast_fn_lGetDsgVar_32768To32767(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_0To65535
long CFast_fn_lGetDsgVar0To65535(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_Integer
long CFast_fn_lGetDsgVarInteger(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_PositiveInteger
long CFast_fn_lGetDsgVarPositiveInteger(unsigned char ucId, AI_tdstMind *p_stPerso);
// eDsgVarType_GameMaterial
C_TypeOfGameMaterial CFast_fn_xGetDsgVarGameMaterial(unsigned char ucId, AI_tdstMind *p_stPerso);
*/
#define CFast_fn_xGetDsgVarFloat(ucId, p_stPerso) ((MTH_tdxReal) (*(MTH_tdxReal *)M_GetDsgVarAddr(p_stPerso,ucId)))
#define LocalCFast_fn_xGetDsgVarFloat(ucId) ((MTH_tdxReal) (*(MTH_tdxReal *)M_LocalGetDsgVarAddr(NULL,ucId)))
#define CFast_fn_hGetDsgVarPerso(ucId,p_stPerso) ((C_TypeOfPerso) *(C_TypeOfPerso *)M_GetDsgVarAddr(p_stPerso,ucId))
#define LocalCFast_fn_hGetDsgVarPerso(ucId) ((C_TypeOfPerso) *(C_TypeOfPerso *)M_LocalGetDsgVarAddr(NULL,ucId))
#define CFast_fn_p_stGetDsgVarVector(ucId,p_stPerso) ((MTH3D_tdstVector *)(M_GetDsgVarAddr(p_stPerso,ucId)))
#define LocalCFast_fn_p_stGetDsgVarVector(ucId) ((MTH3D_tdstVector *)(M_LocalGetDsgVarAddr(NULL,ucId)))
#define CFast_fn_ucGetDsgVarCaps(ucId, p_stPerso) (*((unsigned long *)(M_GetDsgVarAddr(p_stPerso,ucId))))
#define LocalCFast_fn_ucGetDsgVarCaps(ucId) (*((unsigned long *)(M_LocalGetDsgVarAddr(NULL,ucId))))
#define CFast_fn_hGetDsgVarGraph(ucId,p_stPerso) (*((C_TypeOfGraph *)M_GetDsgVarAddr(p_stPerso,ucId)))
#define LocalCFast_fn_hGetDsgVarGraph(ucId) (*((C_TypeOfGraph *)M_LocalGetDsgVarAddr(NULL,ucId)))
#define CFast_fn_hGetDsgVarWayPoint(ucId,p_stPerso) (*((C_TypeOfWayPoint *)M_GetDsgVarAddr(p_stPerso,ucId)))
#define LocalCFast_fn_hGetDsgVarWayPoint(ucId) (*((C_TypeOfWayPoint *)M_LocalGetDsgVarAddr(NULL,ucId)))
#define CFast_fn_xGetDsgVarAction(ucId,p_stPerso) (*((C_TypeOfAction *)M_GetDsgVarAddr(p_stPerso,ucId)))
#define LocalCFast_fn_xGetDsgVarAction(ucId) (*((C_TypeOfAction *)M_LocalGetDsgVarAddr(NULL,ucId)))
#define CFast_fn_xGetDsgVarComport(ucId,p_stPerso) (*((C_TypeOfComport *)M_GetDsgVarAddr(p_stPerso,ucId)))
#define LocalCFast_fn_xGetDsgVarComport(ucId) (*((C_TypeOfComport *)M_LocalGetDsgVarAddr(NULL,ucId)))
#define CFast_fn_p_xGetDsgVarList(ucId,p_stPerso) ((struct tdstList_ *)M_GetDsgVarAddr(p_stPerso,ucId))
#define LocalCFast_fn_p_xGetDsgVarList(ucId) ((struct tdstList_ *)M_LocalGetDsgVarAddr(NULL,ucId))
#define CFast_fn_lGetDsgVarBoolean(ucId,p_stPerso) ((long)(*((C_TypeOfBoolean *)M_GetDsgVarAddr(p_stPerso,ucId))))
#define LocalCFast_fn_lGetDsgVarBoolean(ucId) ((long)(*((C_TypeOfBoolean *)M_LocalGetDsgVarAddr(NULL,ucId))))
#define CFast_fn_lGetDsgVar_128To127(ucId,p_stPerso) ( (long)(*((C_TypeOf_128To127 *)M_GetDsgVarAddr(p_stPerso,ucId)) ) )
#define LocalCFast_fn_lGetDsgVar_128To127(ucId) ( (long)(*((C_TypeOf_128To127 *)M_LocalGetDsgVarAddr(NULL,ucId)) ) )
#define CFast_fn_lGetDsgVar0To255(ucId,p_stPerso) ((long)(*((C_TypeOf0To255 *)M_GetDsgVarAddr(p_stPerso,ucId)) ) )
#define LocalCFast_fn_lGetDsgVar0To255(ucId) ((long)(*((C_TypeOf0To255 *)M_LocalGetDsgVarAddr(NULL,ucId)) ) )
#define CFast_fn_lGetDsgVar_32768To32767(ucId,p_stPerso) ((long)(*((C_TypeOf_32768To32767 *)M_GetDsgVarAddr(p_stPerso,ucId)) ) )
#define LocalCFast_fn_lGetDsgVar_32768To32767(ucId) ((long)(*((C_TypeOf_32768To32767 *)M_LocalGetDsgVarAddr(NULL,ucId)) ) )
#define CFast_fn_lGetDsgVar0To65535(ucId,p_stPerso) ((long)(*((C_TypeOf0To65535 *)M_GetDsgVarAddr(p_stPerso,ucId))))
#define LocalCFast_fn_lGetDsgVar0To65535(ucId) ((long)(*((C_TypeOf0To65535 *)M_LocalGetDsgVarAddr(NULL,ucId))))
#define CFast_fn_lGetDsgVarInteger(ucId,p_stPerso) ((long)(*((C_TypeOfInteger *)M_GetDsgVarAddr(p_stPerso,ucId)) ) )
#define LocalCFast_fn_lGetDsgVarInteger(ucId) ((long)(*((C_TypeOfInteger *)M_LocalGetDsgVarAddr(NULL,ucId)) ) )
#define CFast_fn_lGetDsgVarPositiveInteger(ucId,p_stPerso) ((long)(*((C_TypeOfPositiveInteger *)M_GetDsgVarAddr(p_stPerso,ucId)) ) )
#define LocalCFast_fn_lGetDsgVarPositiveInteger(ucId) ((long)(*((C_TypeOfPositiveInteger *)M_LocalGetDsgVarAddr(NULL,ucId)) ) )
#define CFast_fn_xGetDsgVarGameMaterial(ucId,p_stPerso) ((C_TypeOfGameMaterial)(*((C_TypeOfGameMaterial *)M_GetDsgVarAddr(p_stPerso,ucId))))
#define LocalCFast_fn_xGetDsgVarGameMaterial(ucId) ((C_TypeOfGameMaterial)(*((C_TypeOfGameMaterial *)M_LocalGetDsgVarAddr(NULL,ucId))))
HIE_tdxHandleToSuperObject CFast_fn_hGetDsgVarPersoArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex);
HIE_tdxHandleToSuperObject LocalCFast_fn_hGetDsgVarPersoArray(unsigned char ucId, unsigned char ucTabIndex);
MTH3D_tdstVector *CFast_fn_p_stGetDsgVarVectorArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex);
MTH3D_tdstVector *LocalCFast_fn_p_stGetDsgVarVectorArray(unsigned char ucId, unsigned char ucTabIndex);
MTH_tdxReal CFast_fn_xGetDsgVarFloatArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex);
MTH_tdxReal LocalCFast_fn_xGetDsgVarFloatArray(unsigned char ucId, unsigned char ucTabIndex);
long CFast_fn_lGetDsgVarIntegerArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex);
long LocalCFast_fn_lGetDsgVarIntegerArray(unsigned char ucId, unsigned char ucTabIndex);
C_TypeOfWayPoint CFast_fn_hGetDsgVarWayPointArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex);
C_TypeOfWayPoint LocalCFast_fn_hGetDsgVarWayPointArray(unsigned char ucId, unsigned char ucTabIndex);
char *CFast_fn_p_szGetDsgVarTextArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex);
char *LocalCFast_fn_p_szGetDsgVarTextArray(unsigned char ucId, unsigned char ucTabIndex);
/*******************************************************************************************************************/
/* Set Functions to access DsgVar */
/*******************************************************************************************************************/
/* eDsgVarType_Float*/
void CFast_fn_vSetDsgVarFloat(unsigned char ucId, AI_tdstMind *p_stPerso, C_TypeOfFloat xValue);
void LocalCFast_fn_vSetDsgVarFloat(unsigned char ucId, C_TypeOfFloat xValue);
/* eDsgVarType_Perso*/
void CFast_fn_vSetDsgVarPerso(unsigned char ucId, AI_tdstMind *p_stPerso, C_TypeOfPerso hPerso);
void LocalCFast_fn_vSetDsgVarPerso(unsigned char ucId, C_TypeOfPerso hPerso);
void CFast_fn_vSetDsgVarPersoWithEngine(unsigned char ucId, AI_tdstMind *p_stPerso, struct tdstEngineObject_ *hPerso);
void LocalCFast_fn_vSetDsgVarPersoWithEngine(unsigned char ucId, struct tdstEngineObject_ *hPerso);
/* eDsgVarType_Action*/
void CFast_fn_vSetDsgVarAction(unsigned char ucId, AI_tdstMind *p_stPerso, C_TypeOfAction hAction);
void LocalCFast_fn_vSetDsgVarAction(unsigned char ucId, C_TypeOfAction hAction);
/* eDsgVarType_Comport*/
void CFast_fn_vSetDsgVarComport(unsigned char ucId, AI_tdstMind *p_stPerso, C_TypeOfComport p_stComport);
void LocalCFast_fn_vSetDsgVarComport(unsigned char ucId, C_TypeOfComport p_stComport);
/* eDsgVarType_Vector*/
void CFast_fn_vSetDsgVarVector(unsigned char ucId, AI_tdstMind *p_stPerso,MTH3D_tdstVector *p_stVertex);
void LocalCFast_fn_vSetDsgVarVector(unsigned char ucId,MTH3D_tdstVector *p_stVertex);
/* eDsgVarType_Caps*/
void CFast_fn_vSetDsgVarCaps(unsigned char ucId, AI_tdstMind *p_stPerso, C_TypeOfCaps ulCaps);
void LocalCFast_fn_vSetDsgVarCaps(unsigned char ucId, C_TypeOfCaps ulCaps);
/* eDsgVarType_Graph*/
void CFast_fn_vSetDsgVarGraph(unsigned char ucId, AI_tdstMind *p_stPerso, C_TypeOfGraph hGraph);
void LocalCFast_fn_vSetDsgVarGraph(unsigned char ucId, C_TypeOfGraph hGraph);
/* eDsgVarType_WayPoint*/
void CFast_fn_vSetDsgVarWayPoint(unsigned char ucId, AI_tdstMind *p_stPerso, C_TypeOfWayPoint hWayPoint);
void LocalCFast_fn_vSetDsgVarWayPoint(unsigned char ucId, C_TypeOfWayPoint hWayPoint);
/* eDsgVarType_List*/
void CFast_fn_vSetDsgVarList(unsigned char ucId, AI_tdstMind *p_stPerso, tdstList *p_SrcList);
void LocalCFast_fn_vSetDsgVarList(unsigned char ucId, tdstList *p_SrcList);
/* eDsgVarType_Boolean*/
void CFast_fn_vSetDsgVarBoolean(unsigned char ucId, AI_tdstMind *p_stPerso, C_TypeOfBoolean bValue);
void LocalCFast_fn_vSetDsgVarBoolean(unsigned char ucId, C_TypeOfBoolean bValue);
/* eDsgVarType__128To127*/
void CFast_fn_vSetDsgVar_128To127(unsigned char ucId, AI_tdstMind *p_stPerso, long lValue);
void LocalCFast_fn_vSetDsgVar_128To127(unsigned char ucId, long lValue);
/* eDsgVarType_0To255*/
void CFast_fn_vSetDsgVar0To255(unsigned char ucId, AI_tdstMind *p_stPerso, long lValue);
void LocalCFast_fn_vSetDsgVar0To255(unsigned char ucId, long lValue);
/* eDsgVarType__32768To32767*/
void CFast_fn_vSetDsgVar_32768To32767(unsigned char ucId, AI_tdstMind *p_stPerso, long lValue);
void LocalCFast_fn_vSetDsgVar_32768To32767(unsigned char ucId, long lValue);
/* eDsgVarType_0To65535*/
void CFast_fn_vSetDsgVar0To65535(unsigned char ucId, AI_tdstMind *p_stPerso, long lValue);
void LocalCFast_fn_vSetDsgVar0To65535(unsigned char ucId, long lValue);
/* eDsgVarType_Integer*/
void CFast_fn_vSetDsgVarInteger(unsigned char ucId, AI_tdstMind *p_stPerso, long lValue);
void LocalCFast_fn_vSetDsgVarInteger(unsigned char ucId, long lValue);
/* eDsgVarType_PositiveInteger*/
void CFast_fn_vSetDsgVarPositiveInteger(unsigned char ucId, AI_tdstMind *p_stPerso, long lValue);
void LocalCFast_fn_vSetDsgVarPositiveInteger(unsigned char ucId, long lValue);
/* eDsgVarType_GameMaterial*/
void CFast_fn_vSetDsgVarGameMaterial(unsigned char ucId, AI_tdstMind *p_stPerso, C_TypeOfGameMaterial hGameMaterial);
void LocalCFast_fn_vSetDsgVarGameMaterial(unsigned char ucId, C_TypeOfGameMaterial hGameMaterial);
void CFast_fn_vSetDsgVarPersoArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex, C_TypeOfPerso hPerso);
void CFast_fn_vSetDsgVarPersoArrayWithEngine(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex, struct tdstEngineObject_ *hPerso) ;
void CFast_fn_vSetDsgVarVectorArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex, MTH3D_tdstVector *p_stVector);
void CFast_fn_vSetDsgVarFloatArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex, MTH_tdxReal xValue);
void CFast_fn_vSetDsgVarIntegerArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex, long lValue);
void CFast_fn_vSetDsgVarWayPointArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex, C_TypeOfWayPoint hWayPoint);
void CFast_fn_vSetDsgVarTextArray(unsigned char ucId, AI_tdstMind *p_stPerso, unsigned char ucTabIndex, char *p_szString);
void LocalCFast_fn_vSetDsgVarPersoArray(unsigned char ucId, unsigned char ucTabIndex, C_TypeOfPerso hPerso);
void LocalCFast_fn_vSetDsgVarPersoArrayWithEngine(unsigned char ucId, unsigned char ucTabIndex, struct tdstEngineObject_ *hPerso);
void LocalCFast_fn_vSetDsgVarVectorArray(unsigned char ucId, unsigned char ucTabIndex, MTH3D_tdstVector *p_stVector);
void LocalCFast_fn_vSetDsgVarFloatArray(unsigned char ucId, unsigned char ucTabIndex, MTH_tdxReal xValue);
void LocalCFast_fn_vSetDsgVarIntegerArray(unsigned char ucId, unsigned char ucTabIndex, long lValue);
void LocalCFast_fn_vSetDsgVarWayPointArray(unsigned char ucId, unsigned char ucTabIndex, C_TypeOfWayPoint hWayPoint);
void LocalCFast_fn_vSetDsgVarTextArray(unsigned char ucId, unsigned char ucTabIndex, char *p_szString);
/*******************************************************************************/
#undef EXTERN_AI_DLL
#endif /*D_DsgMem*/