reman3/Rayman_X/cpa/public/AI/AIBase/WParc.h

155 lines
4.9 KiB
C

/* 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