Add rayman2 source files
This commit is contained in:
47
Rayman_X/cpa/public/MEC/DNMLinkE.h
Normal file
47
Rayman_X/cpa/public/MEC/DNMLinkE.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*----------------------*/
|
||||
/* DNMLinkE.h */
|
||||
/*----------------------*/
|
||||
/* Date : 1997-04-02 */
|
||||
/* Version : 0.10 */
|
||||
/* Modify : 1997-04-02 */
|
||||
/* (c) Ubi R&D 1997 */
|
||||
/*----------------------*/
|
||||
|
||||
/*-----------------------*/
|
||||
/* Link Table */
|
||||
/*-----------------------*/
|
||||
|
||||
#ifndef __DNMLINKE_H__
|
||||
#define __DNMLINKE_H__
|
||||
|
||||
/* For DLL using these function */
|
||||
#include "cpa_expt.h"
|
||||
#include "SCR.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initialisation Function */
|
||||
extern CPA_EXPORT void DNM_fn_vInitLinkTableOfMecEnvironment();
|
||||
|
||||
#if !defined(U64)
|
||||
extern CPA_EXPORT SCR_tdst_Link_Table * DNM_fn_p_stGetMecEnvironementLinkTable();
|
||||
extern CPA_EXPORT SCR_tdst_Link_Table * DNM_fn_p_stGetMecEnvironmentLinkTable();
|
||||
#endif /* U64 */
|
||||
|
||||
/* Create an Entry */
|
||||
extern CPA_EXPORT void DNM_fn_v_SetValueInLinkTableOfMecEnvironment( char *_p_szKey,unsigned long _ulValue);
|
||||
|
||||
/* Find Handle with Key */
|
||||
extern CPA_EXPORT unsigned long DNM_fn_ulLink_SearchKeyInLinkTableOfMecEnvironment( char *_p_szKey);
|
||||
|
||||
/* Find Key with Handle */
|
||||
extern CPA_EXPORT char * DNM_fn_p_cSearchValueInLinkTableOfMecEnvironment( unsigned long _ulValue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DNMLINKE_H__ */
|
||||
|
77
Rayman_X/cpa/public/MEC/DNMLinkI.h
Normal file
77
Rayman_X/cpa/public/MEC/DNMLinkI.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/*----------------------*/
|
||||
/* DNMLinkI.h */
|
||||
/*----------------------*/
|
||||
/* Date : 1997-04-02 */
|
||||
/* Version : 0.10 */
|
||||
/* Modify : 1997-04-02 */
|
||||
/* (c) Ubi R&D 1997 */
|
||||
/*----------------------*/
|
||||
|
||||
/*-----------------------*/
|
||||
/* Link Table */
|
||||
/*-----------------------*/
|
||||
|
||||
#ifndef __DNMLINKI_H__
|
||||
#define __DNMLINKI_H__
|
||||
|
||||
/* For DLL using these function */
|
||||
#include "cpa_expt.h"
|
||||
#include "SCR.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initialisation Function */
|
||||
extern CPA_EXPORT void DNM_fn_vInitLinkTableOfIdCard();
|
||||
|
||||
/* Export the link table */
|
||||
|
||||
#if !defined(U64)
|
||||
extern CPA_EXPORT SCR_tdst_Link_Table * DNM_fn_p_stGetIdCardLinkTable();
|
||||
#endif /* U64 */
|
||||
|
||||
/* Create an Entry */
|
||||
extern CPA_EXPORT void DNM_fn_v_SetValueInLinkTableOfIdCard( char *_p_szKey,unsigned long _ulValue);
|
||||
|
||||
/* Find Handle with Key */
|
||||
extern CPA_EXPORT unsigned long DNM_fn_ulLink_SearchKeyInLinkTableOfIdCard( char *_p_szKey);
|
||||
|
||||
/* Find Key with Handle */
|
||||
extern CPA_EXPORT char * DNM_fn_p_cSearchValueInLinkTableOfIdCard( unsigned long _ulValue);
|
||||
|
||||
/* Return pointer on the link table */
|
||||
#if !defined(U64)
|
||||
extern CPA_EXPORT SCR_tdst_Link_Table * DNM_fn_p_stGetLinkTableOfIdCard(void);
|
||||
#endif /* U64 */
|
||||
|
||||
|
||||
/* Ronan*/
|
||||
#if !defined(U64)
|
||||
#define M_Export(Type) \
|
||||
extern CPA_EXPORT void DNM_fn_vWriteAllMec##Type##BinaryBlocs( \
|
||||
char *_szBinaryFileName); \
|
||||
extern CPA_EXPORT void DNM_fn_vReadAllMec##Type##BinaryBlocs( \
|
||||
char *_szBinaryFileName); \
|
||||
extern CPA_EXPORT SCR_tdst_Link_Table stLinkTableOfMec##Type##;
|
||||
#else /* U64 */
|
||||
#define M_Export(Type) \
|
||||
extern CPA_EXPORT void DNM_fn_vWriteAllMec##Type##BinaryBlocs( \
|
||||
char *_szBinaryFileName); \
|
||||
extern CPA_EXPORT void DNM_fn_vReadAllMec##Type##BinaryBlocs( \
|
||||
char *_szBinaryFileName);
|
||||
#endif /* U64 */
|
||||
|
||||
M_Export(CameraIdCard)
|
||||
M_Export(BaseIdCard)
|
||||
|
||||
|
||||
#if !defined(U64)
|
||||
extern SCR_tdst_Link_Table* g_a_p_stIdCardsLinkTables[2];
|
||||
#endif /* U64 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DNMLINKE_H__ */
|
102
Rayman_X/cpa/public/MEC/DNMLoadI.h
Normal file
102
Rayman_X/cpa/public/MEC/DNMLoadI.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/*----------------------*/
|
||||
/* DNMLoadI.h */
|
||||
/*----------------------*/
|
||||
|
||||
#ifndef __DNMLOADI_H__
|
||||
#define __DNMLOADI_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cpa_std.h"
|
||||
#include "MEC/hIdCard.h"
|
||||
|
||||
#include "MEC/DNMLinkI.h"
|
||||
|
||||
/* For DLL using these function */
|
||||
#include "cpa_expt.h"
|
||||
#include "SCR.h"
|
||||
|
||||
#define C_SectionIdCardCamera "IdCardCamera"
|
||||
|
||||
/* camera */
|
||||
#define C_EntryAngularSpeed "AngularSpeed"
|
||||
#define C_EntryLinearSpeed "LinearSpeed"
|
||||
#define C_EntrySpeedingUp "SpeedingUp"
|
||||
|
||||
/*** MecBaseIdCard scripts ***/
|
||||
#define C_SectionMecBaseIdCardDescription "MecBaseIdCard"
|
||||
#define C_EntryMecBaseIdCardChamp "Champ"
|
||||
#define C_EntryBaseAnimation "Animation"
|
||||
#define C_EntryBaseCollide "Collide"
|
||||
#define C_EntryBaseGravity "Gravity"
|
||||
#define C_EntryBaseGi "Gi"
|
||||
#define C_EntryBaseOnGround "OnGround"
|
||||
#define C_EntryBaseClimb "Climb"
|
||||
#define C_EntryBaseSpider "Spider"
|
||||
#define C_EntryBaseShoot "Shoot"
|
||||
#define C_EntryBaseSwim "Swim"
|
||||
#define C_EntryBaseTilt "Tilt"
|
||||
#define C_EntryBaseCollisionControl "CollisionControl"
|
||||
#define C_EntryBaseKeepWallSpeedZ "KeepSpeedZ"
|
||||
#define C_EntryBaseSpeedLimit "SpeedLimit"
|
||||
#define C_EntryBaseInertia "Inertia"
|
||||
#define C_EntryBaseStream "Stream"
|
||||
#define C_EntryBaseStickOnPlatform "StickOnPlatform"
|
||||
#define C_EntryBaseUseScale "Scale"
|
||||
#define C_EntryBaseGravityFactor "G"
|
||||
#define C_EntryBaseSlide "Slide"
|
||||
#define C_EntryBaseRebound "Rebound"
|
||||
#define C_EntryBaseSlopeLimit "SlopeLimit"
|
||||
#define C_EntryBaseInertiaFactorX "Ix"
|
||||
#define C_EntryBaseInertiaFactorY "Iy"
|
||||
#define C_EntryBaseInertiaFactorZ "Iz"
|
||||
#define C_EntryBaseTiltIntensity "TiltIntensity"
|
||||
#define C_EntryBaseTiltInertia "TiltInertia"
|
||||
#define C_EntryBaseTiltOrigin "TiltOrigin"
|
||||
#define C_EntryBaseMaxSpeed "MaxSpeed"
|
||||
#define C_SectionIdCardBase "IdCardBase"
|
||||
|
||||
|
||||
#if !defined(U64)
|
||||
|
||||
/*---------------------*/
|
||||
/* Call Back */
|
||||
/* to Read Camera IdCard */
|
||||
/*---------------------*/
|
||||
SCR_tde_Anl_ReturnValue DNM_fn_eScriptCallBackCameraIdCard(
|
||||
SCR_tdst_File_Description *_p_stFile,
|
||||
char *_p_szName,
|
||||
char *_ap_szPars[],
|
||||
SCR_tde_Anl_Action _eAction);
|
||||
/*---------------------
|
||||
* Call Back
|
||||
* to Base IdCard
|
||||
* jt 19/01/98
|
||||
*---------------------*/
|
||||
SCR_tde_Anl_ReturnValue DNM_fn_eScriptCallBackBaseIdCard(
|
||||
SCR_tdst_File_Description *_p_stFile,
|
||||
char *_p_szName,
|
||||
char *_ap_szPars[],
|
||||
SCR_tde_Anl_Action _eAction);
|
||||
|
||||
|
||||
#endif /* U64 */
|
||||
|
||||
/*------------------------------------------------*/
|
||||
/* Description : Init the load of IdCard */
|
||||
/*------------------------------------------------*/
|
||||
void DNM_fn_vInitLoadIdCard(void);
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : Prepare save of all Id cards
|
||||
*---------------------------------------------------------------------------*/
|
||||
void DNM_fn_vPrepareSaveMecIdCards();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}/* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*__DNMLOADI_H__ */
|
157
Rayman_X/cpa/public/MEC/DNMMth.h
Normal file
157
Rayman_X/cpa/public/MEC/DNMMth.h
Normal file
@@ -0,0 +1,157 @@
|
||||
#ifndef _DNMMTH_H_
|
||||
#define _DNMMTH_H_
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "Mth.h"
|
||||
|
||||
/*
|
||||
* Rotation
|
||||
*/
|
||||
|
||||
typedef struct MTH_stRotation
|
||||
{
|
||||
MTH_tdxReal m_xAngle;
|
||||
MTH3D_tdstVector m_stAxis; /* ||m_stAxis|| = 1 */
|
||||
} MTH_tdstRotation;
|
||||
|
||||
/* Methods */
|
||||
|
||||
/* Accessors */
|
||||
#define MTH_M_xRotationGetAngle(_p_stRotation) ((_p_stRotation)->m_xAngle)
|
||||
#define MTH_M_p_stRotationGetAxis(_p_stRotation) (&(_p_stRotation)->m_stAxis)
|
||||
#define MTH_M_xRotationSetAngle(_p_stRotation,_xValue) ((_p_stRotation)->m_xAngle = _xValue)
|
||||
#define MTH_M_RotationSetAxis(_p_stRotation,_p_stVector) MTH3D_M_vCopyVector(&(_p_stRotation)->m_stAxis,_p_stVector)
|
||||
|
||||
/* Clone */
|
||||
#define MTH_M_RotationCopyClone(_p_stDst,_p_stSrc) {\
|
||||
(_p_stDst)->m_xAngle = (_p_stSrc)->m_xAngle;\
|
||||
MTH3D_M_vCopyVector(&(_p_stDst)->m_stAxis,&(_p_stSrc)->m_stAxis);\
|
||||
}
|
||||
|
||||
/* Set rotation */
|
||||
#define MTH_M_RotationSet(_p_stRotation,_xAngle,_p_stAxis) {\
|
||||
MTH_M_xRotationSetAngle(_p_stRotation,_xAngle);\
|
||||
MTH_M_RotationSetAxis(_p_stRotation,_p_stAxis);\
|
||||
}
|
||||
|
||||
/* Set null rotation */
|
||||
#define MTH_M_RotationSetNull(_p_stRotation) {\
|
||||
(_p_stRotation)->m_xAngle = MTH_C_ZERO;\
|
||||
MTH3D_M_vNullVector(&(_p_stRotation)->m_stAxis);\
|
||||
}
|
||||
|
||||
/* TRUE if null */
|
||||
#define MTH_M_bRotationIsNull(_p_stRotation) (MTH_M_xRotationGetAngle(_p_stRotation) == MTH_C_ZERO)
|
||||
|
||||
|
||||
/*
|
||||
* Move
|
||||
*/
|
||||
|
||||
typedef struct MTH_stMove
|
||||
{
|
||||
MTH3D_tdstVector m_stLinear;
|
||||
MTH_tdstRotation m_stAngular;
|
||||
} MTH_tdstMove;
|
||||
|
||||
/* Methods */
|
||||
|
||||
/* Accessors */
|
||||
#define MTH_M_p_stMoveGetLinear(_p_stMove) (&(_p_stMove)->m_stLinear)
|
||||
#define MTH_M_p_stMoveGetAngular(_p_stMove) (&(_p_stMove)->m_stAngular)
|
||||
#define MTH_M_MoveSetLinear(_p_stMove,_p_stVector) MTH3D_M_vCopyVector(&(_p_stMove)->m_stLinear,_p_stVector)
|
||||
#define MTH_M_MoveSetAngular(_p_stMove,_p_stRotation) MTH3D_M_vCopyVector(&(_p_stMove)->m_stAngular,_p_stRotation)
|
||||
|
||||
|
||||
#define MTH_M_MoveSetAngularPosition(_p_stMove,_xAngle,_p_stAxis) {\
|
||||
MTH_M_xRotationSetAngle(&(_p_stMove)->m_stAngular,_xAngle);\
|
||||
MTH_M_RotationSetAxis(&(_p_stMove)->m_stAngular,_p_stAxis);\
|
||||
}
|
||||
|
||||
/* Clone */
|
||||
#define MTH_M_MoveCopyClone(_p_stDst,_p_stSrc) {\
|
||||
MTH3D_M_vCopyVector(&(_p_stDst)->m_stLinear,&(_p_stSrc)->m_stLinear);\
|
||||
MTH_M_RotationCopyClone(&(_p_stDst)->m_stAngular,&(_p_stSrc)->m_stAngular);\
|
||||
}
|
||||
|
||||
/* Set linear part of a move to null */
|
||||
#define MTH_M_MoveSetLinearToNull(_p_stMove) MTH3D_M_vNullVector(&(_p_stMove)->m_stLinear)
|
||||
|
||||
/* Set angular part of a move to null */
|
||||
#define MTH_M_MoveSetAngularToNull(_p_stMove) MTH_M_RotationSetNull(&(_p_stMove)->m_stAngular)
|
||||
|
||||
/* Set null move */
|
||||
#define MTH_M_MoveSetNull(_p_stMove) {\
|
||||
MTH3D_M_vNullVector(&(_p_stMove)->m_stLinear);\
|
||||
MTH_M_RotationSetNull(&(_p_stMove)->m_stAngular);\
|
||||
}
|
||||
|
||||
/* Test if null */
|
||||
#define MTH_M_bMoveIsNull(_p_stMove) (MTH3D_M_bIsNullVector(MTH_M_p_stMoveGetLinear(_p_stMove)) & MTH_M_bRotationIsNull(MTH_M_p_stMoveGetAngular(_p_stMove)))
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*=================================================================================================
|
||||
Projection of a vector on a plane
|
||||
Beware : ||_p_stPlaneNorm|| = ||_p_stProjDirection)|| = 1
|
||||
*=================================================================================================
|
||||
*/
|
||||
void MTH_fn_vVectorPlaneProjection
|
||||
(
|
||||
MTH3D_tdstVector *_p_stResult,
|
||||
MTH3D_tdstVector *_p_stSource,
|
||||
MTH3D_tdstVector *_p_stPlaneNorm,
|
||||
MTH3D_tdstVector *_p_stProjDirection
|
||||
);
|
||||
|
||||
/*
|
||||
*=================================================================================================
|
||||
Compute a rotation thanks a source vector and an image vector
|
||||
||_p_stSrcUnitVector|| = ||_p_stImaUnitVector|| = 1
|
||||
*=================================================================================================
|
||||
*/
|
||||
|
||||
MTH_tdstRotation *MTH_p_stRotationComputeRotationWith2Vectors
|
||||
(
|
||||
MTH_tdstRotation *_p_stResult,
|
||||
MTH3D_tdstVector *_p_stSrcUnitVector,
|
||||
MTH3D_tdstVector *_p_stImaUnitVector
|
||||
);
|
||||
/*
|
||||
*=================================================================================================
|
||||
Rotation(Vector/Point)
|
||||
*=================================================================================================
|
||||
*/
|
||||
MTH3D_tdstVector *MTH_p_stRotationMulVector
|
||||
(
|
||||
MTH_tdstRotation *_p_stRotation,
|
||||
MTH3D_tdstVector *_p_stSource,
|
||||
MTH3D_tdstVector *_p_stResult
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
*=================================================================================================
|
||||
Matrix -> Rotation
|
||||
*=================================================================================================
|
||||
*/
|
||||
MTH_tdstRotation *MTH_p_stRotationFromMatrix
|
||||
(
|
||||
MTH_tdstRotation *_p_stResult,
|
||||
MTH3D_tdstMatrix *_p_stRotationMatrix
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
20
Rayman_X/cpa/public/MEC/DNMObsTy.h
Normal file
20
Rayman_X/cpa/public/MEC/DNMObsTy.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef _DNMOBSTY_H_
|
||||
#define _DNMOBSTY_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
DNM_ObsType_Nothing=0,
|
||||
DNM_ObsType_Scenery=0x1,
|
||||
DNM_ObsType_Mobile=0x2,
|
||||
DNM_ObsType_DoubleEdge=0x4,
|
||||
DNM_ObsType_MobileWall=0x9
|
||||
} DNM_tdeObstacleType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
100
Rayman_X/cpa/public/MEC/DNMObsta.h
Normal file
100
Rayman_X/cpa/public/MEC/DNMObsta.h
Normal file
@@ -0,0 +1,100 @@
|
||||
#ifndef _DNMOBSTA_H_
|
||||
#define _DNMOBSTA_H_
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "MecMatCa.h"
|
||||
#include "DNMObsTy.h"
|
||||
/*#include "dnmlimty.h"*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Define the type DNM_tdstObstacle */
|
||||
|
||||
typedef struct DNM_stObstacle
|
||||
{
|
||||
MTH_tdxReal m_xRate;
|
||||
MTH3D_tdstVector m_stNorm;
|
||||
MTH3D_tdstVector m_stContact;
|
||||
GMT_tdxHandleToGameMaterial hMyMaterial;
|
||||
GMT_tdxHandleToGameMaterial hCollidedMaterial;
|
||||
HIE_tdxHandleToSuperObject mp_stSupObj; /* Collided object */
|
||||
} DNM_tdstObstacle;
|
||||
|
||||
|
||||
typedef struct DNM_stMecObstacle
|
||||
{
|
||||
MTH_tdxReal m_xRate;
|
||||
MTH3D_tdstVector m_stNorm;
|
||||
MTH3D_tdstVector m_stContact;
|
||||
GMT_tdxHandleToGameMaterial hMyMaterial;
|
||||
GMT_tdxHandleToGameMaterial hCollidedMaterial;
|
||||
HIE_tdxHandleToSuperObject mp_stSupObj; /* Collided object */
|
||||
|
||||
DNM_tdeObstacleType m_eType;
|
||||
ACP_tdxIndex m_xMyEntity; /* type of element : segment, point, edge, ... */
|
||||
ACP_tdxIndex m_xCollidedEntity; /* type of element : segment, point, edge, ... */
|
||||
MTH3D_tdstVector m_stTranslation; /* translation to get the actor out of the obstacle */
|
||||
MTH3D_tdstVector m_stZoneMove; /* zone movement */
|
||||
MTH3D_tdstVector m_stZonePosition; /* zone position when collide */
|
||||
MTH_tdxReal m_xZoneRadius; /* radius of the collide zone */
|
||||
DNM_tdstMecMatCharacteristics m_stProperties; /* Material properties */
|
||||
DNM_tdstMecMatCharacteristics m_stMyProperties; /* Material properties of mine */
|
||||
} DNM_tdstMecObstacle;
|
||||
|
||||
|
||||
/* Methods */
|
||||
|
||||
/* Accessors */
|
||||
#define DNM_M_eObstacleGetType(_p_stObstacle) ((_p_stObstacle)->m_eType)
|
||||
#define DNM_M_xObstacleGetRate(_p_stObstacle) ((_p_stObstacle)->m_xRate)
|
||||
#define DNM_M_p_stObstacleGetNorm(_p_stObstacle) (&(_p_stObstacle)->m_stNorm)
|
||||
#define DNM_M_p_stObstacleGetContact(_p_stObstacle) (&(_p_stObstacle)->m_stContact)
|
||||
#define DNM_M_p_stObstacleGetProperties(_p_stObstacle) (&(_p_stObstacle)->m_stProperties)
|
||||
#define DNM_M_p_stObstacleGetMyProperties(_p_stObstacle) (&(_p_stObstacle)->m_stMyProperties)
|
||||
#define DNM_M_p_stObstacleGetObject(_p_stObstacle) ((_p_stObstacle)->mp_stSupObj)
|
||||
#define DNM_M_hObstacleGetCollidedMaterial(_p_stObstacle) ((_p_stObstacle)->hCollidedMaterial)
|
||||
#define DNM_M_hObstacleGetMyMaterial(_p_stObstacle) ((_p_stObstacle)->hMyMaterial)
|
||||
#define DNM_M_xObstacleGetMyEntity(_p_stObstacle) ((_p_stObstacle)->m_xMyEntity)
|
||||
#define DNM_M_xObstacleGetCollidedEntity(_p_stObstacle) ((_p_stObstacle)->m_xCollidedEntity)
|
||||
#define DNM_M_xObstacleGetTranslation(_p_stObstacle) (& (_p_stObstacle)->m_stTranslation)
|
||||
#define DNM_M_pObstacleGetZoneMove(_p_stObstacle) (& (_p_stObstacle)->m_stZoneMove)
|
||||
#define DNM_M_pObstacleGetZonePosition(_p_stObstacle) (& (_p_stObstacle)->m_stZonePosition)
|
||||
#define DNM_M_xObstacleGetZoneRadius(_p_stObstacle) ((_p_stObstacle)->m_xZoneRadius)
|
||||
|
||||
#define DNM_M_eObstacleSetType(_p_stObstacle,_eType) (DNM_M_eObstacleGetType(_p_stObstacle) = _eType)
|
||||
#define DNM_M_xObstacleSetRate(_p_stObstacle,_xRate) ((_p_stObstacle)->m_xRate = _xRate)
|
||||
#define DNM_M_ObstacleSetNorm(_p_stObstacle,_p_stVector) MTH3D_M_vCopyVector(DNM_M_p_stObstacleGetNorm(_p_stObstacle),_p_stVector)
|
||||
#define DNM_M_ObstacleSetContact(_p_stObstacle,_p_stVector) MTH3D_M_vCopyVector(DNM_M_p_stObstacleGetContact(_p_stObstacle),_p_stVector)
|
||||
#define DNM_M_ObstacleSetProperties(_p_stObstacle,_p_stPhyProperties) DNM_M_MatCharacteristicsCopyClone(&(_p_stObstacle)->m_stProperties,_p_stPhyProperties)
|
||||
#define DNM_M_ObstacleSetMyProperties(_p_stObstacle,_p_stPhyProperties) DNM_M_MatCharacteristicsCopyClone(&(_p_stObstacle)->m_stMyProperties,_p_stPhyProperties)
|
||||
#define DNM_M_p_stObstacleSetObject(_p_stObstacle,_p_stObject) (DNM_M_p_stObstacleGetObject(_p_stObstacle) = _p_stObject)
|
||||
#define DNM_M_vObstacleSetCollidedMaterial(_p_stObstacle,_hMaterial) (DNM_M_hObstacleGetCollidedMaterial(_p_stObstacle) = _hMaterial)
|
||||
#define DNM_M_vObstacleSetMyMaterial(_p_stObstacle,_hMaterial) (DNM_M_hObstacleGetMyMaterial(_p_stObstacle) = _hMaterial)
|
||||
#define DNM_M_xObstacleSetMyEntity(_p_stObstacle,_xValue) (DNM_M_xObstacleGetMyEntity(_p_stObstacle) = (_xValue))
|
||||
#define DNM_M_xObstacleSetCollidedEntity(_p_stObstacle,_xValue) (DNM_M_xObstacleGetCollidedEntity(_p_stObstacle) = (_xValue))
|
||||
#define DNM_M_xObstacleSetTranslation(_p_stObstacle,_p_stVector) MTH3D_M_vCopyVector(DNM_M_xObstacleGetTranslation(_p_stObstacle), _p_stVector)
|
||||
#define DNM_M_xObstacleSetZoneMove(_p_stObstacle,_p_stVector) MTH3D_M_vCopyVector(DNM_M_pObstacleGetZoneMove(_p_stObstacle), _p_stVector)
|
||||
#define DNM_M_xObstacleSetZonePosition(_p_stObstacle,_p_stVector) MTH3D_M_vCopyVector(DNM_M_pObstacleGetZonePosition(_p_stObstacle), _p_stVector)
|
||||
#define DNM_M_xObstacleSetZoneRadius(_p_stObstacle,_xRadius) (DNM_M_xObstacleGetZoneRadius(_p_stObstacle)=_xRadius)
|
||||
|
||||
/* Short cuts */
|
||||
#define DNM_M_xObstacleGetSlide(_p_stObstacle) DNM_M_xMatCharacteristicsGetSlide(DNM_M_p_stObstacleGetProperties(_p_stObstacle))
|
||||
#define DNM_M_xObstacleGetRebound(_p_stObstacle) DNM_M_xMatCharacteristicsGetRebound(DNM_M_p_stObstacleGetProperties(_p_stObstacle))
|
||||
|
||||
|
||||
#define DNM_M_xObstacleSetSlide(_p_stObstacle,_xValue) DNM_M_xMatCharacteristicsSetSlide(DNM_M_p_stObstacleGetProperties(_p_stObstacle),_xValue)
|
||||
#define DNM_M_xObstacleSetRebound(_p_stObstacle,_xValue) DNM_M_xMatCharacteristicsSetRebound(DNM_M_p_stObstacleGetProperties(_p_stObstacle),_xValue)
|
||||
|
||||
/* Clone */
|
||||
#define DNM_M_ObstacleCopyClone(_p_stDst,_p_stSrc) memcpy(_p_stDst,_p_stSrc,sizeof(DNM_tdstObstacle))
|
||||
#define DNM_M_MecObstacleCopyClone(_p_stDst,_p_stSrc) memcpy(_p_stDst,_p_stSrc,sizeof(DNM_tdstMecObstacle))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
159
Rayman_X/cpa/public/MEC/DNMRepor.h
Normal file
159
Rayman_X/cpa/public/MEC/DNMRepor.h
Normal file
@@ -0,0 +1,159 @@
|
||||
#ifndef __DNMREPOR_H__
|
||||
#define __DNMREPOR_H__
|
||||
|
||||
#include "DNMDynSt.h"
|
||||
#include "DNMMth.h"
|
||||
#include "DNMObsta.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define DNM_C_ReportCollision 0x00000001
|
||||
#define DNM_C_ReportWall 0x00000002 /* Set when object collides with a wall */
|
||||
#define DNM_C_ReportChar 0x00000004 /* Set when contact with an other character */
|
||||
|
||||
|
||||
|
||||
/* Define the structure DNM_tdstReport */
|
||||
typedef struct DNM_stReport
|
||||
{
|
||||
/* Surface report */
|
||||
unsigned long m_ulPrevSurfaceState;
|
||||
unsigned long m_ulCurrSurfaceState;
|
||||
|
||||
/* Obstacle report */
|
||||
DNM_tdstObstacle m_stObstacle;
|
||||
DNM_tdstObstacle m_stGround;
|
||||
DNM_tdstObstacle m_stWall;
|
||||
DNM_tdstObstacle m_stCharacter;
|
||||
DNM_tdstObstacle m_stWater;
|
||||
DNM_tdstObstacle m_stCeil;
|
||||
|
||||
/* Kinetic report (only for camera) */
|
||||
MTH_tdstMove m_stAbsolutePrevSpeed;
|
||||
MTH_tdstMove m_stAbsoluteCurrSpeed;
|
||||
MTH_tdstMove m_stAbsolutePrevPosition;
|
||||
MTH_tdstMove m_stAbsoluteCurrPosition;
|
||||
|
||||
/* For Camera */ /* <-- only for camera, why ? */
|
||||
char m_cBitField;
|
||||
} DNM_tdstReport;
|
||||
|
||||
|
||||
/* Define the structure DNM_tdstReport */
|
||||
typedef struct DNM_stMecReport
|
||||
{
|
||||
/* Surface report */
|
||||
unsigned long m_ulCurrSurfaceState;
|
||||
|
||||
/* Obstacle report */
|
||||
DNM_tdstMecObstacle m_stObstacle;
|
||||
DNM_tdstMecObstacle m_stGround;
|
||||
DNM_tdstMecObstacle m_stWall;
|
||||
DNM_tdstMecObstacle m_stCharacter;
|
||||
DNM_tdstMecObstacle m_stWater;
|
||||
DNM_tdstMecObstacle m_stCeil;
|
||||
} DNM_tdstMecReport;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Methods */
|
||||
|
||||
/* Accessors */
|
||||
#define DNM_M_ulReportGetSurfaceState(_p_stReport) ((_p_stReport)->m_ulCurrSurfaceState)
|
||||
#define DNM_M_ulReportGetPrevSurfaceState(_p_stReport) ((_p_stReport)->m_ulPrevSurfaceState)
|
||||
#define DNM_M_p_stReportGetAbsolutePrevSpeed(_p_stReport) (&(_p_stReport)->m_stAbsolutePrevSpeed)
|
||||
#define DNM_M_p_stReportGetAbsoluteCurrSpeed(_p_stReport) (&(_p_stReport)->m_stAbsoluteCurrSpeed)
|
||||
#define DNM_M_p_stReportGetAbsolutePrevPosition(_p_stReport) (&(_p_stReport)->m_stAbsolutePrevPosition)
|
||||
#define DNM_M_p_stReportGetAbsoluteCurrPosition(_p_stReport) (&(_p_stReport)->m_stAbsoluteCurrPosition)
|
||||
#define DNM_M_p_stReportGetObstacle(_p_stReport) (&(_p_stReport)->m_stObstacle)
|
||||
#define DNM_M_p_stReportGetGround(_p_stReport) (&(_p_stReport)->m_stGround)
|
||||
#define DNM_M_p_stReportGetWall(_p_stReport) (&(_p_stReport)->m_stWall)
|
||||
#define DNM_M_p_stReportGetCharacter(_p_stReport) (&(_p_stReport)->m_stCharacter)
|
||||
#define DNM_M_p_stReportGetWater(_p_stReport) (&(_p_stReport)->m_stWater)
|
||||
#define DNM_M_p_stReportGetCeil(_p_stReport) (&(_p_stReport)->m_stCeil)
|
||||
|
||||
#define DNM_M_ulReportSetSurfaceState(_p_stReport,_ulValue) (DNM_M_ulReportGetSurfaceState(_p_stReport) = _ulValue)
|
||||
#define DNM_M_ulReportAddSurfaceState(_p_stReport,_ulValue) (DNM_M_ulReportGetSurfaceState(_p_stReport) |= (_ulValue))
|
||||
#define DNM_M_ulReportSetPrevSurfaceState(_p_stReport,_ulValue) (DNM_M_ulReportGetPrevSurfaceState(_p_stReport) = _ulValue)
|
||||
#define DNM_M_eReportSetPrevVolumicEnvironment(_p_stReport,_eVolumicEnvironment) (DNM_M_eReportGetPrevVolumicEnvironment(_p_stReport) = _eVolumicEnvironment)
|
||||
#define DNM_M_eReportSetCurrentVolumicEnvironment(_p_stReport,_eVolumicEnvironment) (DNM_M_eReportGetCurrentVolumicEnvironment(_p_stReport) = _eVolumicEnvironment)
|
||||
#define DNM_M_ReportSetAbsolutePrevSpeed(_p_stReport,_p_stMove) MTH_M_MoveCopyClone(DNM_M_p_stReportGetAbsolutePrevSpeed(_p_stReport),_p_stMove)
|
||||
#define DNM_M_ReportSetAbsoluteCurrSpeed(_p_stReport,_p_stMove) MTH_M_MoveCopyClone(DNM_M_p_stReportGetAbsoluteCurrSpeed(_p_stReport),_p_stMove)
|
||||
#define DNM_M_ReportSetAbsolutePrevPosition(_p_stReport,_p_stMove) MTH_M_MoveCopyClone(DNM_M_p_stReportGetAbsolutePrevPosition(_p_stReport),_p_stMove)
|
||||
#define DNM_M_ReportSetAbsoluteCurrPosition(_p_stReport,_p_stMove) MTH_M_MoveCopyClone(DNM_M_p_stReportGetAbsoluteCurrPosition(_p_stReport),_p_stMove)
|
||||
|
||||
#define DNM_M_ReportSetObstacle(_p_stReport,_p_stObstacle) DNM_M_ObstacleCopyClone(&(_p_stReport)->m_stObstacle,_p_stObstacle)
|
||||
#define DNM_M_ReportSetGround(_p_stReport,_p_stObstacle) DNM_M_ObstacleCopyClone(&(_p_stReport)->m_stGround,_p_stObstacle)
|
||||
#define DNM_M_ReportSetWall(_p_stReport,_p_stObstacle) DNM_M_ObstacleCopyClone(DNM_M_p_stReportGetWall(_p_stReport),_p_stObstacle)
|
||||
#define DNM_M_ReportSetCharacter(_p_stReport,_p_stObstacle) DNM_M_ObstacleCopyClone(DNM_M_p_stReportGetCharacter(_p_stReport),_p_stObstacle)
|
||||
#define DNM_M_ReportSetWater(_p_stReport,_p_stObstacle) DNM_M_ObstacleCopyClone(DNM_M_p_stReportGetWater(_p_stReport),_p_stObstacle)
|
||||
#define DNM_M_ReportSetCeil(_p_stReport,_p_stObstacle) DNM_M_ObstacleCopyClone(DNM_M_p_stReportGetCeil(_p_stReport),_p_stObstacle)
|
||||
|
||||
#define DNM_M_MecReportSetObstacle(_p_stReport,_p_stObstacle) DNM_M_MecObstacleCopyClone(&(_p_stReport)->m_stObstacle,_p_stObstacle)
|
||||
#define DNM_M_MecReportSetGround(_p_stReport,_p_stObstacle) DNM_M_MecObstacleCopyClone(&(_p_stReport)->m_stGround,_p_stObstacle)
|
||||
#define DNM_M_MecReportSetWall(_p_stReport,_p_stObstacle) DNM_M_MecObstacleCopyClone(DNM_M_p_stReportGetWall(_p_stReport),_p_stObstacle)
|
||||
#define DNM_M_MecReportSetCharacter(_p_stReport,_p_stObstacle) DNM_M_MecObstacleCopyClone(DNM_M_p_stReportGetCharacter(_p_stReport),_p_stObstacle)
|
||||
#define DNM_M_MecReportSetWater(_p_stReport,_p_stObstacle) DNM_M_MecObstacleCopyClone(DNM_M_p_stReportGetWater(_p_stReport),_p_stObstacle)
|
||||
#define DNM_M_MecReportSetCeil(_p_stReport,_p_stObstacle) DNM_M_MecObstacleCopyClone(DNM_M_p_stReportGetCeil(_p_stReport),_p_stObstacle)
|
||||
|
||||
|
||||
#define DNM_M_bReportIsWall(_p_stReport) ( _p_stReport->m_cBitField & DNM_C_ReportWall ? TRUE : FALSE )
|
||||
#define DNM_M_bReportSetWallFlagToFalse(_p_stReport) ( _p_stReport->m_cBitField &= ~DNM_C_ReportWall )
|
||||
#define DNM_M_bReportSetWallFlagToTrue(_p_stReport) ( _p_stReport->m_cBitField |= DNM_C_ReportWall )
|
||||
|
||||
#define DNM_M_bReportIsChar(_p_stReport) ( _p_stReport->m_cBitField & DNM_C_ReportChar ? TRUE : FALSE )
|
||||
#define DNM_M_bReportSetCharFlagToFalse(_p_stReport) ( _p_stReport->m_cBitField &= ~DNM_C_ReportChar )
|
||||
#define DNM_M_bReportSetCharFlagToTrue(_p_stReport) ( _p_stReport->m_cBitField |= DNM_C_ReportChar )
|
||||
|
||||
|
||||
/*
|
||||
* for camera
|
||||
*----------------
|
||||
*/
|
||||
#define DNM_M_vReportSetLastMove(__p_stReport, __p_stMove) MTH_M_MoveSetLinear(&__p_stReport->m_stAbsolutePrevSpeed, __p_stMove)
|
||||
#define DNM_M_p_stReportGetLastMove(__p_stReport) (MTH_M_p_stMoveGetLinear(&__p_stReport->m_stAbsolutePrevSpeed))
|
||||
|
||||
#define DNM_M_vReportSetLastTgtMove(__p_stReport, __p_stMove) MTH_M_MoveSetLinear(&__p_stReport->m_stAbsolutePrevPosition, __p_stMove)
|
||||
#define DNM_M_p_stReportGetLastTgtMove(__p_stReport) (MTH_M_p_stMoveGetLinear(&__p_stReport->m_stAbsolutePrevPosition))
|
||||
|
||||
#define DNM_M_bReportCollision(_p_stReport) ( _p_stReport->m_cBitField & DNM_C_ReportCollision ? TRUE : FALSE )
|
||||
#define DNM_M_bReportSetCollisionFlagToFalse(_p_stReport) ( _p_stReport->m_cBitField &= ~DNM_C_ReportCollision )
|
||||
#define DNM_M_bReportSetCollisionFlagToTrue(_p_stReport) ( _p_stReport->m_cBitField |= DNM_C_ReportCollision )
|
||||
|
||||
#define DNM_M_bDynamicsIsAnimation(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Animation ? TRUE: FALSE)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* end for camera
|
||||
*----------------
|
||||
*/
|
||||
|
||||
|
||||
/* Clone */
|
||||
#define DNM_M_ReportCopyClone(_p_stDst,_p_stSrc) memcpy(_p_stDst,_p_stSrc,sizeof(DNM_tdstReport))
|
||||
|
||||
/* Copy current state values into previous kinetic values */
|
||||
/*#define DNM_M_ReportStateTranslate(_p_stReport) {\*/
|
||||
/* DNM_M_eReportSetPrevDynamicalState(_p_stReport,DNM_M_eReportGetDynamicalState(_p_stReport));\*/
|
||||
/* DNM_M_ulReportSetPrevSurfaceState(_p_stReport,DNM_M_ulReportGetSurfaceState(_p_stReport));\*/
|
||||
/*}*/
|
||||
|
||||
#define DNM_M_ReportStateTranslate(_p_stReport) (DNM_M_ulReportSetPrevSurfaceState(_p_stReport,DNM_M_ulReportGetSurfaceState(_p_stReport)))
|
||||
|
||||
|
||||
/* Default initialisation */
|
||||
DNM_tdstReport *DNM_p_stReportDefaultInit(DNM_tdstReport *_p_stReport);
|
||||
|
||||
extern DNM_tdstMecReport g_stReport;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
61
Rayman_X/cpa/public/MEC/DNMSLAVE.H
Normal file
61
Rayman_X/cpa/public/MEC/DNMSLAVE.H
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef _DNMSLAVE_H_
|
||||
#define _DNMSLAVE_H_
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct CAM_stServCtrlCamera
|
||||
{
|
||||
|
||||
MTH_tdxReal m_xHorizontalAngle;
|
||||
|
||||
MTH_tdxReal m_xVerticalAngle;
|
||||
|
||||
MTH_tdxReal m_xDistance;
|
||||
|
||||
|
||||
} CAM_tdstServCtrlCamera;
|
||||
|
||||
#define CAM_M_xGetServCtrlCameraHorizontal(_p_stServCtrlCamera) ((_p_stServCtrlCamera)->m_xHorizontalAngle)
|
||||
#define CAM_M_xGetServCtrlCameraVertical(_p_stServCtrlCamera) ((_p_stServCtrlCamera)->m_xVerticalAngle)
|
||||
#define CAM_M_xGetServCtrlCameraDistance(_p_stServCtrlCamera) ((_p_stServCtrlCamera)->m_xDistance)
|
||||
|
||||
#define CAM_M_vSetServCtrlCameraHorizontal(_p_stServCtrlCamera,xVal) ((_p_stServCtrlCamera)->m_xHorizontalAngle = xVal)
|
||||
#define CAM_M_vSetServCtrlCameraVertical(_p_stServCtrlCamera,xVal) ((_p_stServCtrlCamera)->m_xVerticalAngle = xVal)
|
||||
#define CAm_M_vSetServCtrlCameraDistance(_p_stServCtrlCamera,xVal) ((_p_stServCtrlCamera)->m_xDistance = xVal)
|
||||
|
||||
/*
|
||||
*=====================================================================================================
|
||||
* general function for Servo Control
|
||||
*
|
||||
*=====================================================================================================
|
||||
*/
|
||||
MTH_tdxReal CAM_fn_xServoControlMechanics
|
||||
(
|
||||
MTH_tdxReal _xVal,
|
||||
MTH_tdxReal _xMax,
|
||||
MTH_tdxReal _xDT
|
||||
);
|
||||
|
||||
/*
|
||||
*=====================================================================================================
|
||||
* Shifting's Servo Control
|
||||
*
|
||||
*=====================================================================================================
|
||||
*/
|
||||
void CAM_fn_vServShifting
|
||||
(
|
||||
DNM_tdstVector *_p_stShiftingResult,
|
||||
MTH_tdxReal _xSpeed,
|
||||
MTH_tdxReal _xDT,
|
||||
MTH_tdstVector *_p_stShifting
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
19
Rayman_X/cpa/public/MEC/DNMSurSt.h
Normal file
19
Rayman_X/cpa/public/MEC/DNMSurSt.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef __DNMSURST_H__
|
||||
#define __DNMSURST_H__
|
||||
|
||||
#define C_WOT_ulError 0x80000000
|
||||
|
||||
#define C_WOT_ulNoObstacle 0x00000000
|
||||
#define C_WOT_ulGround 0x00000001
|
||||
/*#define C_WOT_ulSlope 0x00000002*/
|
||||
#define C_WOT_ulWall 0x00000004
|
||||
/*#define C_WOT_ulAttic 0x00000008*/
|
||||
#define C_WOT_ulCeiling 0x00000010
|
||||
/*#define C_WOT_ulTrap 0x00000020*/
|
||||
#define C_WOT_ulWater 0x00000040
|
||||
#define C_WOT_ulForceMobile 0x00000080
|
||||
|
||||
#define C_WOT_ulMobile 0x00010000
|
||||
#define C_WOT_ulFather 0x00030000
|
||||
|
||||
#endif
|
76
Rayman_X/cpa/public/MEC/MCAMIC.h
Normal file
76
Rayman_X/cpa/public/MEC/MCAMIC.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*=========================================================================
|
||||
* MWIC.h : MecCamIdCard's functions
|
||||
*
|
||||
* Version 1.0
|
||||
* Creation date 03/01/97
|
||||
* Revision date
|
||||
*
|
||||
* (c) Ubi Studios 1997
|
||||
*=======================================================================*/
|
||||
|
||||
#if !defined(__MecCamIdCard_TYPES__)
|
||||
#define __MecCamIdCard_TYPES__
|
||||
|
||||
#include "DNMMecId.h"
|
||||
#include "acp_base.h"
|
||||
#include "hidcard.h"
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
#define ONLY_TYPES
|
||||
#define _MecCamIdCard_UNDEF
|
||||
#endif /* ONLY_TYPES */
|
||||
|
||||
#if defined(_MecCamIdCard_UNDEF)
|
||||
#undef _MecCamIdCard_UNDEF
|
||||
#undef ONLY_TYPES
|
||||
#endif /* MecCamIdCard_UNDEF */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct DNM_stMecCameraIdCard
|
||||
{
|
||||
/* Identity */
|
||||
DNM_tdeMechanicsID m_eIdentity; /* = DNM_eCamera */
|
||||
|
||||
/* linear speed m/s*/
|
||||
MTH_tdxReal m_xLinearSpeed;
|
||||
/* angular speed degree/s*/
|
||||
MTH_tdxReal m_xAngularSpeed;
|
||||
|
||||
|
||||
/* Speeding Up m/s*/
|
||||
MTH_tdxReal m_xSpeedingUp;
|
||||
|
||||
} DNM_tdstMecCameraIdCard;
|
||||
|
||||
|
||||
/* Put here all macro-accessors */
|
||||
#define DNM_M_eCameraIdCardGetIdentity(_p_stCameraIdCard) ((_p_stCameraIdCard)->m_eIdentity)
|
||||
|
||||
#define DNM_M_xCameraIdCardGetAngularSpeed(_p_stCameraIdCard) ((_p_stCameraIdCard)->m_xAngularSpeed)
|
||||
#define DNM_M_xCameraIdCardGetLinearSpeed(_p_stCameraIdCard) ((_p_stCameraIdCard)->m_xLinearSpeed)
|
||||
|
||||
#define DNM_M_xCameraIdCardSetAngularSpeed(_p_stCameraIdCard,xValue) ((_p_stCameraIdCard)->m_xAngularSpeed=xValue)
|
||||
#define DNM_M_xCameraIdCardSetLinearSpeed(_p_stCameraIdCard,xValue) ((_p_stCameraIdCard)->m_xLinearSpeed=xValue)
|
||||
|
||||
#define DNM_M_xCameraIdCardGetSpeedingUp(_p_stCameraIdCard) ((_p_stCameraIdCard)->m_xSpeedingUp)
|
||||
#define DNM_M_xCameraIdCardSetSpeedingUp(_p_stCameraIdCard,xValue) ((_p_stCameraIdCard)->m_xSpeedingUp = xValue)
|
||||
|
||||
/* Private */
|
||||
#define DNM_M_eCameraIdCardSetIdentity(_p_stCameraIdCard,_eValue) (DNM_M_eCameraIdCardGetIdentity(_p_stCameraIdCard) = _eValue)
|
||||
|
||||
/* temporary */
|
||||
#define DNM_M_xCameraIdCardGetInstructionSpeed(_p_stCameraIdCard) DNM_M_Float2Real(5.)
|
||||
|
||||
/* Give handle a semantic */
|
||||
struct DNM_stMecCameraIdCard *DNM_fn_p_stMecCameraIdCardGiveBackSemantic(DNM_tdxHandleToMecIdentityCard _hCameraIdCard);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__MecCamIdCard_TYPES__ */
|
||||
|
94
Rayman_X/cpa/public/MEC/MECCol.h
Normal file
94
Rayman_X/cpa/public/MEC/MECCol.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
*=======================================================================================
|
||||
* Name : MecCol.c
|
||||
* Author : J Th<54>noz Date : 01/05/98
|
||||
* Description : Mechanic collision functions
|
||||
*=======================================================================================
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef _MECCOL_H_
|
||||
#define _MECCOL_H_
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
//extern DNM_tdstMecObstacle g_a_stObstacle [COL_C_xMaxNumberOfCollisions];
|
||||
extern DNM_tdstMecObstacle *g_a_stObstacle;
|
||||
|
||||
|
||||
ACP_tdxBool MEC_fn_bCollision
|
||||
(
|
||||
long* p_lObstacle,
|
||||
DNM_tdstMecObstacle *p_stObstacle,
|
||||
struct DNM_stDynamics* p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject p_stSupObj,
|
||||
POS_tdstCompletePosition *p_stStartPosition,
|
||||
POS_tdstCompletePosition *p_stEndPosition,
|
||||
ACP_tdxBool bBackFace
|
||||
);
|
||||
|
||||
|
||||
ACP_tdxBool MEC_fn_bInCollision
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj
|
||||
);
|
||||
|
||||
void MEC_fn_vReportCollideActor
|
||||
(
|
||||
HIE_tdxHandleToSuperObject hCollideSupObj,
|
||||
DNM_tdstMecObstacle* p_stCollideObstacle
|
||||
);
|
||||
|
||||
void MEC_fn_vReportCollision
|
||||
(
|
||||
struct DNM_stDynamics* p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
long lNbObstacle,
|
||||
DNM_tdstMecObstacle a_stObstacle[COL_C_xMaxNumberOfCollisions],
|
||||
long lObstacle
|
||||
);
|
||||
|
||||
void MEC_fn_vFillCollisionReport
|
||||
(
|
||||
struct DNM_stDynamics* p_stDynamic
|
||||
);
|
||||
|
||||
|
||||
ACP_tdxBool MEC_fn_vComputeAdjustVector
|
||||
(
|
||||
MTH3D_tdstVector *p_stAdjustVector,
|
||||
struct DNM_stDynamics* p_stDynamic,
|
||||
long lObstacle,
|
||||
DNM_tdstMecObstacle *p_stObstacle,
|
||||
long lObstacleMin
|
||||
);
|
||||
|
||||
void MEC_fn_vEdgeAnalysis
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
long lObstacle,
|
||||
DNM_tdstMecObstacle *p_stObstacle,
|
||||
DNM_tdstMecObstacle *p_stGround
|
||||
);
|
||||
|
||||
void MEC_fn_vCrashAnalysis
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
long lObstacle,
|
||||
DNM_tdstMecObstacle *p_stObstacle
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _MECCOL_H_*/
|
||||
|
62
Rayman_X/cpa/public/MEC/MECDef.h
Normal file
62
Rayman_X/cpa/public/MEC/MECDef.h
Normal file
@@ -0,0 +1,62 @@
|
||||
#ifndef _MECDEF_H_
|
||||
#define _MECDEF_H_
|
||||
|
||||
/* game material type */
|
||||
#define C_xDNM_SLIDE_TYPE_GAME_MATERIAL (1<<0)
|
||||
#define C_xDNM_REBOUND_TYPE_GAME_MATERIAL (1<<1)
|
||||
#define C_xDNM_HANG_TYPE_GAME_MATERIAL (1<<2)
|
||||
#define C_xDNM_HAND_TYPE_GAME_MATERIAL (1<<3)
|
||||
#define C_xDNM_NO_COLLISION_WITH_GROUND (1<<4)
|
||||
#define C_xDNM_GI_TYPE_GAME_MATERIAL (1<<5)
|
||||
#define C_xDNM_CLIMB_TYPE_GAME_MATERIAL (1<<6)
|
||||
#define C_xDNM_HURT_TYPE_GAME_MATERIAL (1<<10)
|
||||
#define C_xDNM_WATER_TYPE_GAME_MATERIAL (1<<14)
|
||||
#define C_xDNM_NO_COLLISION_TYPE_GAME_MATERIAL (1<<15)
|
||||
|
||||
|
||||
|
||||
/* combined game material type */
|
||||
#define C_xDNM_NO_COLLISION_CLIMB_TYPE_GAME_MATERIAL (C_xDNM_CLIMB_TYPE_GAME_MATERIAL|C_xDNM_NO_COLLISION_TYPE_GAME_MATERIAL)
|
||||
#define C_xDNM_COLLISION_REPORT_MASK 8072 /* 0001111110001000 */
|
||||
|
||||
/* custom bits */
|
||||
#define C_ulDNM_COMPUTE_CHANNEL (0x2)
|
||||
#define C_ulDNM_NO_CRASH_CUSTOM_BIT (0x40)
|
||||
#define C_ulDNM_CAN_PUSH_RAYMAN_CUSTOM_BIT (0x4000000)
|
||||
#define C_ulDNM_RAYMAN_CUSTOM_BIT (0x80000000)
|
||||
|
||||
/* Rayman zone */
|
||||
#define C_ulDNM_RAYMAN_ZDM_RADIUS MTH_M_xDoubleToReal(0.9)
|
||||
|
||||
/* Climb limits */
|
||||
#define C_xDNM_CLIMB_COS_ANGLE_LIMIT MTH_M_xDoubleToReal(0.92718) /* cos(22<32>)
|
||||
|
||||
/* Initial coeff */
|
||||
#define C_xDNM_BASE_COEF MTH_C_ZERO
|
||||
#define C_xDNM_WALK_COEF MTH_C_ZERO
|
||||
|
||||
|
||||
/* internal define */
|
||||
#define C_xDNM_MTH_EPSILON MTH_M_xDoubleToReal(1e-3)
|
||||
#define C_xDNM_MAX_MULT_SPEED MTH_M_xDoubleToReal(1.0370)
|
||||
#define C_xDNM_NUL_MOVE MTH_M_xDoubleToReal(1e-10)
|
||||
#define C_xDNM_CLIMB_SLOPE_LIMIT MTH_M_xDoubleToReal(MTH_M_xTan(MTH_M_xDegToRad(60)))
|
||||
#define C_xDNM_SPIDER_SLOPE_LIMIT MTH_M_xDoubleToReal(MTH_M_xTan(MTH_M_xDegToRad(60)))
|
||||
#define C_xDNM_EPSILON_DOT_PROD MTH_M_xDoubleToReal(0.05)
|
||||
#define C_xDNM_CLIMB_FIRST_NORMAL_MOVE MTH_M_xDoubleToReal(0.75)
|
||||
#define C_xDNM_GI_DEFAULT_NORMAL_MOVE MTH_M_xDoubleToReal(0.45)
|
||||
#define C_xDNM_CLIMB_DEFAULT_NORMAL_MOVE MTH_M_xDoubleToReal(0.45)
|
||||
#define C_xDNM_ON_GROUND_DEFAULT_NORMAL_MOVE MTH_M_xDoubleToReal(0.45)
|
||||
#define C_xDNM_SPIDER_DEFAULT_NORMAL_MOVE MTH_M_xDoubleToReal(0.5)
|
||||
#define C_xDNM_REAL_PRECISION (MTH_M_xDoubleToReal(1e-4)) /* max 2e-5 */
|
||||
#define C_xDNM_EDGE_GROUND_LIMIT (MTH_M_xDoubleToReal(0.9848)) /* z limit */
|
||||
#define C_xDNM_DISTANCE_FROM_WALL_ON_GROUND (MTH_M_xDoubleToReal(0.10))
|
||||
#define C_xDNM_CORNER_LIMIT (MTH_M_xDoubleToReal(0.7071067811865)) /* 45<34> */
|
||||
#define C_xDNM_MINUS_CORNER_LIMIT (MTH_M_xDoubleToReal(-0.7071067811865)) /* 45<34> */
|
||||
#define C_xDNM_VERTICAL_FALL_LIMIT MTH_M_xDoubleToReal(0.07)
|
||||
#define C_xDNM_TILT_SENSIBILITY MTH_M_xDoubleToReal(1)
|
||||
#define C_xDNM_CLIMB_BACKFACE_LIMIT MTH_M_xDoubleToReal(0.95)
|
||||
#define C_xDNM_ON_GROUND_STEP MTH_M_xDoubleToReal(0.45)
|
||||
|
||||
|
||||
#endif //_MECDEF_H_
|
97
Rayman_X/cpa/public/MEC/MECOpt.h
Normal file
97
Rayman_X/cpa/public/MEC/MECOpt.h
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
*=======================================================================================
|
||||
* Name : MecOpt.c
|
||||
* Author : J Th<54>noz Date : 01/05/98
|
||||
* Description : Mechanic options
|
||||
*=======================================================================================
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MECOPT_H_
|
||||
#define _MECOPT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
void MEC_fn_vGravitySpeed
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xDT
|
||||
);
|
||||
|
||||
void MEC_fn_vInertia
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xDT,
|
||||
POS_tdxHandleToPosition hMatrix,
|
||||
POS_tdxHandleToPosition hInvMatrix
|
||||
);
|
||||
|
||||
void MEC_fn_vAddTiltSpeed
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xDt
|
||||
);
|
||||
|
||||
void MEC_fn_vCancelTilt ( struct DNM_stDynamics *p_stDynamic );
|
||||
|
||||
void MEC_fn_vImposeSpeed
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xDT,
|
||||
POS_tdxHandleToPosition hMatrix,
|
||||
POS_tdxHandleToPosition hInvMatrix
|
||||
);
|
||||
|
||||
void MEC_fn_vAddSpeed
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xDT,
|
||||
POS_tdxHandleToPosition hMatrix,
|
||||
POS_tdxHandleToPosition hInvMatrix
|
||||
);
|
||||
|
||||
void MEC_fn_vProposeSpeed
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xDT,
|
||||
POS_tdxHandleToPosition hMatrix,
|
||||
POS_tdxHandleToPosition hInvMatrix
|
||||
);
|
||||
|
||||
void MEC_fn_vAddStream (
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xDT,
|
||||
ACP_tdxBool bSlide
|
||||
);
|
||||
|
||||
void MEC_fn_vImposeRotation ( struct DNM_stDynamics *p_stDynamic );
|
||||
|
||||
void MEC_fn_vAdditionnalTranslation ( struct DNM_stDynamics *p_stDynamic );
|
||||
|
||||
void MEC_fn_vPositionLimit ( struct DNM_stDynamics *p_stDynamic, MTH3D_tdstVector* p_stSafePreviousPosition );
|
||||
|
||||
void MEC_fn_vSpeedLimit
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xDT,
|
||||
POS_tdxHandleToPosition hMatrix,
|
||||
POS_tdxHandleToPosition hInvMatrix
|
||||
);
|
||||
|
||||
void MEC_fn_vAdjustScaleData
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
POS_tdxHandleToPosition hMatrix,
|
||||
POS_tdxHandleToPosition hInvMatrix
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif /*_MECOPT_H_*/
|
45
Rayman_X/cpa/public/MEC/MECPfm.h
Normal file
45
Rayman_X/cpa/public/MEC/MECPfm.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
*=======================================================================================
|
||||
* Name : MecPfm.c
|
||||
* Author : J Th<54>noz Date : 01/05/98
|
||||
* Description : Mechanic platform functions
|
||||
*=======================================================================================
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MECPFM_H_
|
||||
#define _MECPFM_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
void MEC_fn_vUpdatePlatform (DNM_tdstDynamics *p_stDynamic, HIE_tdxHandleToSuperObject hSupObj, POS_tdxHandleToPosition hPreviousReferenceMatrix, POS_tdxHandleToPosition hInvPreviousReferenceMatrix );
|
||||
|
||||
ACP_tdxBool MEC_fn_vBasePlatformManagement ( struct DNM_stDynamics *p_stDynamic, HIE_tdxHandleToSuperObject hSupObj );
|
||||
|
||||
void MEC_fn_vSetPlatformLink (struct DNM_stDynamics *p_stDynamic, HIE_tdxHandleToSuperObject hSupObj, HIE_tdxHandleToSuperObject hFatherSupObj);
|
||||
|
||||
void MEC_fn_vCutPlatformLink (struct DNM_stDynamics *p_stDynamic, HIE_tdxHandleToSuperObject hSupObj);
|
||||
|
||||
void MEC_fn_vForcePlatformLink (struct DNM_stDynamics *p_stDynamic, HIE_tdxHandleToSuperObject hSupObj, HIE_tdxHandleToSuperObject hFatherSupObj);
|
||||
|
||||
void MEC_fn_vFreePlatformLink (struct DNM_stDynamics *p_stDynamic, HIE_tdxHandleToSuperObject hSupObj );
|
||||
|
||||
void MEC_fn_vDynamicComputeAbsoluteMatrix
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
POS_tdxHandleToPosition hPreviousMatrix,
|
||||
POS_tdxHandleToPosition hInvPreviousMatrix,
|
||||
POS_tdxHandleToPosition hCurrentMatrix
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*_MECPFM_H_*/
|
106
Rayman_X/cpa/public/MEC/MecBase.h
Normal file
106
Rayman_X/cpa/public/MEC/MecBase.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
*=======================================================================================
|
||||
* Name : MecBase.c
|
||||
* Author : J Th<54>noz Date : 01/05/98
|
||||
* Description : Mechanic functions for Base model
|
||||
*=======================================================================================
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MECBASE_H_
|
||||
#define _MECBASE_H_
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*XB 05/05/99*/
|
||||
struct DNM_stParsingDatas;
|
||||
/*End XB 05/05/99*/
|
||||
|
||||
extern MTH_tdxReal MEC_g_xClimbSpeedLimit;
|
||||
|
||||
struct DNM_stDynamics *MEC_p_stDynamicsBaseMechanics
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
struct DNM_stParsingDatas *p_stParsingDatas,
|
||||
DNM_tdxHandleToMecIdentityCard h_MecIdCard,
|
||||
MTH_tdxReal _xDT
|
||||
);
|
||||
|
||||
|
||||
void MEC_vImposeRotationMatrix
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
POS_tdxHandleToPosition hRotationMatrix
|
||||
);
|
||||
|
||||
|
||||
void MEC_vImposeRotationVector
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH3D_tdstVector *p_stX,
|
||||
MTH3D_tdstVector *p_stY,
|
||||
MTH3D_tdstVector *p_stZ
|
||||
);
|
||||
|
||||
void MEC_vImposeRelativeRotation
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH3D_tdstMatrix *p_stRotationMatrix
|
||||
);
|
||||
|
||||
void MEC_vImposeTranslation
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH3D_tdstVector* p_stVector
|
||||
);
|
||||
|
||||
void MEC_vInitTranslation
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
MTH3D_tdstVector* p_stVector
|
||||
);
|
||||
|
||||
void MEC_fn_vImposeActorMatrix
|
||||
(
|
||||
HIE_tdxHandleToSuperObject hSupObj
|
||||
);
|
||||
|
||||
void MEC_vTurnAroundZAxis
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xAngle
|
||||
);
|
||||
|
||||
void MEC_vTurnAbsolute
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH3D_tdstVector* p_stVector
|
||||
);
|
||||
|
||||
void DNM_fn_vSetHangingLimit
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
MTH_tdxReal xValue
|
||||
);
|
||||
|
||||
void MEC_fn_vUpdateSpeed (HIE_tdxHandleToSuperObject hSupObj);
|
||||
|
||||
INLINE
|
||||
void MEC_fn_vSetClimbSpeedLimit ( MTH_tdxReal xSpeedLimit )
|
||||
{
|
||||
MEC_g_xClimbSpeedLimit = xSpeedLimit;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*_MECBASE_H_*/
|
||||
|
75
Rayman_X/cpa/public/MEC/MecBhv.h
Normal file
75
Rayman_X/cpa/public/MEC/MecBhv.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
*=======================================================================================
|
||||
* Name : MecBhv.c
|
||||
* Author : J Th<54>noz Date : 01/05/98
|
||||
* Description : Mechanic Behaviours
|
||||
*=======================================================================================
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef _MECBHV_H_
|
||||
#define _MECBHV_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
void MEC_fn_vCollideBaseMechanic
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
long lObstacle,
|
||||
DNM_tdstMecObstacle a_stObstacle[COL_C_xMaxNumberOfCollisions],
|
||||
MTH_tdxReal xDT
|
||||
);
|
||||
|
||||
|
||||
void MEC_fn_vBaseObstacleManagement
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
MTH_tdxReal xDT
|
||||
);
|
||||
|
||||
|
||||
void MEC_fn_vGiObstacleManagement
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
MTH_tdxReal xDT
|
||||
);
|
||||
|
||||
|
||||
void MEC_fn_vClimbObstacleManagement
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
MTH_tdxReal xDT
|
||||
);
|
||||
|
||||
void MEC_fn_vGroundObstacleManagement
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
MTH_tdxReal xDT
|
||||
);
|
||||
|
||||
|
||||
void MEC_fn_vSpiderObstacleManagement
|
||||
(
|
||||
struct DNM_stDynamics *p_stDynamic,
|
||||
HIE_tdxHandleToSuperObject hSupObj,
|
||||
MTH_tdxReal xDT
|
||||
);
|
||||
|
||||
void MEC_fn_vGroundGuess (DNM_tdstDynamics *p_stDynamic, MTH_tdxReal xDT);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _MECBHV_*/
|
10
Rayman_X/cpa/public/MEC/MecInc.h
Normal file
10
Rayman_X/cpa/public/MEC/MecInc.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include "acp_base.h"
|
||||
#include "MEC/DNMMth.h"
|
||||
#include "MEC/hmecmatc.h"
|
||||
#include "GMT.h"
|
||||
#include "GEO.h"
|
||||
#include "GLI.h"
|
||||
#include "SPO.h"
|
||||
#include "POS.h"
|
||||
|
77
Rayman_X/cpa/public/MEC/MecMatCa.h
Normal file
77
Rayman_X/cpa/public/MEC/MecMatCa.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/*=========================================================================
|
||||
* MecMatCa.h : MecMatCharacteristics's functions
|
||||
*
|
||||
* Version 1.0
|
||||
* Creation date 07/01/97
|
||||
* Revision date
|
||||
*
|
||||
* (c) Ubi Studios 1997
|
||||
*=======================================================================*/
|
||||
|
||||
#if !defined(__MecMatCharacteristics_TYPES__)
|
||||
#define __MecMatCharacteristics_TYPES__
|
||||
|
||||
#include "acp_base.h"
|
||||
#include "hMecMatC.h"
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
#define ONLY_TYPES
|
||||
#define _MecMatCharacteristics_UNDEF
|
||||
#endif /* ONLY_TYPES */
|
||||
|
||||
#if defined(_MecMatCharacteristics_UNDEF)
|
||||
#undef _MecMatCharacteristics_UNDEF
|
||||
#undef ONLY_TYPES
|
||||
#endif /* MecMatCharacteristics_UNDEF */
|
||||
|
||||
#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 */
|
||||
/***************************************/
|
||||
|
||||
typedef struct DNM_stMecMatCharacteristics
|
||||
{
|
||||
MTH_tdxReal m_xSlide;
|
||||
MTH_tdxReal m_xRebound;
|
||||
} DNM_tdstMecMatCharacteristics;
|
||||
|
||||
|
||||
/* Put here all macro-accessors */
|
||||
#define DNM_M_xMatCharacteristicsGetSlide(_p_stMatCharacteristics) ((_p_stMatCharacteristics)->m_xSlide)
|
||||
#define DNM_M_xMatCharacteristicsGetRebound(_p_stMatCharacteristics) ((_p_stMatCharacteristics)->m_xRebound)
|
||||
|
||||
#define DNM_M_xMatCharacteristicsSetSlide(_p_stMatCharacteristics,_xValue) (DNM_M_xMatCharacteristicsGetSlide(_p_stMatCharacteristics) = _xValue)
|
||||
#define DNM_M_xMatCharacteristicsSetRebound(_p_stMatCharacteristics,_xValue) (DNM_M_xMatCharacteristicsGetRebound(_p_stMatCharacteristics) = _xValue)
|
||||
|
||||
/* Clone */
|
||||
#define DNM_M_MatCharacteristicsCopyClone(_p_stDst,_p_stSrc) (\
|
||||
DNM_M_xMatCharacteristicsSetSlide(_p_stDst,DNM_M_xMatCharacteristicsGetSlide(_p_stSrc)), \
|
||||
DNM_M_xMatCharacteristicsSetRebound(_p_stDst,DNM_M_xMatCharacteristicsGetRebound(_p_stSrc)))
|
||||
|
||||
/* Give handle a semantic */
|
||||
struct DNM_stMecMatCharacteristics *DNM_fn_p_stMecMatCharacteristicsGiveBackSemantic(DNM_tdxHandleToMecMatCharacteristics _hMatCharacteristics);
|
||||
|
||||
/* Default initialisation (Recommended !!!) */
|
||||
void DNM_fn_vMecMatCharacteristicsInitDefault(DNM_tdstMecMatCharacteristics *_p_stMecMatCharacteristics);
|
||||
|
||||
/*** MecMatCharacteristics scripts ***/
|
||||
#define C_SectionMecMatCharacteristicsDescription "MecMatCharacteristics"
|
||||
#define C_EntryMecMatCharacteristicsChamp "Champ"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__MecMatCharacteristics_TYPES__ */
|
||||
|
307
Rayman_X/cpa/public/MEC/MecTools.h
Normal file
307
Rayman_X/cpa/public/MEC/MecTools.h
Normal file
@@ -0,0 +1,307 @@
|
||||
/*
|
||||
*=======================================================================================
|
||||
* Name : MecTools.c
|
||||
* Author : J Th<54>noz Date : 01/05/98
|
||||
* Description : Mechanic tools funstions
|
||||
*=======================================================================================
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef _MECTOOLS_H_
|
||||
#define _MECTOOLS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* only to compile inline functions */
|
||||
#include "Mecdef.h"
|
||||
#include "col\CollGoCo.h"
|
||||
|
||||
|
||||
/* Dynamics */
|
||||
#pragma warning (disable : 4706) // There are some voluntary assignment inside this function
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsBaseMechanic (struct DNM_stDynamics *p_stDynamic)
|
||||
{
|
||||
register DNM_tdxHandleToMecIdentityCard hIdCard;
|
||||
return (ACP_tdxBool)(( ((hIdCard = DNM_M_pDynamicsGetCurrentIdCard (p_stDynamic)) != 0) && hIdCard && (DNM_fn_eIdentityCardGetType(hIdCard)==DNM_eBase)));
|
||||
}
|
||||
#pragma warning (default : 4706)
|
||||
|
||||
INLINE
|
||||
MTH_tdxReal MEC_fn_xMinSlope (struct DNM_stDynamics *p_stDynamic)
|
||||
{
|
||||
return MTH_M_xNeg (DNM_M_xDynamicsGetSlopeLimit(p_stDynamic));
|
||||
}
|
||||
|
||||
INLINE
|
||||
MTH_tdxReal MEC_fn_xMaxSlope (struct DNM_stDynamics *p_stDynamic)
|
||||
{
|
||||
return DNM_M_xDynamicsGetSlopeLimit(p_stDynamic);
|
||||
}
|
||||
|
||||
INLINE
|
||||
MTH_tdxReal MEC_fn_xGroundLimit (struct DNM_stDynamics *p_stDynamic)
|
||||
{
|
||||
return DNM_M_xDynamicsGetCosSlope (p_stDynamic);
|
||||
}
|
||||
|
||||
INLINE
|
||||
MTH_tdxReal MEC_fn_xWallLimit (struct DNM_stDynamics *p_stDynamic)
|
||||
{
|
||||
return MTH_M_xNeg ( DNM_M_xDynamicsGetCosSlope (p_stDynamic) );;
|
||||
}
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsPlatform (struct DNM_stDynamics *p_stDynamic)
|
||||
{
|
||||
return (ACP_tdxBool)(HIE_fn_bIsSuperObjectValid (DNM_M_hDynamicsGetPlatformSO(p_stDynamic)));
|
||||
}
|
||||
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsScale (struct DNM_stDynamics *p_stDynamic)
|
||||
{
|
||||
return (ACP_tdxBool)(!MTH_M_bEqualWithEpsilon (DNM_M_p_stDynamicsGetScaleX(p_stDynamic), MTH_C_ONE, C_xDNM_MTH_EPSILON)
|
||||
|| !MTH_M_bEqualWithEpsilon (DNM_M_p_stDynamicsGetScaleY(p_stDynamic), MTH_C_ONE, C_xDNM_MTH_EPSILON)
|
||||
|| !MTH_M_bEqualWithEpsilon (DNM_M_p_stDynamicsGetScaleZ(p_stDynamic), MTH_C_ONE, C_xDNM_MTH_EPSILON));
|
||||
}
|
||||
|
||||
|
||||
INLINE
|
||||
void MEC_fn_vComputeSlopeLimit (struct DNM_stDynamics *p_stDynamic)
|
||||
{
|
||||
register MTH_tdxReal xSlopeLimit = MTH_M_xSqrt (MTH_M_xDiv (MTH_C_ONE,MTH_M_xAdd(MTH_C_ONE,MTH_M_xSqr(DNM_M_xDynamicsGetSlopeLimit(p_stDynamic)))));
|
||||
DNM_M_vDynamicsSetCosSlope ( p_stDynamic, xSlopeLimit );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Material */
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bTypeOfGameMaterial(GMT_tdxHandleToGameMaterial hGameMat, GMT_tdxMask xTestMask)
|
||||
{
|
||||
register GMT_tdxHandleToCollideMaterial hCollMat;
|
||||
return (ACP_tdxBool)( ((hCollMat=hGameMat->hCollideMaterial)!=(GMT_tdxHandleToCollideMaterial)GMT_C_InvalidCollideMaterial) && (hCollMat->xIdentifier&xTestMask)==xTestMask );
|
||||
}
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bTestMaskGameMaterial(GMT_tdxHandleToGameMaterial hGameMat, GMT_tdxMask xTestMask)
|
||||
{
|
||||
register GMT_tdxHandleToCollideMaterial hCollMat;
|
||||
return (ACP_tdxBool)( ((hCollMat=hGameMat->hCollideMaterial)!=(GMT_tdxHandleToCollideMaterial)GMT_C_InvalidCollideMaterial) && (hCollMat->xIdentifier&xTestMask)!=MTH_C_ZERO );
|
||||
}
|
||||
|
||||
|
||||
/* Normal */
|
||||
ACP_tdxBool MEC_fn_bWallNormal (struct DNM_stDynamics *p_stDynamic, MTH3D_tdstVector* p_stNormal);
|
||||
ACP_tdxBool MEC_fn_bGroundNormal (struct DNM_stDynamics *p_stDynamic, MTH3D_tdstVector* p_stNormal);
|
||||
|
||||
/* Obstacle */
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsEdge (DNM_tdstMecObstacle *p_stObstacle)
|
||||
{
|
||||
return (ACP_tdxBool)((DNM_M_xObstacleGetCollidedEntity(p_stObstacle)==COL_C_xHighEdgeEntity) || (DNM_M_xObstacleGetCollidedEntity(p_stObstacle)==COL_C_xLowEdgeEntity));
|
||||
}
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsHighEdge (DNM_tdstMecObstacle *p_stObstacle)
|
||||
{
|
||||
return (ACP_tdxBool)(DNM_M_xObstacleGetCollidedEntity(p_stObstacle)==COL_C_xHighEdgeEntity);
|
||||
}
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsLowEdge (DNM_tdstMecObstacle *p_stObstacle)
|
||||
{
|
||||
return (ACP_tdxBool)(DNM_M_xObstacleGetCollidedEntity(p_stObstacle)==COL_C_xLowEdgeEntity);
|
||||
}
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsWater (DNM_tdstMecObstacle *p_stObstacle)
|
||||
{
|
||||
return (ACP_tdxBool)(MEC_fn_bTypeOfGameMaterial (DNM_M_hObstacleGetCollidedMaterial(p_stObstacle),C_xDNM_WATER_TYPE_GAME_MATERIAL)
|
||||
&& MEC_fn_bTypeOfGameMaterial (DNM_M_hObstacleGetMyMaterial(p_stObstacle),C_xDNM_WATER_TYPE_GAME_MATERIAL));
|
||||
}
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsCollide (DNM_tdstMecObstacle *p_stObstacle)
|
||||
{
|
||||
return (ACP_tdxBool) MTH_M_bLess ( DNM_M_xObstacleGetRate(p_stObstacle), MTH_C_ZERO );
|
||||
}
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsDoubleEdge (DNM_tdstMecObstacle *p_stObstacle)
|
||||
{
|
||||
return (ACP_tdxBool) (( DNM_M_eObstacleGetType(p_stObstacle)&DNM_ObsType_DoubleEdge ) == DNM_ObsType_DoubleEdge);
|
||||
}
|
||||
|
||||
|
||||
/* this obstacle is a wall ? */
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bWallObstacle (struct DNM_stDynamics *p_stDynamic, DNM_tdstMecObstacle *p_stObstacle)
|
||||
{
|
||||
return MEC_fn_bWallNormal (p_stDynamic,DNM_M_p_stObstacleGetNorm (p_stObstacle));
|
||||
}
|
||||
|
||||
|
||||
/* this obstacle is a ground ? */
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bGroundObstacle (struct DNM_stDynamics *p_stDynamic, DNM_tdstMecObstacle *p_stObstacle)
|
||||
{
|
||||
return MEC_fn_bGroundNormal (p_stDynamic,DNM_M_p_stObstacleGetNorm (p_stObstacle));
|
||||
}
|
||||
|
||||
ACP_tdxBool MEC_fn_bCeilObstacle (struct DNM_stDynamics *p_stDynamic, DNM_tdstMecObstacle *p_stObstacle);
|
||||
ACP_tdxBool MEC_fn_bIsStatic (long lObstacle, DNM_tdstMecObstacle *p_stObstacle);
|
||||
void MEC_fn_vAddObstacleList (long *p_lObstacle, DNM_tdstMecObstacle *p_stObstacle, long lAddObstacle, DNM_tdstMecObstacle *p_stAddObstacle);
|
||||
ACP_tdxBool MEC_fn_bCanCrashActor (DNM_tdstMecObstacle* p_stCollideObstacle);
|
||||
|
||||
INLINE
|
||||
void MEC_fn_vInvalidateObstacle ( DNM_tdstMecObstacle *p_stObstacle )
|
||||
{
|
||||
DNM_M_xObstacleSetCollidedEntity ( p_stObstacle, COL_C_xNoEntity );
|
||||
}
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsObstacleValid ( DNM_tdstMecObstacle *p_stObstacle )
|
||||
{
|
||||
return (ACP_tdxBool)(DNM_M_xObstacleGetCollidedEntity(p_stObstacle)!=COL_C_xNoEntity);
|
||||
}
|
||||
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsObstacleSphere ( DNM_tdstMecObstacle *p_stObstacle )
|
||||
{
|
||||
return (ACP_tdxBool)(DNM_M_xObstacleGetCollidedEntity(p_stObstacle)==COL_C_xSphereEntity);
|
||||
}
|
||||
|
||||
/* Collision */
|
||||
BOOL MEC_fn_bDynamicsNeedCollide (struct DNM_stDynamics *p_stDynamic);
|
||||
MTH_tdxReal MEC_fn_xGetSlide (struct DNM_stDynamics *p_stDynamic,DNM_tdstMecObstacle *p_stObstacle);
|
||||
MTH_tdxReal MEC_fn_xGetRebound (struct DNM_stDynamics *p_stDynamic,DNM_tdstMecObstacle *p_stObstacle);
|
||||
void MEC_fn_vComputeCollisionTranslation ( long lObstacle, DNM_tdstMecObstacle *p_stObstacle, MTH3D_tdstVector* p_stMove );
|
||||
void MEC_fn_vDeleteWallEdge (long lObstacle, DNM_tdstMecObstacle *p_stObstacle, DNM_tdstDynamics *p_stDynamic);
|
||||
void MEC_fn_vDeleteUnderGroundWall (long lObstacle, DNM_tdstMecObstacle *p_stObstacle, DNM_tdstDynamics *p_stDynamic, DNM_tdstMecObstacle *p_stGroundObstacle);
|
||||
DNM_tdstMecObstacle* MEC_fn_pSelectGround (struct DNM_stDynamics *p_stDynamic, long lObstacle, DNM_tdstMecObstacle *p_stObstacle,ACP_tdxBool *bFirstGround);
|
||||
ACP_tdxBool MEC_fn_bDetectStep (struct DNM_stDynamics *p_stDynamic, long lObstacle, DNM_tdstMecObstacle *p_stObstacle, DNM_tdstMecObstacle *p_stGroundObstacle, MTH3D_tdstVector* p_stMoveDirection);
|
||||
|
||||
|
||||
INLINE
|
||||
void MEC_fn_vGetCollisionTranslation (struct DNM_stDynamics *p_stDynamic, POS_tdxHandleToPosition hMatrix)
|
||||
{
|
||||
POS_fn_vSetTranslationVector ( hMatrix, DNM_M_pDynamicsGetCollisionTranslation(p_stDynamic) );
|
||||
}
|
||||
|
||||
INLINE
|
||||
void MEC_fn_vRegisterCollisionTranslation (struct DNM_stDynamics *p_stDynamic, POS_tdxHandleToPosition hMatrix)
|
||||
{
|
||||
DNM_M_vDynamicsSetCollisionTranslation ( p_stDynamic, POS_fn_p_stGetTranslationVector ( hMatrix ) );
|
||||
}
|
||||
|
||||
/* Speed*/
|
||||
void MEC_fn_vComputeSpeed (struct DNM_stDynamics *p_stDynamic, MTH_tdxReal xDT);
|
||||
|
||||
/* Matrix */
|
||||
void MEC_fn_vInitMatrix (DNM_tdstDynamics *p_stDynamic);
|
||||
void MEC_fn_vCorrectMatrix (struct DNM_stDynamics *p_stDynamic, POS_tdxHandleToPosition hMatrix);
|
||||
ACP_tdxBool MEC_fn_bIsEqualMatrix (POS_tdxHandleToPosition hMatrix1, POS_tdxHandleToPosition hMatrix2);
|
||||
ACP_tdxBool MEC_fn_bIsEqualRotationMatrix (POS_tdxHandleToPosition hMatrix1, POS_tdxHandleToPosition hMatrix2);
|
||||
ACP_tdxBool MEC_fn_bIsEqualTransformMatrix (POS_tdxHandleToPosition hMatrix1, POS_tdxHandleToPosition hMatrix2);
|
||||
void MEC_fn_vTranslateMatrixOn (struct DNM_stDynamics *p_stDynamic,MTH3D_tdstVector* p_stMatrixTranslation);
|
||||
void MEC_fn_vTranslateMatrixOff (struct DNM_stDynamics *p_stDynamic,MTH3D_tdstVector* p_stMatrixTranslation);
|
||||
void MEC_fn_vUpdateMatrix (struct DNM_stDynamics *p_stDynamic,POS_tdxHandleToPosition _hMatrix);
|
||||
|
||||
INLINE
|
||||
void MEC_fn_vInvertMatrix (struct DNM_stDynamics *p_stDynamic,POS_tdxHandleToPosition hInvMatrix, POS_tdxHandleToPosition hMatrix)
|
||||
{
|
||||
if (DNM_M_bDynamicsIsComputeInvertMatrix(p_stDynamic))
|
||||
{
|
||||
POS_fn_vInvertMatrix ( hInvMatrix, hMatrix );
|
||||
DNM_M_vDynamicsSetComputeInvertMatrix ( p_stDynamic, FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Adjust */
|
||||
void MEC_fn_vAdjustStaticVector (struct DNM_stDynamics *p_stDynamic,MTH3D_tdstVector *p_stVector);
|
||||
void MEC_fn_vAdjustStaticMove (struct DNM_stDynamics *p_stDynamic,MTH3D_tdstVector *p_stMove);
|
||||
void MEC_fn_vAdjustStaticMatrix (struct DNM_stDynamics *p_stDynamic,POS_tdxHandleToPosition hMatrix);
|
||||
void MEC_fn_vAdjustScaleVector (struct DNM_stDynamics *p_stDynamic,MTH3D_tdstVector* p_stVector);
|
||||
void MEC_fn_vAdjustSpeed (struct DNM_stDynamics* p_stDynamic, MTH_tdxReal xDT);
|
||||
|
||||
/* Mth */
|
||||
MTH_tdxReal MEC_fn_vRoundReal (MTH_tdxReal xReal, MTH_tdxReal xEpsilon);
|
||||
void MEC_fn_vRoundVector (MTH3D_tdstVector* p_stVector, MTH_tdxReal xEpsilon);
|
||||
INLINE
|
||||
ACP_tdxBool MEC_fn_bIsNullVector ( MTH3D_tdstVector* p_stVector)
|
||||
{
|
||||
return (ACP_tdxBool)(
|
||||
MTH_M_bEqualWithEpsilon ( MTH3D_M_xGetXofVector(p_stVector), MTH_C_ZERO, MTH_M_xDoubleToReal(1e-3) )
|
||||
&& MTH_M_bEqualWithEpsilon ( MTH3D_M_xGetYofVector(p_stVector), MTH_C_ZERO, MTH_M_xDoubleToReal(1e-3) )
|
||||
&& MTH_M_bEqualWithEpsilon ( MTH3D_M_xGetZofVector(p_stVector), MTH_C_ZERO, MTH_M_xDoubleToReal(1e-3) ));
|
||||
|
||||
}
|
||||
MTH_tdxReal MEC_fn_xConvertScale ( MTH_tdxReal xValue );
|
||||
ACP_tdxBool MEC_fn_bVectorParallel ( MTH3D_tdstVector* p_stVector1, MTH3D_tdstVector* p_stVector2 );
|
||||
void MEC_fn_vCheckMinVectorNorm ( MTH3D_tdstVector* p_stVector, MTH_tdxReal xLimit );
|
||||
|
||||
/* BackFaces */
|
||||
void MEC_fn_vDeleteBaseBackFace ( long lObstacle, DNM_tdstMecObstacle *p_stObstacle, struct DNM_stDynamics* p_stDynamic );
|
||||
void MEC_fn_vDeleteOnGroundBackFace ( long lObstacle, DNM_tdstMecObstacle *p_stObstacle, struct DNM_stDynamics* p_stDynamic, MTH3D_tdstVector* p_stVector, DNM_tdstMecObstacle *p_stGroundObstacle );
|
||||
void MEC_fn_vDeleteGiBackFace ( long lObstacle, DNM_tdstMecObstacle *p_stObstacle, struct DNM_stDynamics* p_stDynamic, MTH3D_tdstVector* p_stVector );
|
||||
void MEC_fn_vDeleteClimbBackFace ( long lObstacle, DNM_tdstMecObstacle *p_stObstacle, struct DNM_stDynamics* p_stDynamic, MTH3D_tdstVector* p_stVector );
|
||||
void MEC_fn_vDeleteBaseBackFace ( long lObstacle, DNM_tdstMecObstacle *p_stObstacle, struct DNM_stDynamics* p_stDynamic );
|
||||
|
||||
/* Ground Faces */
|
||||
void MEC_fn_vDeleteNoCollidedGroundFace ( long lObstacle, DNM_tdstMecObstacle *p_stObstacle, struct DNM_stDynamics* p_stDynamic );
|
||||
|
||||
/* Delete Faces for Hanging mechanic */
|
||||
void MEC_fn_vDeleteHangingObstacle ( long lObstacle, DNM_tdstMecObstacle *p_stObstacle, struct DNM_stDynamics* p_stDynamic );
|
||||
|
||||
void MEC_fn_vDeleteObstacleBehind ( long lObstacle, DNM_tdstMecObstacle *a_stObstacle, DNM_tdstMecObstacle *p_stObstacle );
|
||||
|
||||
void MEC_fn_vDeleteNullTranslationObstacle ( long lObstacle, DNM_tdstMecObstacle *a_stObstacle );
|
||||
|
||||
/* Hierarchy */
|
||||
HIE_tdxHandleToSuperObject MEC_fn_hGetFatherActor (HIE_tdxHandleToSuperObject hSupObj);
|
||||
|
||||
/* Frame */
|
||||
void MEC_fn_vComputeInitialFrameTranslation ( MTH3D_tdstVector *p_stVector, struct DNM_stDynamics *p_stDynamic, long lFrame);
|
||||
void MEC_fn_vSetInitialFrameTranslation ( struct DNM_stDynamics *p_stDynamic, MTH3D_tdstVector* p_stVector);
|
||||
|
||||
/* Stream */
|
||||
void MEC_fn_vComputeStream ( MTH3D_tdstVector *p_stStream, struct DNM_stDynamics *p_stDynamic, MTH_tdxReal xDT, ACP_tdxBool bSlide);
|
||||
|
||||
/* Inertia */
|
||||
void MEC_fn_vComputeInertiaTranslation ( struct DNM_stDynamics *p_stDynamic, MTH_tdxReal xDT );
|
||||
|
||||
/* actor */
|
||||
ACP_tdxBool MEC_fn_bIsMultiCollision (HIE_tdxHandleToSuperObject hSupObj);
|
||||
ACP_tdxBool MEC_fn_bMainActor (HIE_tdxHandleToSuperObject hSupObj);
|
||||
|
||||
|
||||
/* optimization */
|
||||
ACP_tdxBool MEC_fn_bNoMove (struct DNM_stDynamics *p_stDynamic);
|
||||
|
||||
/* safe position */
|
||||
void MEC_fn_vAdjustSafeTranslation (struct DNM_stDynamics *p_stDynamic);
|
||||
void MEC_fn_vRegisterSafeTranslation (struct DNM_stDynamics *p_stDynamic, POS_tdxHandleToPosition hMatrix);
|
||||
|
||||
|
||||
/* secure mode */
|
||||
void MEC_fn_vSlowMode (struct DNM_stDynamics *p_stDynamic, long lMode);
|
||||
void MEC_fn_vNormalMode (struct DNM_stDynamics *p_stDynamic, long lMode);
|
||||
void MEC_fn_vRepeatMove (struct DNM_stDynamics *p_stDynamic);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif //_MECTOOLS_H_
|
||||
|
||||
|
27
Rayman_X/cpa/public/MEC/ParsData.h
Normal file
27
Rayman_X/cpa/public/MEC/ParsData.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef __DNMPARDA_H__
|
||||
#define __DNMPARDA_H__
|
||||
|
||||
#include "mth.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct DNM_stParsingDatas
|
||||
{
|
||||
MTH3D_tdstVector stPosition;
|
||||
MTH_tdxReal xOutAlpha;
|
||||
MTH3D_tdstVector stVector;
|
||||
} DNM_tdstParsingDatas;
|
||||
|
||||
/* Methods */
|
||||
|
||||
#define DNM_M_p_stCPDGetPosition(_p_stParsingDatas) (&(_p_stParsingDatas)->stPosition)
|
||||
#define DNM_M_p_stCPDGetTarget(_p_stParsingDatas) (&(_p_stParsingDatas)->stVector)
|
||||
#define DNM_M_xCPDGetLastAngleMoveCam(_p_stParsingDatas) ((_p_stParsingDatas)->xOutAlpha)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
98
Rayman_X/cpa/public/MEC/dnmcame.h
Normal file
98
Rayman_X/cpa/public/MEC/dnmcame.h
Normal file
@@ -0,0 +1,98 @@
|
||||
#ifndef _MECCAME_H_
|
||||
#define _MECCAME_H_
|
||||
|
||||
/*#include "dnmvecto.h"*/
|
||||
#include "MEC\DNMDynam.h"
|
||||
#include "MEC\ParsData.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definition of the values of flags to control dynamic.
|
||||
*/
|
||||
#define DNM_CAM_C_NoLinearParsing 0x0001
|
||||
#define DNM_CAM_C_NoLinearInertia 0x0002
|
||||
#define DNM_CAM_C_NoAngularParsing 0x0004
|
||||
#define DNM_CAM_C_NoAngularInertia 0x0008
|
||||
#define DNM_CAM_C_NoTargetParsing 0x0010
|
||||
#define DNM_CAM_C_NoTargetInertia 0x0020
|
||||
#define DNM_CAM_C_NoObstacle 0x0040
|
||||
#define DNM_CAM_C_FixedOrientation 0x0080
|
||||
#define DNM_CAM_C_NoCollisionWhenNotMoving 0x0100 /* MT : 28/07/99 */
|
||||
|
||||
/*
|
||||
* Compute Camera System Axis
|
||||
*/
|
||||
void CAM_fn_vComputeCameraSystemAxis
|
||||
(
|
||||
struct DNM_stDynamics *_p_stDynamics,
|
||||
HIE_tdxHandleToSuperObject _h_SupObj,
|
||||
MTH3D_tdstVector *_p_stNewPosition,
|
||||
MTH3D_tdstVector *_p_stNewTarget,
|
||||
MTH3D_tdstVector *_p_stAxisX,
|
||||
MTH3D_tdstVector *_p_stAxisY,
|
||||
MTH3D_tdstVector *_p_stAxisZ
|
||||
);
|
||||
|
||||
/*
|
||||
* Camera model
|
||||
*/
|
||||
DNM_tdstDynamics *DNM_p_stDynamicsCameraMechanics
|
||||
(
|
||||
DNM_tdstDynamics *_p_stDynamics,
|
||||
HIE_tdxHandleToSuperObject _hSupObj,
|
||||
DNM_tdstParsingDatas *_p_stParsingDatas,
|
||||
DNM_tdxHandleToMecIdentityCard _h_MecIdCard,
|
||||
MTH_tdxReal _xDT
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Camera model of obstacle module
|
||||
*/
|
||||
struct DNM_stMecObstacle *DNM_p_stObstacleCameraObstacle
|
||||
(
|
||||
struct DNM_stMecObstacle *_p_stObstacle,
|
||||
struct DNM_stDynamics *_p_stDynamics,
|
||||
struct DNM_stParsingDatas *_p_stExternData,
|
||||
HIE_tdxHandleToSuperObject _p_stSupObj,
|
||||
MTH3D_tdstVector *_p_stPosition,
|
||||
MTH3D_tdstVector *_p_stNewPosition,
|
||||
/* MTH3D_tdstVector *_p_stTarget,*/
|
||||
MTH_tdxReal _xDT
|
||||
);
|
||||
|
||||
/*
|
||||
* Camera model for update function
|
||||
*/
|
||||
struct DNM_stDynamics *DNM_p_stDynamicsCameraUpdate
|
||||
(
|
||||
struct DNM_stDynamics *_p_stDynamics,
|
||||
DNM_tdstParsingDatas *_p_stExternData,
|
||||
HIE_tdxHandleToSuperObject _p_stSupObj,
|
||||
struct DNM_stMecObstacle *_p_stObstacle,
|
||||
MTH3D_tdstVector *_p_stNewPosition,
|
||||
MTH3D_tdstVector *_p_stNewTarget
|
||||
);
|
||||
|
||||
extern ACP_tdxBool CAM_fn_bVectorIsNull(MTH3D_tdstVector *, MTH_tdxReal);
|
||||
extern MTH_tdxReal CAM_fn_xComputeHorizontalAngle(MTH3D_tdstVector *, MTH3D_tdstVector *, MTH3D_tdstVector *);
|
||||
extern MTH_tdxReal CAM_fn_xComputeVerticalAngle(MTH3D_tdstVector *, MTH3D_tdstVector *, MTH3D_tdstVector *);
|
||||
|
||||
extern CPA_EXPORT long CAM_lHaveITakeSThgIntoTheMug
|
||||
(
|
||||
DNM_tdstMecObstacle *_p_stResultObstacle,
|
||||
HIE_tdxHandleToSuperObject _p_stSupObj,
|
||||
POS_tdstCompletePosition *_p_stStartPosition,
|
||||
POS_tdstCompletePosition *_p_stEndPosition
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
543
Rayman_X/cpa/public/MEC/dnmdynam.h
Normal file
543
Rayman_X/cpa/public/MEC/dnmdynam.h
Normal file
@@ -0,0 +1,543 @@
|
||||
#ifndef __DNMDYNAM_H__
|
||||
#define __DNMDYNAM_H__
|
||||
|
||||
|
||||
#include "hidcard.h"
|
||||
#include "MecMatCa.h"
|
||||
#include "DNMRepor.h"
|
||||
#include "macdpid.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Option */
|
||||
#if !defined(RETAIL) && !defined(U64) /*AR9812 Gcc bug with MEC_CHECK_ACCESS*/
|
||||
#define MEC_CHECK_ACCESS /* Check dynamic size */
|
||||
#endif /* RETAIL*/
|
||||
|
||||
|
||||
|
||||
/* Definition of the object type */
|
||||
#define DNM_C_lObjectType_Solid 0x00000001
|
||||
#define DNM_C_lObjectType_Liquid 0x00000002
|
||||
#define DNM_C_lObjectType_Gas 0x00000003
|
||||
#define DNM_C_lObjectType_Plasma 0x00000004
|
||||
#define DNM_C_lObjectType_Mobile 0x00010000
|
||||
#define DNM_C_lObjectType_SolidMobile (DNM_C_lObjectType_Solid|DNM_C_lObjectType_Mobile)
|
||||
#define DNM_C_lObjectType_LiquidMobile (DNM_C_lObjectType_Liquid|DNM_C_lObjectType_Mobile)
|
||||
#define DNM_C_lObjectType_GasMobile (DNM_C_lObjectType_Gas|DNM_C_lObjectType_Mobile)
|
||||
#define DNM_C_lObjectType_PlasmaMobile (DNM_C_lObjectType_Plasma|DNM_C_lObjectType_Mobile)
|
||||
|
||||
/* Bit field */
|
||||
#define DNM_C_Animation 0x00000001 /* animation speed ? */
|
||||
#define DNM_C_Collide 0x00000002 /* collide with the map ? */
|
||||
#define DNM_C_Gravity 0x00000004 /* gravity on ? */
|
||||
#define DNM_C_Tilt 0x00000008 /* tilt in turn */
|
||||
#define DNM_C_Gi 0x00000010 /* gi */
|
||||
#define DNM_C_OnGround 0x00000020 /* put on ground */
|
||||
#define DNM_C_Climb 0x00000040 /* climb */
|
||||
#define DNM_C_CollisionControl 0x00000080 /* use dynamics parameters when collide */
|
||||
#define DNM_C_KeepWallSpeedZ 0x00000100 /* keep z speed when collide a wall */
|
||||
#define DNM_C_SpeedLimit 0x00000200 /* limit speed ? */
|
||||
#define DNM_C_Inertia 0x00000400 /* inertia ? */
|
||||
#define DNM_C_Stream 0x00000800 /* stream ? */
|
||||
#define DNM_C_StickOnPlatform 0x00001000 /* stick on platform ? */
|
||||
#define DNM_C_Scale 0x00002000 /* use scale ? */
|
||||
#define DNM_C_AbsoluteImposeSpeed 0x00004000 /* absolute speed ? */
|
||||
#define DNM_C_AbsoluteProposeSpeed 0x00008000 /* absolute speed ? */
|
||||
#define DNM_C_AbsoluteAddSpeed 0x00010000 /* absolute speed ? */
|
||||
#define DNM_C_ImposeSpeedX 0x00020000 /* impose x ? */
|
||||
#define DNM_C_ImposeSpeedY 0x00040000 /* impose y ? */
|
||||
#define DNM_C_ImposeSpeedZ 0x00080000 /* impose z ? */
|
||||
#define DNM_C_ProposeSpeedX 0x00100000 /* propose x ? */
|
||||
#define DNM_C_ProposeSpeedY 0x00200000 /* propose y ? */
|
||||
#define DNM_C_ProposeSpeedZ 0x00400000 /* propose z ? */
|
||||
#define DNM_C_AddSpeedX 0x00800000 /* add x ? */
|
||||
#define DNM_C_AddSpeedY 0x01000000 /* add y ? */
|
||||
#define DNM_C_AddSpeedZ 0x02000000 /* add z ? */
|
||||
#define DNM_C_LimitX 0x04000000 /* limit x ? */
|
||||
#define DNM_C_LimitY 0x08000000 /* limit y ? */
|
||||
#define DNM_C_LimitZ 0x10000000 /* limit z ? */
|
||||
#define DNM_C_ImposeRotation 0x20000000 /* impose rotation ? */
|
||||
#define DNM_C_LockPlatform 0x40000000 /* lock the link between platform and actor */
|
||||
#define DNM_C_ImposeTranslation 0x80000000 /* impose translation ? */
|
||||
|
||||
#define DNM_C_BaseSize 0x00000001 /* Base */ /* IMPORTANT don't change */
|
||||
#define DNM_C_AdvancedSize 0x00000002 /* Advanced */ /* IMPORTANT don't change */
|
||||
#define DNM_C_ComplexSize 0x00000004 /* Complex */ /* IMPORTANT don't change */
|
||||
#define DNM_C_Reservated 0x00000008 /* reserved */ /* IMPORTANT don't change */
|
||||
#define DNM_C_MechanicChange 0x00000010 /* The machanic has just change */
|
||||
#define DNM_C_PlatformCrash 0x00000020 /* actor takes a platform on the mug */
|
||||
#define DNM_C_CanFall 0x00000040 /* actor walk on an edge ground limit */
|
||||
#define DNM_C_Init 0x00000080 /* mechanic must be initialized */
|
||||
#define DNM_C_Spider 0x00000100 /* spider mechanic */
|
||||
#define DNM_C_Shoot 0x00000200 /* shoot option ? */
|
||||
#define DNM_C_SafeValid 0x00000400 /* safe translation valid ? */
|
||||
#define DNM_C_ComputeInvertMatrix 0x00000800 /* compute invert matrix */
|
||||
#define DNM_C_ChangeScale 0x00001000 /* change scale */
|
||||
#define DNM_C_Exec 0x00002000 /* mechanic execution flag */
|
||||
#define DNM_C_CollisionReport 0x00004000 /* Collision */
|
||||
#define DNM_C_NoGravity 0x00008000 /* No gravity */
|
||||
#define DNM_C_Stop 0x00010000 /* The mechanic can't realize the request */
|
||||
#define DNM_C_SlidingGround 0x00020000 /* The actor is on a sliding ground */
|
||||
#define DNM_C_Always 0x00040000 /* always dynamic */
|
||||
#define DNM_C_Crash 0x00080000 /* actor is crashed by another actor */
|
||||
#define DNM_C_Swim 0x00100000 /* swim */
|
||||
#define DNM_C_NeverFall 0x00200000 /* if CanFall is set, don't fall */
|
||||
#define DNM_C_Hanging 0x00400000 /* Hanging mechanic */
|
||||
#define DNM_C_WallAdjust 0x00800000 /* we must check wall collision next time */
|
||||
#define DNM_C_ActorMove 0x01000000 /* actor move ? */
|
||||
#define DNM_C_ForceSafeWalk 0x02000000 /* safe walk mechanic next time ? */
|
||||
#define DNM_C_DontUseNewMechanic 0x04000000 /* Use new mechanic ? */
|
||||
|
||||
|
||||
|
||||
|
||||
/* for actor editor */
|
||||
#define C_ucMechanic_Base DNM_C_BaseSize
|
||||
#define C_ucMechanic_Advanced (DNM_C_BaseSize|DNM_C_AdvancedSize)
|
||||
#define C_ucMechanic_Complex (DNM_C_BaseSize|DNM_C_AdvancedSize|DNM_C_ComplexSize)
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------*/
|
||||
/*--------------------------------------- DEFINITION --------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
/*---------------------------------- Base block -------------------------------------------*/
|
||||
typedef struct DNM_stDynamicsBaseBlock
|
||||
{
|
||||
long m_lObjectType;
|
||||
DNM_tdxHandleToMecIdentityCard m_pCurrentIdCard; /* current Id card */
|
||||
unsigned long ulFlags; /* Bit */
|
||||
unsigned long ulEndFlags; /* Field */
|
||||
#if !defined(PRESS_DEMO) /* swap members to make the engine unusable with the binarized data of another engine */
|
||||
MTH_tdxReal m_xGravity; /* g */
|
||||
MTH_tdxReal m_xSlopeLimit; /* tan of slope limit */
|
||||
#else
|
||||
MTH_tdxReal m_xSlopeLimit; /* tan of slope limit */
|
||||
MTH_tdxReal m_xGravity; /* g */
|
||||
#endif /* PRESS_DEMO */
|
||||
MTH_tdxReal m_xCosSlope; /* Cos ( SlopeLimit ) */
|
||||
MTH_tdxReal m_xSlide; /* slide parameter for collision control */
|
||||
MTH_tdxReal m_xRebound; /* rebound parameter for collision control */
|
||||
MTH3D_tdstVector m_stImposeSpeed; /* user speed */
|
||||
MTH3D_tdstVector m_stProposeSpeed; /* user speed */
|
||||
MTH3D_tdstVector m_stPreviousSpeed; /* previous speed */
|
||||
MTH3D_tdstVector m_stScale; /* actor scale */
|
||||
MTH3D_tdstVector m_stSpeedAnim; /* animation speed from player */
|
||||
MTH3D_tdstVector m_stSafeTranslation; /* safe position in the map */
|
||||
MTH3D_tdstVector m_stAddTranslation; /* additionnal translation */
|
||||
POS_tdstCompletePosition m_stPreviousMatrix; /* actor previous matrix */
|
||||
POS_tdstCompletePosition m_stCurrentMatrix; /* actor current matrix */
|
||||
MTH3D_tdstMatrix m_stImposeRotationMatrix; /* impose rotation matrix */
|
||||
unsigned char m_ucNbFrame; /* previous number of frame */
|
||||
DNM_tdstReport* m_pstReport; /* collision report : NULL if not used */
|
||||
} DNM_tdstDynamicsBaseBlock;
|
||||
|
||||
|
||||
/*---------------------------------- Advanced block -------------------------------------------*/
|
||||
typedef struct DNM_stDynamicsAdvancedBlock
|
||||
{
|
||||
MTH_tdxReal m_xInertiaX; /* inertia x factor */
|
||||
MTH_tdxReal m_xInertiaY; /* inertia y factor */
|
||||
MTH_tdxReal m_xInertiaZ; /* inertia z factor */
|
||||
MTH_tdxReal m_xStreamPrority; /* stream priority */
|
||||
MTH_tdxReal m_xStreamFactor; /* stream = stream speed x StreamFactor */
|
||||
MTH_tdxReal m_xSlideFactorX; /* x slide */
|
||||
MTH_tdxReal m_xSlideFactorY; /* y slide */
|
||||
MTH_tdxReal m_xSlideFactorZ; /* z slide */
|
||||
MTH_tdxReal m_xPreviousSlide; /* previous slide */
|
||||
MTH3D_tdstVector m_stMaxSpeed; /* max speed limit */
|
||||
MTH3D_tdstVector m_stStreamSpeed; /* stream speed */
|
||||
MTH3D_tdstVector m_stAddSpeed; /* user speed */
|
||||
MTH3D_tdstVector m_stLimit; /* user limit */
|
||||
MTH3D_tdstVector m_stCollisionTranslation; /* next end collision point */
|
||||
MTH3D_tdstVector m_stInertiaTranslation; /* translation that doesn't take part to inertia */
|
||||
MTH3D_tdstVector m_stGroundNormal; /* ground normal */
|
||||
MTH3D_tdstVector m_stWallNormal; /* wall normal */
|
||||
char m_cCollideCounter; /* number of mechanic call without collision */
|
||||
} DNM_tdstDynamicsAdvancedBlock;
|
||||
|
||||
|
||||
/*---------------------------------- Complex block -------------------------------------------*/
|
||||
typedef struct DNM_stDynamicsComplexBlock
|
||||
{
|
||||
MTH_tdxReal m_xTiltIntensity; /* tilt intensity */
|
||||
MTH_tdxReal m_xTiltInertia; /* tilt inertia */
|
||||
MTH_tdxReal m_xTiltOrigin; /* tilt rotation origin on Z axis */
|
||||
MTH_tdxReal m_xTiltAngle;
|
||||
MTH_tdxReal m_xHangingLimit; /* Z limit in hanging mechanic */
|
||||
MTH3D_tdstVector m_stContact; /* contact with obstacle */
|
||||
MTH3D_tdstVector m_stFallTranslation; /* fall translation : is valid when flag can fall is set */
|
||||
tdstMACDPID m_stExternalDatas;
|
||||
HIE_tdxHandleToSuperObject m_hPlatform; /* handle to father platform if one else NULL */
|
||||
POS_tdstCompletePosition m_stAbsolutePreviousMatrix; /* actor absolute/platform previous matrix */
|
||||
POS_tdstCompletePosition m_stPrevPreviousMatrix; /* actor previous previous matrix */
|
||||
} DNM_tdstDynamicsComplexBlock;
|
||||
|
||||
|
||||
|
||||
/*---------------------------------- Base dynamic -------------------------------------------*/
|
||||
typedef struct DNM_stBaseDynamics
|
||||
{
|
||||
DNM_tdstDynamicsBaseBlock m_tdstDynamicsBaseBlock;
|
||||
} DNM_tdstBaseDynamics;
|
||||
|
||||
/*---------------------------------- Advanced dynamic -------------------------------------------*/
|
||||
typedef struct DNM_stAdvancedDynamics
|
||||
{
|
||||
DNM_tdstDynamicsBaseBlock m_tdstDynamicsBaseBlock;
|
||||
DNM_tdstDynamicsAdvancedBlock m_tdstDynamicsAdvancedBlock;
|
||||
} DNM_tdstAdvancedDynamics;
|
||||
|
||||
/*---------------------------------- Complex dynamic -------------------------------------------*/
|
||||
typedef struct DNM_stComplexDynamics
|
||||
{
|
||||
DNM_tdstDynamicsBaseBlock m_tdstDynamicsBaseBlock;
|
||||
DNM_tdstDynamicsAdvancedBlock m_tdstDynamicsAdvancedBlock;
|
||||
DNM_tdstDynamicsComplexBlock m_tdstDynamicsComplexBlock;
|
||||
} DNM_tdstComplexDynamics;
|
||||
|
||||
|
||||
/*---------------------------------- Dynamic -------------------------------------------*/
|
||||
typedef struct DNM_stDynamics
|
||||
{
|
||||
DNM_tdstDynamicsBaseBlock m_tdstDynamicsBaseBlock;
|
||||
DNM_tdstDynamicsAdvancedBlock m_tdstDynamicsAdvancedBlock;
|
||||
DNM_tdstDynamicsComplexBlock m_tdstDynamicsComplexBlock;
|
||||
} DNM_tdstDynamics;
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------- MACRO ----------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------ Internal function ---------------------------------------*/
|
||||
#ifdef MEC_CHECK_ACCESS
|
||||
DNM_tdstDynamicsBaseBlock* DNM_fn_pstGetBaseBlockWithAdvancedCheckAccess (DNM_tdstDynamics *p_stDynamic);
|
||||
DNM_tdstDynamicsBaseBlock* DNM_fn_pstGetBaseBlockWithComplexCheckAccess (DNM_tdstDynamics *p_stDynamic);
|
||||
DNM_tdstDynamicsAdvancedBlock* DNM_fn_pstGetAdvancedBlockWithCheckAccess (DNM_tdstDynamics *p_stDynamic);
|
||||
DNM_tdstDynamicsComplexBlock* DNM_fn_pstGetComplexBlockWithCheckAccess (DNM_tdstDynamics *p_stDynamic);
|
||||
DNM_tdstReport* DNM_fn_pstGetReportWithCheckAccess (DNM_tdstDynamics *p_stDynamic);
|
||||
HIE_tdxHandleToSuperObject DNM_fn_pstGetActorWithDynamic (DNM_tdstDynamics *p_stDynamic);
|
||||
#endif /* MEC_CHECK_ACCESS*/
|
||||
|
||||
|
||||
/*------------------------------------------ Internal tools ------------------------------*/
|
||||
#define DNM_M_pstGetBaseBlock(_p_stDynamics) (&((_p_stDynamics)->m_tdstDynamicsBaseBlock))
|
||||
|
||||
#ifdef MEC_CHECK_ACCESS
|
||||
#define DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics) DNM_fn_pstGetBaseBlockWithAdvancedCheckAccess(_p_stDynamics)
|
||||
#define DNM_M_pstGetBaseBlockForComplexAccess(_p_stDynamics) DNM_fn_pstGetBaseBlockWithComplexCheckAccess(_p_stDynamics)
|
||||
#define DNM_M_pstGetAdvancedBlock(_p_stDynamics) DNM_fn_pstGetAdvancedBlockWithCheckAccess(_p_stDynamics)
|
||||
#define DNM_M_pstGetComplexBlock(_p_stDynamics) DNM_fn_pstGetComplexBlockWithCheckAccess(_p_stDynamics)
|
||||
#else
|
||||
#define DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics) DNM_M_pstGetBaseBlock(_p_stDynamics)
|
||||
#define DNM_M_pstGetBaseBlockForComplexAccess(_p_stDynamics) DNM_M_pstGetBaseBlock(_p_stDynamics)
|
||||
#define DNM_M_pstGetAdvancedBlock(_p_stDynamics) (&((_p_stDynamics)->m_tdstDynamicsAdvancedBlock))
|
||||
#define DNM_M_pstGetComplexBlock(_p_stDynamics) (&((_p_stDynamics)->m_tdstDynamicsComplexBlock))
|
||||
#endif
|
||||
|
||||
/*------------------------------------------ Base ---------------------------------------*/
|
||||
|
||||
/*----- Get ----*/
|
||||
#define DNM_M_lDynamicsGetObjectType(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_lObjectType)
|
||||
#define DNM_M_pDynamicsGetCurrentIdCard(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_pCurrentIdCard)
|
||||
|
||||
/* get bit-booleans */
|
||||
#define DNM_M_bDynamicsIsAnimation(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Animation ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsCollide(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Collide ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsGravity(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Gravity ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsTilt(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Tilt ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsGi(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Gi ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsOnGround(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_OnGround ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsClimb(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Climb ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsSpider(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_Spider ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsShoot(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_Shoot ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsCollisionControl(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_CollisionControl ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsKeepWallSpeedZ(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_KeepWallSpeedZ ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsSpeedLimit(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_SpeedLimit ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsInertia(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Inertia ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsStream(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Stream ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsStickOnPlatform(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_StickOnPlatform ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsScale(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_Scale ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsAbsoluteImposeSpeed(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_AbsoluteImposeSpeed ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsRelativeImposeSpeed(_p_stDynamics) (!(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_AbsoluteImposeSpeed) ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsAbsoluteProposeSpeed(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_AbsoluteProposeSpeed ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsRelativeProposeSpeed(_p_stDynamics) (!(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_AbsoluteProposeSpeed) ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsAbsoluteAddSpeed(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_AbsoluteAddSpeed ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsRelativeAddSpeed(_p_stDynamics) (!(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_AbsoluteAddSpeed) ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsImposeSpeedX(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_ImposeSpeedX ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsImposeSpeedY(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_ImposeSpeedY ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsImposeSpeedZ(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_ImposeSpeedZ ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsProposeSpeedX(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_ProposeSpeedX ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsProposeSpeedY(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_ProposeSpeedY ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsProposeSpeedZ(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_ProposeSpeedZ ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsAddSpeedX(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_AddSpeedX ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsAddSpeedY(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_AddSpeedY ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsAddSpeedZ(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_AddSpeedZ ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsLimitX(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_LimitX ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsLimitY(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_LimitY ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsLimitZ(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_LimitZ ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsImposeRotation(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_ImposeRotation ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsImposeTranslation(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_ImposeTranslation ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsLockPlatform(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & DNM_C_LockPlatform ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsMechanicChange(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_MechanicChange ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsPlatformCrash(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_PlatformCrash ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsCanFall(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_CanFall ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsInit(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_Init ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsChangeScale(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_ChangeScale ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsExec(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_Exec ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsBaseSize(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_BaseSize ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsAdvancedSize(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_AdvancedSize ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsComplexSize(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_ComplexSize ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsCollisionReport(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_CollisionReport ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsSafeValid(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_SafeValid ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsComputeInvertMatrix(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_ComputeInvertMatrix ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsNoGravity(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_NoGravity ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsStop(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_Stop ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsSlidingGround(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_SlidingGround ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsAlways(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_Always ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsCrash(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_Crash ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsSwim(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_Swim ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsNeverFall(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_NeverFall ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsHanging(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_Hanging ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsWallAdjust(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_WallAdjust ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsActorMove(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_ActorMove ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsForceSafeWalk(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_ForceSafeWalk ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsDontUseNewMechanic(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags & DNM_C_DontUseNewMechanic ? TRUE: FALSE)
|
||||
|
||||
|
||||
#define DNM_M_xDynamicsGetGravityFactor(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_xGravity)
|
||||
#define DNM_M_xDynamicsGetSlopeLimit(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_xSlopeLimit)
|
||||
#define DNM_M_xDynamicsGetCosSlope(_p_stDynamics) ( DNM_M_pstGetBaseBlock(_p_stDynamics)->m_xCosSlope )
|
||||
#define DNM_M_xDynamicsGetSlide(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_xSlide)
|
||||
#define DNM_M_xDynamicsGetRebound(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_xRebound)
|
||||
#define DNM_M_pDynamicsGetImposeSpeed(_p_stDynamics) ( &DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stImposeSpeed )
|
||||
#define DNM_M_pDynamicsGetProposeSpeed(_p_stDynamics) ( &DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stProposeSpeed )
|
||||
#define DNM_M_pDynamicsGetPreviousSpeed(_p_stDynamics) ( &DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stPreviousSpeed )
|
||||
#define DNM_M_p_stDynamicsGetScaleX(_p_stDynamics) (MTH3D_M_xGetXofVector(&DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stScale))
|
||||
#define DNM_M_p_stDynamicsGetScaleY(_p_stDynamics) (MTH3D_M_xGetYofVector(&DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stScale))
|
||||
#define DNM_M_p_stDynamicsGetScaleZ(_p_stDynamics) (MTH3D_M_xGetZofVector(&DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stScale))
|
||||
#define DNM_M_p_stDynamicsGetSpeedAnim(_p_stDynamics) (&DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stSpeedAnim)
|
||||
#define DNM_M_pDynamicsGetSafeTranslation(_p_stDynamics) ( &DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stSafeTranslation )
|
||||
#define DNM_M_pDynamicsGetAddTranslation(_p_stDynamics) ( &DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stAddTranslation )
|
||||
#define DNM_M_p_stDynamicsGetPreviousMatrix(_p_stDynamics) (&DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stPreviousMatrix)
|
||||
#define DNM_M_p_stDynamicsGetCurrentMatrix(_p_stDynamics) (&DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stCurrentMatrix)
|
||||
#define DNM_M_p_stDynamicsGetImposeRotationMatrix(_p_stDynamics) (&DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stImposeRotationMatrix)
|
||||
#define DNM_M_cDynamicsGetNbFrame(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_ucNbFrame)
|
||||
#ifdef MEC_CHECK_ACCESS
|
||||
#define DNM_M_p_stDynamicsGetReport(_p_stDynamics) DNM_fn_pstGetReportWithCheckAccess(_p_stDynamics)
|
||||
#else
|
||||
#define DNM_M_p_stDynamicsGetReport(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_pstReport)
|
||||
#endif /* MEC_CHECK_ACCESS*/
|
||||
#define DNM_M_p_stDynamicsGetReportWithoutCheckAccess(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_pstReport)
|
||||
/*#define DNM_M_p_stDynamicsGetMecReport(_p_stDynamics) ((DNM_tdstReport*)(DNM_M_pstGetBaseBlock(_p_stDynamics)->m_pstReport))*/
|
||||
|
||||
/*----- Set ----*/
|
||||
#define DNM_M_lDynamicsSetObjectType(_p_stDynamics,_lValue) (DNM_M_lDynamicsGetObjectType(_p_stDynamics) = (_lValue))
|
||||
#define DNM_M_vDynamicsSetCurrentIdCard(_p_stDynamics,pCurrentIdCard) (DNM_M_pDynamicsGetCurrentIdCard(_p_stDynamics) = pCurrentIdCard)
|
||||
|
||||
/* set Bit-Booleans */
|
||||
#define DNM_M_vDynamicsSetAnimation(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_Animation) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_Animation)))
|
||||
#define DNM_M_vDynamicsSetCollide(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_Collide) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_Collide)))
|
||||
#define DNM_M_vDynamicsSetGravity(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_Gravity) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_Gravity)))
|
||||
#define DNM_M_vDynamicsSetTilt(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForComplexAccess(_p_stDynamics)->ulFlags |= DNM_C_Tilt) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_Tilt)))
|
||||
#define DNM_M_vDynamicsSetGi(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_Gi) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_Gi)))
|
||||
#define DNM_M_vDynamicsSetOnGround(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_OnGround) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_OnGround)))
|
||||
#define DNM_M_vDynamicsSetClimb(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_Climb) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_Climb)))
|
||||
#define DNM_M_vDynamicsSetSpider(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_Spider) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_Spider)))
|
||||
#define DNM_M_vDynamicsSetShoot(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_Shoot) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_Shoot)))
|
||||
#define DNM_M_vDynamicsSetCollisionControl(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_CollisionControl) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_CollisionControl)))
|
||||
#define DNM_M_vDynamicsSetKeepWallSpeedZ(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_KeepWallSpeedZ) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_KeepWallSpeedZ)))
|
||||
#define DNM_M_vDynamicsSetSpeedLimit(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics)->ulFlags |= DNM_C_SpeedLimit) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_SpeedLimit)))
|
||||
#define DNM_M_vDynamicsSetInertia(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics)->ulFlags |= DNM_C_Inertia) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_Inertia)))
|
||||
#define DNM_M_vDynamicsSetStream(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics)->ulFlags |= DNM_C_Stream) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_Stream)))
|
||||
#define DNM_M_vDynamicsSetStickOnPlatform(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_StickOnPlatform) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_StickOnPlatform)))
|
||||
#define DNM_M_vDynamicsSetScaleOption(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_Scale) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_Scale)))
|
||||
#define DNM_M_bDynamicsSetAbsoluteImposeSpeed(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_AbsoluteImposeSpeed) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_AbsoluteImposeSpeed)))
|
||||
#define DNM_M_bDynamicsSetRelativeImposeSpeed(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_AbsoluteImposeSpeed) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_AbsoluteImposeSpeed)))
|
||||
#define DNM_M_bDynamicsSetAbsoluteProposeSpeed(_p_stDynamics,_bValue)(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_AbsoluteProposeSpeed) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_AbsoluteProposeSpeed)))
|
||||
#define DNM_M_bDynamicsSetRelativeProposeSpeed(_p_stDynamics,_bValue)(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_AbsoluteProposeSpeed) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_AbsoluteProposeSpeed)))
|
||||
#define DNM_M_bDynamicsSetAbsoluteAddSpeed(_p_stDynamics,_bValue)(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_AbsoluteAddSpeed) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_AbsoluteAddSpeed)))
|
||||
#define DNM_M_bDynamicsSetRelativeAddSpeed(_p_stDynamics,_bValue)(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_AbsoluteAddSpeed) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_AbsoluteAddSpeed)))
|
||||
#define DNM_M_vDynamicsSetImposeSpeedX(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_ImposeSpeedX) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_ImposeSpeedX)))
|
||||
#define DNM_M_vDynamicsSetImposeSpeedY(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_ImposeSpeedY) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_ImposeSpeedY)))
|
||||
#define DNM_M_vDynamicsSetImposeSpeedZ(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_ImposeSpeedZ) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_ImposeSpeedZ)))
|
||||
#define DNM_M_vDynamicsSetProposeSpeedX(_p_stDynamics,_bValue)(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_ProposeSpeedX) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_ProposeSpeedX)))
|
||||
#define DNM_M_vDynamicsSetProposeSpeedY(_p_stDynamics,_bValue)(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_ProposeSpeedY) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_ProposeSpeedY)))
|
||||
#define DNM_M_vDynamicsSetProposeSpeedZ(_p_stDynamics,_bValue)(DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_ProposeSpeedZ) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_ProposeSpeedZ)))
|
||||
#define DNM_M_vDynamicsSetAddSpeedX(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics)->ulFlags |= DNM_C_AddSpeedX) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_AddSpeedX)))
|
||||
#define DNM_M_vDynamicsSetAddSpeedY(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics)->ulFlags |= DNM_C_AddSpeedY) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_AddSpeedY)))
|
||||
#define DNM_M_vDynamicsSetAddSpeedZ(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics)->ulFlags |= DNM_C_AddSpeedZ) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_AddSpeedZ)))
|
||||
#define DNM_M_vDynamicsSetLimitX(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics)->ulFlags |= DNM_C_LimitX) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_LimitX)))
|
||||
#define DNM_M_vDynamicsSetLimitY(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics)->ulFlags |= DNM_C_LimitY) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_LimitY)))
|
||||
#define DNM_M_vDynamicsSetLimitZ(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlockForAdvancedAccess(_p_stDynamics)->ulFlags |= DNM_C_LimitZ) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_LimitZ)))
|
||||
#define DNM_M_vDynamicsSetImposeRotation(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_ImposeRotation) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_ImposeRotation)))
|
||||
#define DNM_M_vDynamicsSetImposeTranslation(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_ImposeTranslation) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_ImposeTranslation)))
|
||||
#define DNM_M_bDynamicsSetLockPlatform(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags |= DNM_C_LockPlatform) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags &= ~DNM_C_LockPlatform)))
|
||||
#define DNM_M_bDynamicsSetMechanicChange(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_MechanicChange) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_MechanicChange)))
|
||||
#define DNM_M_bDynamicsSetPlatformCrash(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_PlatformCrash) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_PlatformCrash)))
|
||||
#define DNM_M_bDynamicsSetCanFall(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_CanFall) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_CanFall)))
|
||||
#define DNM_M_vDynamicsSetInit(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_Init) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_Init)))
|
||||
#define DNM_M_vDynamicsSetChangeScale(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_ChangeScale) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_ChangeScale)))
|
||||
#define DNM_M_vDynamicsSetExec(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_Exec) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_Exec)))
|
||||
#define DNM_M_vDynamicsSetBaseSize(_p_stDynamics) \
|
||||
{ \
|
||||
DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~(DNM_C_BaseSize|DNM_C_AdvancedSize|DNM_C_ComplexSize); \
|
||||
DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_BaseSize; \
|
||||
}
|
||||
#define DNM_M_vDynamicsSetAdvancedSize(_p_stDynamics) \
|
||||
{ \
|
||||
DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~(DNM_C_BaseSize|DNM_C_AdvancedSize|DNM_C_ComplexSize); \
|
||||
DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= (DNM_C_AdvancedSize|DNM_C_BaseSize); \
|
||||
}
|
||||
#define DNM_M_vDynamicsSetComplexSize(_p_stDynamics) \
|
||||
{ \
|
||||
DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= (DNM_C_ComplexSize|DNM_C_AdvancedSize|DNM_C_BaseSize); \
|
||||
}
|
||||
#define DNM_M_vDynamicsSetCollisionReport(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_CollisionReport) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_CollisionReport)))
|
||||
#define DNM_M_vDynamicsSetSafeValid(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_SafeValid) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_SafeValid)))
|
||||
#define DNM_M_vDynamicsSetComputeInvertMatrix(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_ComputeInvertMatrix) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_ComputeInvertMatrix)))
|
||||
#define DNM_M_vDynamicsSetNoGravity(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_NoGravity) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_NoGravity)))
|
||||
#define DNM_M_vDynamicsSetStop(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_Stop) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_Stop)))
|
||||
#define DNM_M_vDynamicsSetSlidingGround(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_SlidingGround) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_SlidingGround)))
|
||||
#define DNM_M_vDynamicsSetAlways(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_Always) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_Always)))
|
||||
#define DNM_M_vDynamicsSetCrash(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_Crash) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_Crash)))
|
||||
#define DNM_M_vDynamicsSetSwim(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_Swim) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_Swim)))
|
||||
#define DNM_M_vDynamicsSetNeverFall(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_NeverFall) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_NeverFall)))
|
||||
#define DNM_M_vDynamicsSetHanging(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_Hanging) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_Hanging)))
|
||||
#define DNM_M_vDynamicsSetWallAdjust(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_WallAdjust) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_WallAdjust)))
|
||||
#define DNM_M_vDynamicsSetActorMove(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_ActorMove) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_ActorMove)))
|
||||
#define DNM_M_vDynamicsSetForceSafeWalk(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_ForceSafeWalk) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_ForceSafeWalk)))
|
||||
#define DNM_M_vDynamicsSetDontUseNewMechanic(_p_stDynamics,_bValue) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags = ((_bValue) ? (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags |= DNM_C_DontUseNewMechanic) : (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulEndFlags &= ~DNM_C_DontUseNewMechanic)))
|
||||
|
||||
|
||||
|
||||
#define DNM_M_vDynamicsSetGravityFactor(_p_stDynamics,xGravity) (DNM_M_xDynamicsGetGravityFactor(_p_stDynamics)=xGravity )
|
||||
#define DNM_M_vDynamicsSetSlopeLimit(_p_stDynamics,xSlopeLimit) (DNM_M_xDynamicsGetSlopeLimit(_p_stDynamics)=xSlopeLimit )
|
||||
#define DNM_M_vDynamicsSetCosSlope(_p_stDynamics,xCosSlope) (DNM_M_xDynamicsGetCosSlope(_p_stDynamics)=xCosSlope)
|
||||
#define DNM_M_vDynamicsSetSlide(_p_stDynamics,xSlide) (DNM_M_xDynamicsGetSlide(_p_stDynamics)=xSlide )
|
||||
#define DNM_M_vDynamicsSetRebound(_p_stDynamics,xRebound) (DNM_M_xDynamicsGetRebound(_p_stDynamics)=xRebound )
|
||||
#define DNM_M_vDynamicsSetImposeSpeed(_p_stDynamics,p_stSpeed) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetImposeSpeed(_p_stDynamics), p_stSpeed )
|
||||
#define DNM_M_vDynamicsSetProposeSpeed(_p_stDynamics,p_stSpeed) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetProposeSpeed(_p_stDynamics), p_stSpeed)
|
||||
#define DNM_M_vDynamicsSetPreviousSpeed(_p_stDynamics,p_stSpeed) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetPreviousSpeed(_p_stDynamics), p_stSpeed)
|
||||
#define DNM_M_vDynamicsSetScale(_p_stDynamics,_xScaleX, _xScaleY, _xScaleZ) { MTH3D_M_vSetXofVector(&(DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stScale),_xScaleX); MTH3D_M_vSetYofVector(&(DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stScale),_xScaleY); MTH3D_M_vSetZofVector(&(DNM_M_pstGetBaseBlock(_p_stDynamics)->m_stScale),_xScaleZ); }
|
||||
#define DNM_M_vDynamicsSetSpeedAnim(_p_stDynamics,pstSpeedAnim) MTH3D_M_vCopyVector( DNM_M_p_stDynamicsGetSpeedAnim(_p_stDynamics), pstSpeedAnim )
|
||||
#define DNM_M_vDynamicsSetSafeTranslation(_p_stDynamics,p_stSafeTranslation) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetSafeTranslation(_p_stDynamics), p_stSafeTranslation )
|
||||
#define DNM_M_vDynamicsSetAddTranslation(_p_stDynamics,p_stAddTranslation) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetAddTranslation(_p_stDynamics), p_stAddTranslation )
|
||||
#define DNM_M_vDynamicsSetImposeRotationMatrix(_p_stDynamics,hMatrix) MTH3D_M_vCopyMatrix ( DNM_M_p_stDynamicsGetImposeRotationMatrix(_p_stDynamics), hMatrix )
|
||||
#define DNM_M_vDynamicsSetNbFrame(_p_stDynamics,_ucNbFrame) (DNM_M_cDynamicsGetNbFrame(_p_stDynamics)=_ucNbFrame)
|
||||
#define DNM_M_DynamicsSetReport(_p_stDynamics,_p_stReport) (DNM_M_pstGetBaseBlock(_p_stDynamics)->m_pstReport=_p_stReport)
|
||||
|
||||
|
||||
/*------------------------------------------ Advanced ---------------------------------------*/
|
||||
|
||||
/*----- Get ----*/
|
||||
#define DNM_M_xDynamicsGetInertiaFactorX(_p_stDynamics) (DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_xInertiaX)
|
||||
#define DNM_M_xDynamicsGetInertiaFactorY(_p_stDynamics) (DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_xInertiaY)
|
||||
#define DNM_M_xDynamicsGetInertiaFactorZ(_p_stDynamics) (DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_xInertiaZ)
|
||||
#define DNM_M_xDynamicsGetStreamPriority(_p_stDynamics) (DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_xStreamPrority)
|
||||
#define DNM_M_xDynamicsGetStreamFactor(_p_stDynamics) (DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_xStreamFactor)
|
||||
#define DNM_M_xDynamicsGetSlideFactorX(_p_stDynamics) ( DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_xSlideFactorX )
|
||||
#define DNM_M_xDynamicsGetSlideFactorY(_p_stDynamics) ( DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_xSlideFactorY )
|
||||
#define DNM_M_xDynamicsGetSlideFactorZ(_p_stDynamics) ( DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_xSlideFactorZ )
|
||||
#define DNM_M_xDynamicsGetPreviousSlide(_p_stDynamics) ( DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_xPreviousSlide )
|
||||
#define DNM_M_pDynamicsGetMaxSpeed(_p_stDynamics) (&DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_stMaxSpeed)
|
||||
#define DNM_M_pDynamicsGetStreamSpeed(_p_stDynamics) (&DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_stStreamSpeed)
|
||||
#define DNM_M_pDynamicsGetAddSpeed(_p_stDynamics) ( &DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_stAddSpeed )
|
||||
#define DNM_M_pDynamicsGetLimit(_p_stDynamics) ( &DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_stLimit )
|
||||
#define DNM_M_pDynamicsGetCollisionTranslation(_p_stDynamics) ( &(DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_stCollisionTranslation) )
|
||||
#define DNM_M_pDynamicsGetInertiaTranslation(_p_stDynamics) ( &DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_stInertiaTranslation )
|
||||
#define DNM_M_pDynamicsGetGroundNormal(_p_stDynamics) ( &(DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_stGroundNormal) )
|
||||
#define DNM_M_pDynamicsGetWallNormal(_p_stDynamics) ( &(DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_stWallNormal) )
|
||||
#define DNM_M_cDynamicsGetCollideCounter(_p_stDynamics) (DNM_M_pstGetAdvancedBlock(_p_stDynamics)->m_cCollideCounter)
|
||||
|
||||
/*----- Set ----*/
|
||||
#define DNM_M_vDynamicsSetInertiaFactorX(_p_stDynamics,xInertiaX) ( DNM_M_xDynamicsGetInertiaFactorX(_p_stDynamics)=xInertiaX )
|
||||
#define DNM_M_vDynamicsSetInertiaFactorY(_p_stDynamics,xInertiaY) ( DNM_M_xDynamicsGetInertiaFactorY(_p_stDynamics)=xInertiaY )
|
||||
#define DNM_M_vDynamicsSetInertiaFactorZ(_p_stDynamics,xInertiaZ) ( DNM_M_xDynamicsGetInertiaFactorZ(_p_stDynamics)=xInertiaZ )
|
||||
#define DNM_M_vDynamicsSetStreamPriority(_p_stDynamics,xStreamPriority) (DNM_M_xDynamicsGetStreamPriority(_p_stDynamics)=xStreamPriority)
|
||||
#define DNM_M_vDynamicsSetStreamFactor(_p_stDynamics,xStreamFactor) (DNM_M_xDynamicsGetStreamFactor(_p_stDynamics)=xStreamFactor)
|
||||
#define DNM_M_vDynamicsSetSlideFactorX(_p_stDynamics,xSlideFactorX) (DNM_M_xDynamicsGetSlideFactorX(_p_stDynamics) = xSlideFactorX)
|
||||
#define DNM_M_vDynamicsSetSlideFactorY(_p_stDynamics,xSlideFactorY) (DNM_M_xDynamicsGetSlideFactorY(_p_stDynamics) = xSlideFactorY)
|
||||
#define DNM_M_vDynamicsSetSlideFactorZ(_p_stDynamics,xSlideFactorZ) (DNM_M_xDynamicsGetSlideFactorZ(_p_stDynamics) = xSlideFactorZ)
|
||||
#define DNM_M_vDynamicsSetPreviousSlide(_p_stDynamics,xPreviousSlide) (DNM_M_xDynamicsGetPreviousSlide(_p_stDynamics) = xPreviousSlide)
|
||||
#define DNM_M_vDynamicsSetMaxSpeed(_p_stDynamics,pstMaxSpeed) MTH3D_M_vCopyVector( DNM_M_pDynamicsGetMaxSpeed(_p_stDynamics), pstMaxSpeed )
|
||||
#define DNM_M_vDynamicsSetStreamSpeed(_p_stDynamics,pstStreamSpeed) MTH3D_M_vCopyVector( DNM_M_pDynamicsGetStreamSpeed(_p_stDynamics), pstStreamSpeed )
|
||||
#define DNM_M_vDynamicsSetAddSpeed(_p_stDynamics,p_stSpeed) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetAddSpeed(_p_stDynamics), p_stSpeed)
|
||||
#define DNM_M_vDynamicsSetLimit(_p_stDynamics,p_stLimit) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetLimit(_p_stDynamics), p_stLimit)
|
||||
#define DNM_M_vDynamicsSetCollisionTranslation(_p_stDynamics,p_stCollisionTranslation) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetCollisionTranslation(_p_stDynamics), p_stCollisionTranslation )
|
||||
#define DNM_M_vDynamicsSetInertiaTranslation(_p_stDynamics,p_stInertiaTranslation) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetInertiaTranslation(_p_stDynamics), p_stInertiaTranslation )
|
||||
#define DNM_M_vDynamicsSetGroundNormal(_p_stDynamics,p_stGroundNormal) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetGroundNormal(_p_stDynamics), p_stGroundNormal )
|
||||
#define DNM_M_vDynamicsSetWallNormal(_p_stDynamics,p_stWallNormal) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetWallNormal(_p_stDynamics), p_stWallNormal )
|
||||
#define DNM_M_vDynamicsSetCollideCounter(_p_stDynamics,_cCounter) (DNM_M_cDynamicsGetCollideCounter(_p_stDynamics)=_cCounter)
|
||||
|
||||
|
||||
/*------------------------------------------ Complex ---------------------------------------*/
|
||||
|
||||
/*----- Get ----*/
|
||||
#define DNM_M_xDynamicsGetTiltIntensity(_p_stDynamics) (DNM_M_pstGetComplexBlock(_p_stDynamics)->m_xTiltIntensity)
|
||||
#define DNM_M_xDynamicsGetTiltInertia(_p_stDynamics) (DNM_M_pstGetComplexBlock(_p_stDynamics)->m_xTiltInertia)
|
||||
#define DNM_M_xDynamicsGetTiltOrigin(_p_stDynamics) (DNM_M_pstGetComplexBlock(_p_stDynamics)->m_xTiltOrigin)
|
||||
#define DNM_M_xDynamicsGetTiltAngle(_p_stDynamics) ( DNM_M_pstGetComplexBlock(_p_stDynamics)->m_xTiltAngle )
|
||||
#define DNM_M_xDynamicsGetHangingLimit(_p_stDynamics) ( DNM_M_pstGetComplexBlock(_p_stDynamics)->m_xHangingLimit )
|
||||
#define DNM_M_pDynamicsGetContact(_p_stDynamics) ( &DNM_M_pstGetComplexBlock(_p_stDynamics)->m_stContact )
|
||||
#define DNM_M_pDynamicsGetFallTranslation(_p_stDynamics) ( &DNM_M_pstGetComplexBlock(_p_stDynamics)->m_stFallTranslation )
|
||||
#define DNM_M_p_stDynamicsGetExternalDatas(_p_stDynamics) (&DNM_M_pstGetComplexBlock(_p_stDynamics)->m_stExternalDatas)
|
||||
#define DNM_M_hDynamicsGetPlatformSO(_p_stDynamics) ( DNM_M_pstGetComplexBlock(_p_stDynamics)->m_hPlatform )
|
||||
#define DNM_M_p_stDynamicsGetAbsolutePreviousMatrix(_p_stDynamics) (&DNM_M_pstGetComplexBlock(_p_stDynamics)->m_stAbsolutePreviousMatrix)
|
||||
#define DNM_M_p_stDynamicsGetPrevPreviousMatrix(_p_stDynamics) (&DNM_M_pstGetComplexBlock(_p_stDynamics)->m_stPrevPreviousMatrix)
|
||||
|
||||
/*----- Set ----*/
|
||||
#define DNM_M_vDynamicsSetTiltIntensity(_p_stDynamics,xTiltIntensity) ( DNM_M_xDynamicsGetTiltIntensity(_p_stDynamics)=xTiltIntensity )
|
||||
#define DNM_M_vDynamicsSetTiltInertia(_p_stDynamics,xTiltInertia) ( DNM_M_xDynamicsGetTiltInertia(_p_stDynamics)=xTiltInertia )
|
||||
#define DNM_M_vDynamicsSetTiltOrigin(_p_stDynamics,xTiltOrigin) ( DNM_M_xDynamicsGetTiltOrigin(_p_stDynamics)=xTiltOrigin )
|
||||
#define DNM_M_vDynamicsSetTiltAngle(_p_stDynamics,xTiltAngle) (DNM_M_xDynamicsGetTiltAngle(_p_stDynamics) = xTiltAngle)
|
||||
#define DNM_M_vDynamicsSetHangingLimit(_p_stDynamics,xHangingLimit) (DNM_M_xDynamicsGetHangingLimit(_p_stDynamics) = xHangingLimit)
|
||||
#define DNM_M_vDynamicsSetContact(_p_stDynamics,p_stContact) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetContact(_p_stDynamics), p_stContact )
|
||||
#define DNM_M_vDynamicsSetFallTranslation(_p_stDynamics,p_stFallTranslation) MTH3D_M_vCopyVector ( DNM_M_pDynamicsGetFallTranslation(_p_stDynamics), p_stFallTranslation )
|
||||
#define DNM_M_p_stDynamicsSetExternalDatas(_p_stDynamics,_p_stMACDPID) M_vMACDPIDCopyClone(DNM_M_p_stDynamicsGetExternalDatas(_p_stDynamics),_p_stMACDPID)
|
||||
#define DNM_M_vDynamicsSetPlatformSO(_p_stDynamics,hPlatform) (DNM_M_hDynamicsGetPlatformSO(_p_stDynamics) = hPlatform)
|
||||
|
||||
/*------------------------------------------ Tools ---------------------------------------*/
|
||||
#define DNM_M_bDynamicsIsProposeSpeed(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & (DNM_C_ProposeSpeedX|DNM_C_ProposeSpeedY|DNM_C_ProposeSpeedZ) ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsImposeSpeed(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & (DNM_C_ImposeSpeedX|DNM_C_ImposeSpeedY|DNM_C_ImposeSpeedZ) ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsAddSpeed(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & (DNM_C_AddSpeedX|DNM_C_AddSpeedY|DNM_C_AddSpeedZ) ? TRUE: FALSE)
|
||||
#define DNM_M_bDynamicsIsLimit(_p_stDynamics) (DNM_M_pstGetBaseBlock(_p_stDynamics)->ulFlags & (DNM_C_LimitX|DNM_C_LimitY|DNM_C_LimitZ) ? TRUE: FALSE)
|
||||
#define DNM_M_vDynamicsDecCollideCounter(_p_stDynamics) (DNM_M_cDynamicsGetCollideCounter(_p_stDynamics)--)
|
||||
|
||||
|
||||
/*------------------------------------------ Functions ---------------------------------------*/
|
||||
|
||||
/* Initialisation */
|
||||
void DNM_fn_vDynamicsInitDefault(DNM_tdstDynamics *_p_stDynamics);
|
||||
|
||||
/* Init dynamic internal parameters*/
|
||||
void DNM_fn_vInitBaseMechanic (DNM_tdstDynamics *p_stDynamic);
|
||||
|
||||
/* Init dynamic fields*/
|
||||
void DNM_fn_vInitDynamic (DNM_tdstDynamics *p_stDynamic, DNM_tdxHandleToMecIdentityCard hIdCard);
|
||||
|
||||
/* Id Card have changed */
|
||||
void DNM_fn_vChangeIdCard (DNM_tdstDynamics *_p_stDynamics,DNM_tdxHandleToMecIdentityCard _hNewIdCard);
|
||||
|
||||
/* Clone */
|
||||
void DNM_fn_vDynamicsCopyClone ( DNM_tdstDynamics *_p_stDst, DNM_tdstDynamics *_p_stSrc );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
30
Rayman_X/cpa/public/MEC/dnmdynst.h
Normal file
30
Rayman_X/cpa/public/MEC/dnmdynst.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef _DNM_DYNST_H_
|
||||
#define _DNM_DYNST_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DNM_NoMove,
|
||||
DNM_Move,
|
||||
DNM_Turn,
|
||||
DNM_GoTo,
|
||||
DNM_Advance,
|
||||
DNM_Rear,
|
||||
DNM_Slide,
|
||||
DNM_FallOver,
|
||||
DNM_Jump,
|
||||
DNM_Fly,
|
||||
DNM_Bump,
|
||||
DNM_Fire,
|
||||
DNM_Reach,
|
||||
DNM_Unknow
|
||||
} DNM_tdeDynamicalState;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
63
Rayman_X/cpa/public/MEC/dnmkinet.h
Normal file
63
Rayman_X/cpa/public/MEC/dnmkinet.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#ifndef _DNMKINET_H_
|
||||
#define _DNMKINET_H_
|
||||
|
||||
/*#include "DNMMove.h"*/
|
||||
#include "DNMMth.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Define the type DNM_tdstKinetic */
|
||||
typedef struct DNM_stKinetic
|
||||
{
|
||||
MTH_tdxReal m_xTime;
|
||||
MTH_tdstMove m_stAcceleration;
|
||||
MTH_tdstMove m_stSpeed;
|
||||
MTH3D_tdstVector m_stLinearPosition0;
|
||||
MTH3D_tdstVector m_stLinearPositionI;
|
||||
MTH3D_tdstVector m_stLinearPosition1;
|
||||
MTH_tdstMove m_stPosition;
|
||||
} DNM_tdstKinetic;
|
||||
|
||||
/* Methods */
|
||||
|
||||
/* Accessors */
|
||||
#define DNM_M_xKineticGetTime(_p_stKinetic) ((_p_stKinetic)->m_xTime)
|
||||
#define DNM_M_p_stKineticGetAcceleration(_p_stKinetic) (&(_p_stKinetic)->m_stAcceleration)
|
||||
#define DNM_M_p_stKineticGetSpeed(_p_stKinetic) (&(_p_stKinetic)->m_stSpeed)
|
||||
#define DNM_M_p_stKineticGetLinearPosition0(_p_stKinetic) (&(_p_stKinetic)->m_stLinearPosition0)
|
||||
#define DNM_M_p_stKineticGetLinearPositionI(_p_stKinetic) (&(_p_stKinetic)->m_stLinearPositionI)
|
||||
#define DNM_M_p_stKineticGetLinearPosition1(_p_stKinetic) (&(_p_stKinetic)->m_stLinearPosition1)
|
||||
#define DNM_M_p_stKineticGetPosition(_p_stKinetic) (&(_p_stKinetic)->m_stPosition)
|
||||
|
||||
#define DNM_M_xKineticSetTime(_p_stKinetic,_xValue) (DNM_M_xKineticGetTime(_p_stKinetic) = (_xValue))
|
||||
#define DNM_M_KineticSetAcceleration(_p_stKinetic,_p_stMove) DNM_M_MoveCopyClone(&(_p_stKinetic)->m_stAcceleration,_p_stMove)
|
||||
#define DNM_M_KineticSetSpeed(_p_stKinetic,_p_stMove) DNM_M_MoveCopyClone(&(_p_stKinetic)->m_stSpeed,_p_stMove)
|
||||
#define DNM_M_KineticSetLinearPosition0(_p_stKinetic,_p_stPoint) DNM_M_PointCopyClone(DNM_M_p_stKineticGetLinearPosition0(_p_stKinetic),_p_stPoint)
|
||||
#define DNM_M_KineticSetLinearPositionI(_p_stKinetic,_p_stPoint) DNM_M_PointCopyClone(DNM_M_p_stKineticGetLinearPositionI(_p_stKinetic),_p_stPoint)
|
||||
#define DNM_M_KineticSetLinearPosition1(_p_stKinetic,_p_stPoint) DNM_M_PointCopyClone(DNM_M_p_stKineticGetLinearPosition1(_p_stKinetic),_p_stPoint)
|
||||
#define DNM_M_KineticSetPosition(_p_stKinetic,_p_stMove) DNM_M_MoveCopyClone(DNM_M_p_stKineticGetPosition(_p_stKinetic),_p_stMove)
|
||||
|
||||
/* Clone */
|
||||
#define DNM_M_KineticCopyClone(_p_stDst,_p_stSrc) {\
|
||||
DNM_M_xKineticSetTime(_p_stDst,DNM_M_xKineticGetTime(_p_stSrc));\
|
||||
MTH_M_MoveCopyClone(&(_p_stDst)->m_stAcceleration,&(_p_stSrc)->m_stAcceleration);\
|
||||
MTH_M_MoveCopyClone(&(_p_stDst)->m_stSpeed,&(_p_stSrc)->m_stSpeed);\
|
||||
MTH3D_M_vCopyVector(DNM_M_p_stKineticGetLinearPosition0(_p_stDst),DNM_M_p_stKineticGetLinearPosition0(_p_stSrc));\
|
||||
MTH3D_M_vCopyVector(DNM_M_p_stKineticGetLinearPositionI(_p_stDst),DNM_M_p_stKineticGetLinearPositionI(_p_stSrc));\
|
||||
MTH3D_M_vCopyVector(DNM_M_p_stKineticGetLinearPosition1(_p_stDst),DNM_M_p_stKineticGetLinearPosition1(_p_stSrc));\
|
||||
MTH_M_MoveCopyClone(&(_p_stDst)->m_stPosition,&(_p_stSrc)->m_stPosition);\
|
||||
}
|
||||
|
||||
/* Initialisation */
|
||||
DNM_tdstKinetic *DNM_p_stKineticInit(DNM_tdstKinetic *_p_stKinetic);
|
||||
|
||||
/* Specific initialisation for the platform */
|
||||
/*void DNM_fn_vKineticPlatFormInit(DNM_tdstKinetic *_p_stKinetic);*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
59
Rayman_X/cpa/public/MEC/dnmldmat.h
Normal file
59
Rayman_X/cpa/public/MEC/dnmldmat.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef __DNMLDMAT_H__
|
||||
#define __DNMLDMAT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cpa_expt.h"
|
||||
#include "SCR.h"
|
||||
|
||||
#define C_SectionMecMatCharacteristics "MechanicalMaterial"
|
||||
|
||||
#define C_EntrySlide "BaseSlide"
|
||||
#define C_EntryRebound "BaseRebound"
|
||||
|
||||
|
||||
/* Call Back */
|
||||
/* to Read xxx.mmc */
|
||||
#if !defined(U64)
|
||||
SCR_tde_Anl_ReturnValue fn_eScriptCallBackMecMatCharacteristics(
|
||||
SCR_tdst_File_Description *_p_stFile,
|
||||
char *_p_szName,
|
||||
char *_ap_szPars[],
|
||||
SCR_tde_Anl_Action _eAction);
|
||||
#endif /* U64 */
|
||||
|
||||
/* Init the load of mechanical material */
|
||||
void DNM_fn_vInitLoadMecMatCharacteristics(void);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
// Description : DNM_fn_vWriteAllMMTBinaryBlocs
|
||||
//----------------------------------------------------------------------------
|
||||
// Input : _szBinaryFileName
|
||||
// Output :
|
||||
----------------------------------------------------------------------------*/
|
||||
/*extern CPA_EXPORT void DNM_fn_vWriteAllMMTBinaryBlocs(char* _szBinaryFileName);*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
// Description : DNM_fn_vReadAllMMTBinaryBlocs
|
||||
//----------------------------------------------------------------------------
|
||||
// Input : _szBinaryFileName : The binary file name
|
||||
// Output :
|
||||
----------------------------------------------------------------------------*/
|
||||
/*extern CPA_EXPORT void DNM_fn_vReadAllMMTBinaryBlocs(char* _szBinaryFileName);*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
// Description : DNM_fn_vReadAllMMTBinaryBlocs2
|
||||
//----------------------------------------------------------------------------
|
||||
// Input : _szBinaryFileName : The binary file name
|
||||
// Output :
|
||||
----------------------------------------------------------------------------*/
|
||||
/*extern CPA_EXPORT void DNM_fn_vReadAllMMTBinaryBlocs2(char* _szBinaryFileName);*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}/* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
22
Rayman_X/cpa/public/MEC/dnmlimty.h
Normal file
22
Rayman_X/cpa/public/MEC/dnmlimty.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef __DNMLIMTY_H__
|
||||
#define __DNMLIMTY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum DNM_eLimbType
|
||||
{
|
||||
DNM_eLTError = -1,
|
||||
DNM_eLTDefault,
|
||||
DNM_eLTFoot,
|
||||
DNM_eLTHand,
|
||||
DNM_eLTHead,
|
||||
DNM_eLTTrunk
|
||||
} DNM_tdeLimbType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
36
Rayman_X/cpa/public/MEC/dnmlkmat.h
Normal file
36
Rayman_X/cpa/public/MEC/dnmlkmat.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef __DNMLKMAT_H__
|
||||
#define __DNMLKMAT_H__
|
||||
|
||||
/* For DLL using these function */
|
||||
#include "cpa_expt.h"
|
||||
#include "SCR.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initialisation Function */
|
||||
extern CPA_EXPORT void DNM_fn_vInitLinkTableOfMecMatCharacteristics();
|
||||
|
||||
/* Create an Entry */
|
||||
extern CPA_EXPORT void DNM_fn_vSetValueInLinkTableOfMecMatCharacteristics( char *_p_szKey,unsigned long _ulValue);
|
||||
|
||||
/* Find Handle with Key */
|
||||
extern CPA_EXPORT unsigned long DNM_fn_ulLink_SearchKeyInLinkTableOfMecMatCharacteristics( char *_p_szKey);
|
||||
|
||||
/* Find Key with Handle */
|
||||
extern CPA_EXPORT char * DNM_fn_p_cSearchValueInLinkTableOfMecMatCharacteristics( unsigned long _ulValue);
|
||||
|
||||
/* Get the Table */
|
||||
#if !defined(U64)
|
||||
extern CPA_EXPORT SCR_tdst_Link_Table *DNM_fn_p_stGetLinkTableOfMecMatCharacteristics();
|
||||
#endif /* U64 */
|
||||
|
||||
/* Prepare the Table for the binary save */
|
||||
extern CPA_EXPORT void DNM_fn_vPrepareSaveMaterialBinaryBloc();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
18
Rayman_X/cpa/public/MEC/dnmmecid.h
Normal file
18
Rayman_X/cpa/public/MEC/dnmmecid.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef __DNMMECID_H__
|
||||
#define __DNMMECID_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
DNM_eMIC_Error = -1,
|
||||
DNM_eCamera,
|
||||
DNM_eBase,
|
||||
} DNM_tdeMechanicsID;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
21
Rayman_X/cpa/public/MEC/dnmreaty.h
Normal file
21
Rayman_X/cpa/public/MEC/dnmreaty.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef __DNMREATY_H__
|
||||
#define __DNMREATY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Define the types of reactions between 2 mobiles */
|
||||
|
||||
typedef enum DNM_eReactionType {
|
||||
DNM_eRT_NoReaction = -1,
|
||||
DNM_eRT_Shock,
|
||||
DNM_eRT_WallContact,
|
||||
DNM_eRT_GroundContact
|
||||
} DNM_tdeReactionType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
40
Rayman_X/cpa/public/MEC/hIdCard.h
Normal file
40
Rayman_X/cpa/public/MEC/hIdCard.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef __HIDCARD_H__
|
||||
#define __HIDCARD_H__
|
||||
|
||||
#include "acp_base.h"
|
||||
/*#include "dnmreal.h"*/
|
||||
#include "dnmmecid.h"
|
||||
|
||||
/* For DLL using these function */
|
||||
#include "cpa_expt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Methods */
|
||||
|
||||
/* Invalidate the handle */
|
||||
extern CPA_EXPORT void DNM_fn_vInvalidateIdentityCard(DNM_tdxHandleToMecIdentityCard *_p_hIdentityCard);
|
||||
|
||||
/* Handle is valid ? */
|
||||
extern CPA_EXPORT ACP_tdxBool DNM_fn_bIsIdentityCardValid(DNM_tdxHandleToMecIdentityCard _hIdentityCard);
|
||||
|
||||
/* Create a handle */
|
||||
extern CPA_EXPORT DNM_tdxHandleToMecIdentityCard DNM_fn_xIdentityCardCreate(DNM_tdeMechanicsID _eType);
|
||||
|
||||
/* Destroy a handle */
|
||||
extern CPA_EXPORT void DNM_fn_vIdentityCardDestroy(DNM_tdxHandleToMecIdentityCard _hOld);
|
||||
|
||||
/* Copy a handle */
|
||||
extern CPA_EXPORT void DNM_fn_vIdentityCardCopy(DNM_tdxHandleToMecIdentityCard _hDst,DNM_tdxHandleToMecIdentityCard _hSrc);
|
||||
|
||||
/* Accessors */
|
||||
DNM_tdeMechanicsID DNM_fn_eIdentityCardGetType(DNM_tdxHandleToMecIdentityCard _hCurrent);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
48
Rayman_X/cpa/public/MEC/hMecMatC.h
Normal file
48
Rayman_X/cpa/public/MEC/hMecMatC.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef __HMECMATC_H__
|
||||
#define __HMECMATC_H__
|
||||
|
||||
#include "MTH.h"
|
||||
#include "acp_base.h"
|
||||
|
||||
#include "cpa_expt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Define the handle linked to the structure tdstMecMatCharacteristics */
|
||||
/************************************************************************/
|
||||
|
||||
typedef void* DNM_tdxHandleToMecMatCharacteristics;
|
||||
|
||||
/* Methods */
|
||||
|
||||
/* Invalidate the handle */
|
||||
extern CPA_EXPORT void DNM_fn_vInvalidateMatCharacteristics(DNM_tdxHandleToMecMatCharacteristics *_p_hMatCharacteristics);
|
||||
|
||||
/* Handle is valid ? */
|
||||
extern CPA_EXPORT ACP_tdxBool DNM_fn_bIsMatCharacteristicsValid(DNM_tdxHandleToMecMatCharacteristics _hMatCharacteristics);
|
||||
|
||||
/* Create a handle */
|
||||
extern CPA_EXPORT DNM_tdxHandleToMecMatCharacteristics DNM_fn_xMatCharacteristicsCreate(void);
|
||||
|
||||
/* Destroy a handle */
|
||||
extern CPA_EXPORT void DNM_fn_vMatCharacteristicsDestroy(DNM_tdxHandleToMecMatCharacteristics _hOld);
|
||||
|
||||
/* Copy a handle */
|
||||
extern CPA_EXPORT void DNM_fn_vMatCharacteristicsCopy(DNM_tdxHandleToMecMatCharacteristics _hDst,DNM_tdxHandleToMecMatCharacteristics _hSrc);
|
||||
|
||||
extern CPA_EXPORT MTH_tdxReal DNM_fn_xMatCharacteristicsGetSlide(DNM_tdxHandleToMecMatCharacteristics _hMatCharacteristics);
|
||||
extern CPA_EXPORT MTH_tdxReal DNM_fn_xMatCharacteristicsSetSlide(DNM_tdxHandleToMecMatCharacteristics _hMatCharacteristics,
|
||||
MTH_tdxReal _xValue);
|
||||
|
||||
extern CPA_EXPORT MTH_tdxReal DNM_fn_xMatCharacteristicsGetRebound(DNM_tdxHandleToMecMatCharacteristics _hMatCharacteristics);
|
||||
extern CPA_EXPORT MTH_tdxReal DNM_fn_xMatCharacteristicsSetRebound(DNM_tdxHandleToMecMatCharacteristics _hMatCharacteristics,
|
||||
MTH_tdxReal _xValue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
158
Rayman_X/cpa/public/MEC/macdpid.h
Normal file
158
Rayman_X/cpa/public/MEC/macdpid.h
Normal file
@@ -0,0 +1,158 @@
|
||||
/* Module Allowing the Communication of Datas from the Player or the Intelligence to the Dynamics */
|
||||
|
||||
#ifndef __MACDPID_H__
|
||||
#define __MACDPID_H__
|
||||
|
||||
#include "acp_base.h"
|
||||
#include "mth.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Define the structure stMACDPID */
|
||||
typedef struct stMACDPID
|
||||
{
|
||||
MTH_tdxReal m_xData0;
|
||||
MTH3D_tdstVector m_stData1;
|
||||
MTH3D_tdstVector m_stData2;
|
||||
MTH3D_tdstVector m_stData3;
|
||||
MTH_tdxReal m_xData3;
|
||||
MTH_tdxReal m_xData4;
|
||||
MTH_tdxReal m_xData5;
|
||||
struct
|
||||
{
|
||||
MTH_tdxReal m_xAngle;
|
||||
MTH3D_tdstVector m_stAxis;
|
||||
} m_stData6;
|
||||
struct
|
||||
{
|
||||
MTH_tdxReal m_xAngle;
|
||||
MTH3D_tdstVector m_stAxis;
|
||||
} m_stData7;
|
||||
char m_cData8;
|
||||
unsigned short m_uwData9;
|
||||
MTH3D_tdstVector m_stData10;
|
||||
MTH_tdxReal m_xData11;
|
||||
MTH3D_tdstVector m_stData12;
|
||||
MTH_tdxReal m_xData13;
|
||||
ACP_tdxBool m_bData14;
|
||||
} tdstMACDPID;
|
||||
|
||||
/* For stone dynamics */
|
||||
#define M_xMACDPIDGetStiffness(_p_stMACDPID) M_xMACDPIDGetImpetus(_p_stMACDPID)
|
||||
#define M_xMACDPIDSetStiffness(_p_stMACDPID,_xValue) M_xMACDPIDSetImpetus(_p_stMACDPID,_xValue)
|
||||
#define M_p_stMACDPIDGetCenteredForce(_p_stMACDPID) M_p_stMACDPIDGetTranslation(_p_stMACDPID)
|
||||
#define M_vMACDPIDSetCenteredForce(_p_stMACDPID,_p_stVector) M_vMACDPIDSetTranslation(_p_stMACDPID,_p_stVector)
|
||||
/* End stone dynamics */
|
||||
|
||||
/* For shooting dynamics */
|
||||
#define M_xMACDPIDGetHeight(_p_stMACDPID) M_xMACDPIDGetImpetus(_p_stMACDPID)
|
||||
#define M_xMACDPIDSetHeight(_p_stMACDPID,_xValue) M_xMACDPIDSetImpetus(_p_stMACDPID,_xValue)
|
||||
/* End shooting dynamics */
|
||||
|
||||
#define M_p_stMACDPIDGetTrackingDirection(_p_stMACDPID) (&(_p_stMACDPID)->m_stData3)
|
||||
#define M_vMACDPIDSetTrackingDirection(_p_stMACDPID,_p_stVector) MTH3D_M_vCopyVector(M_p_stMACDPIDGetTrackingDirection(_p_stMACDPID),_p_stVector)
|
||||
|
||||
#define M_p_stMACDPIDGetStartPoint(_p_stMACDPID) (&(_p_stMACDPID)->m_stData1)
|
||||
#define M_vMACDPIDSetStartPoint(_p_stMACDPID,_p_stVector) MTH3D_M_vCopyVector(M_p_stMACDPIDGetStartPoint(_p_stMACDPID),_p_stVector)
|
||||
|
||||
#define M_p_stMACDPIDGetArrivalPoint(_p_stMACDPID) (&(_p_stMACDPID)->m_stData2)
|
||||
#define M_vMACDPIDSetArrivalPoint(_p_stMACDPID,_p_stVector) MTH3D_M_vCopyVector(M_p_stMACDPIDGetArrivalPoint(_p_stMACDPID),_p_stVector)
|
||||
|
||||
#define M_xMACDPIDGetAlphaAngle(_p_stMACDPID) ((_p_stMACDPID)->m_xData11)
|
||||
#define M_xMACDPIDSetAlphaAngle(_p_stMACDPID,_xValue) (M_xMACDPIDGetAlphaAngle(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetThetaAngle(_p_stMACDPID) ((_p_stMACDPID)->m_xData4)
|
||||
#define M_xMACDPIDSetThetaAngle(_p_stMACDPID,_xValue) (M_xMACDPIDGetThetaAngle(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetImpetus(_p_stMACDPID) ((_p_stMACDPID)->m_xData0)
|
||||
#define M_xMACDPIDSetImpetus(_p_stMACDPID,_xValue) (M_xMACDPIDGetImpetus(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetType(_p_stMACDPID) ((_p_stMACDPID)->m_xData4)
|
||||
#define M_xMACDPIDSetType(_p_stMACDPID,_xValue) (M_xMACDPIDGetType(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetDistance(_p_stMACDPID) ((_p_stMACDPID)->m_xData0)
|
||||
#define M_xMACDPIDSetDistance(_p_stMACDPID,_xValue) (M_xMACDPIDGetDistance(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetScalar(_p_stMACDPID) ((_p_stMACDPID)->m_xData0)
|
||||
#define M_xMACDPIDSetScalar(_p_stMACDPID,_xValue) (M_xMACDPIDGetDistance(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetSpeedIntensity(_p_stMACDPID) ((_p_stMACDPID)->m_xData3)
|
||||
#define M_xMACDPIDSetSpeedIntensity(_p_stMACDPID,_xValue) (M_xMACDPIDGetSpeedIntensity(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetCoef(_p_stMACDPID) ((_p_stMACDPID)->m_xData0)
|
||||
#define M_xMACDPIDSetCoef(_p_stMACDPID,_xValue) (M_xMACDPIDGetCoef(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_p_stMACDPIDGetTranslation(_p_stMACDPID) (&(_p_stMACDPID)->m_stData1)
|
||||
#define M_vMACDPIDSetTranslation(_p_stMACDPID,_p_stVector) MTH3D_M_vCopyVector(M_p_stMACDPIDGetTranslation(_p_stMACDPID),_p_stVector)
|
||||
|
||||
#define M_p_stMACDPIDGetSpeed(_p_stMACDPID) (&(_p_stMACDPID)->m_stData2)
|
||||
#define M_vMACDPIDSetSpeed(_p_stMACDPID,_p_stVector) MTH3D_M_vCopyVector(M_p_stMACDPIDGetSpeed(_p_stMACDPID),_p_stVector)
|
||||
|
||||
#define M_xMACDPIDGetEulerAngleI(_p_stMACDPID) ((_p_stMACDPID)->m_xData3)
|
||||
#define M_xMACDPIDSetEulerAngleI(_p_stMACDPID,_xValue) (M_xMACDPIDGetEulerAngleI(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetEulerAngleJ(_p_stMACDPID) ((_p_stMACDPID)->m_xData4)
|
||||
#define M_xMACDPIDSetEulerAngleJ(_p_stMACDPID,_xValue) (M_xMACDPIDGetEulerAngleJ(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetEulerAngleK(_p_stMACDPID) ((_p_stMACDPID)->m_xData5)
|
||||
#define M_xMACDPIDSetEulerAngleK(_p_stMACDPID,_xValue) (M_xMACDPIDGetEulerAngleK(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_xMACDPIDGetOrientationAngle(_p_stMACDPID) ((_p_stMACDPID)->m_stData6.m_xAngle)
|
||||
#define M_p_stMACDPIDGetOrientationAxis(_p_stMACDPID) (&(_p_stMACDPID)->m_stData6.m_stAxis)
|
||||
#define M_vMACDPIDSetOrientation(_p_stMACDPID,_xAngle,_p_stAxis) \
|
||||
(M_xMACDPIDGetOrientationAngle(_p_stMACDPID) = (_xAngle),\
|
||||
memcpy(M_p_stMACDPIDGetOrientationAxis(_p_stMACDPID),_p_stAxis, sizeof(MTH3D_tdstVector)))
|
||||
|
||||
#define M_xMACDPIDGetSpeedAngle(_p_stMACDPID) ((_p_stMACDPID)->m_stData7.m_xAngle)
|
||||
#define M_p_stMACDPIDGetSpeedAxis(_p_stMACDPID) (&(_p_stMACDPID)->m_stData7.m_stAxis)
|
||||
#define M_vMACDPIDSetSpeedOrientation(_p_stMACDPID,_xAngle,_p_stAxis) \
|
||||
(M_xMACDPIDGetSpeedAngle(_p_stMACDPID) = (_xAngle),\
|
||||
memcpy(M_p_stMACDPIDGetSpeedAxis(_p_stMACDPID), _p_stAxis, sizeof(MTH3D_tdstVector)))
|
||||
|
||||
|
||||
#define M_cMACDPIDGetMode(_p_stMACDPID) ((_p_stMACDPID)->m_cData8)
|
||||
#define M_cMACDPIDSetMode(_p_stMACDPID,_ucValue) (M_cMACDPIDGetMode(_p_stMACDPID) = (_ucValue))
|
||||
|
||||
|
||||
/*
|
||||
* Camera
|
||||
*----------------
|
||||
*/
|
||||
#define M_xMACDPIDGetTheta(_p_stMACDPID) ((_p_stMACDPID)->m_xData0)
|
||||
#define M_xMACDPIDSetTheta(_p_stMACDPID,_xValue) (M_xMACDPIDGetImpetus(_p_stMACDPID) = (_xValue))
|
||||
|
||||
#define M_p_stMACDPIDGetTarget(_p_stMACDPID) (&(_p_stMACDPID)->m_stData1)
|
||||
#define M_vMACDPIDSetTarget(_p_stMACDPID,_p_stVector) {MTH3D_M_vCopyVector(M_p_stMACDPIDGetTarget(_p_stMACDPID),_p_stVector)}
|
||||
#define M_xMACDPIDGetTargetSpeed(_p_stMACDPID) ((_p_stMACDPID)->m_stData3.xX)
|
||||
#define M_xMACDPIDGetTargetIncreaseSpeed(_p_stMACDPID) ((_p_stMACDPID)->m_stData3.xY)
|
||||
#define M_xMACDPIDGetTargetDecreaseSpeed(_p_stMACDPID) ((_p_stMACDPID)->m_stData3.xZ)
|
||||
|
||||
#define M_p_stMACDPIDGetMovePos(_p_stMACDPID) (&(_p_stMACDPID)->m_stData2)
|
||||
#define M_xMACDPIDGetLinearSpeed(_p_stMACDPID) ((_p_stMACDPID)->m_stData6.m_stAxis.xX)
|
||||
#define M_xMACDPIDGetLinearIncreaseSpeed(_p_stMACDPID) ((_p_stMACDPID)->m_stData6.m_stAxis.xY)
|
||||
#define M_xMACDPIDGetLinearDecreaseSpeed(_p_stMACDPID) ((_p_stMACDPID)->m_stData6.m_stAxis.xZ)
|
||||
#define M_xMACDPIDGetAngularSpeed(_p_stMACDPID) ((_p_stMACDPID)->m_stData7.m_stAxis.xX)
|
||||
#define M_xMACDPIDGetAngularIncreaseSpeed(_p_stMACDPID) ((_p_stMACDPID)->m_stData7.m_stAxis.xY)
|
||||
#define M_xMACDPIDGetAngularDecreaseSpeed(_p_stMACDPID) ((_p_stMACDPID)->m_stData7.m_stAxis.xZ)
|
||||
|
||||
#define M_uwMACDPIDGetFlags(_p_stMACDPID) ((_p_stMACDPID)->m_uwData9)
|
||||
|
||||
#define M_p_stMACDPIDGetPosReferencePoint(_p_stMACDPID) (&(_p_stMACDPID)->m_stData10)
|
||||
#define M_xMACDPIDGetCutAngleFactorPos(_p_stMACDPID) ((_p_stMACDPID)->m_xData11)
|
||||
#define M_p_stMACDPIDGetRefAxisZ(_p_stMACDPID) (&(_p_stMACDPID)->m_stData12)
|
||||
#define M_xMACDPIDGetCutAngleFactorTgt(_p_stMACDPID) ((_p_stMACDPID)->m_xData13)
|
||||
/*
|
||||
* End for camera
|
||||
*----------------
|
||||
*/
|
||||
|
||||
/* Public clone */
|
||||
#define M_vMACDPIDCopyClone(_p_stDst,_p_stSrc) memcpy(_p_stDst,_p_stSrc,sizeof(tdstMACDPID))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
166
Rayman_X/cpa/public/MEC/mbase.h
Normal file
166
Rayman_X/cpa/public/MEC/mbase.h
Normal file
@@ -0,0 +1,166 @@
|
||||
/*=========================================================================
|
||||
* MBASE.h : MecBaseIdCard's functions
|
||||
*
|
||||
* Version 1.0
|
||||
* Creation date 14/10/97
|
||||
* Revision date
|
||||
*
|
||||
* (c) Ubi Studios 1997
|
||||
*=======================================================================*/
|
||||
|
||||
#if !defined(__MecBaseIdCard_TYPES__)
|
||||
#define __MecBaseIdCard_TYPES__
|
||||
|
||||
#include <string.h>
|
||||
#include "DNMMecId.h"
|
||||
#include "acp_base.h"
|
||||
|
||||
#include "hidcard.h"
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
#define ONLY_TYPES
|
||||
#define _MecBaseIdCard_UNDEF
|
||||
#endif /* ONLY_TYPES */
|
||||
|
||||
#if defined(_MecBaseIdCard_UNDEF)
|
||||
#undef _MecBaseIdCard_UNDEF
|
||||
#undef ONLY_TYPES
|
||||
#endif /* MecBaseIdCard_UNDEF */
|
||||
|
||||
#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 */
|
||||
|
||||
/***************************************/
|
||||
|
||||
/* Bit Field */
|
||||
#define DNM_Card_C_Animation 0x00000001 /* animation speed ? */
|
||||
#define DNM_Card_C_Collide 0x00000002 /* collide with the map ? */
|
||||
#define DNM_Card_C_Gravity 0x00000004 /* gravity on ? */
|
||||
#define DNM_Card_C_Tilt 0x00000008 /* tilt in turn */
|
||||
#define DNM_Card_C_Gi 0x00000010 /* gi */
|
||||
#define DNM_Card_C_OnGround 0x00000020 /* put on ground */
|
||||
#define DNM_Card_C_Climb 0x00000040 /* climb */
|
||||
#define DNM_Card_C_Spider 0x00000080 /* Spider */
|
||||
#define DNM_Card_C_Shoot 0x00000100 /* Shoot */
|
||||
#define DNM_Card_C_CollisionControl 0x00000200 /* use dynamics parameters when collide */
|
||||
#define DNM_Card_C_KeepWallSpeedZ 0x00000400 /* keep z speed when collide a wall */
|
||||
#define DNM_Card_C_SpeedLimit 0x00000800 /* limit speed ? */
|
||||
#define DNM_Card_C_Inertia 0x00001000 /* inertia ? */
|
||||
#define DNM_Card_C_Stream 0x00002000 /* stream ? */
|
||||
#define DNM_Card_C_StickOnPlatform 0x00004000 /* stick on platform ? */
|
||||
#define DNM_Card_C_Scale 0x00008000 /* use scale ? */
|
||||
#define DNM_Card_C_PlatForm 0x00010000 /* Platform ? */
|
||||
#define DNM_Card_C_Swim 0x00020000 /* Swim ? */
|
||||
|
||||
|
||||
|
||||
typedef struct DNM_stMecBaseIdCard
|
||||
{
|
||||
/* Identity */
|
||||
DNM_tdeMechanicsID m_eIdentity;
|
||||
unsigned long ulFlags; /* Bit field */
|
||||
|
||||
MTH_tdxReal m_xGravity; /* gravity factor */
|
||||
MTH_tdxReal m_xSlide; /* slide parameter for collision control */
|
||||
MTH_tdxReal m_xRebound; /* rebound parameter for collision control */
|
||||
MTH_tdxReal m_xSlopeLimit; /* slope limit */
|
||||
MTH_tdxReal m_xInertiaX; /* x inertia */
|
||||
MTH_tdxReal m_xInertiaY; /* y inertia */
|
||||
MTH_tdxReal m_xInertiaZ; /* z inertia */
|
||||
MTH_tdxReal m_xTiltIntensity; /* tilt intensity */
|
||||
MTH_tdxReal m_xTiltInertia; /* tilt inertia ( 0-1 ) */
|
||||
MTH_tdxReal m_xTiltOrigin; /* tilt rotation origin on Z axis */
|
||||
MTH3D_tdstVector m_stMaxSpeed; /* max speed limit */
|
||||
} DNM_tdstMecBaseIdCard;
|
||||
|
||||
|
||||
/* Put here all macro-accessors */
|
||||
#define DNM_M_eBaseIdCardGetIdentity(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_eIdentity)
|
||||
#define DNM_M_bBaseIdCardIsAnimation(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Animation ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsPlatform(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Platform ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsCollide(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Collide ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsGravity(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Gravity ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsTilt(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Tilt ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsGi(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Gi ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsOnGround(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_OnGround ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsClimb(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Climb ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsSpider(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Spider ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsShoot(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Shoot ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsCollisionControl(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_CollisionControl ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsKeepWallSpeedZ(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_KeepWallSpeedZ ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsSpeedLimit(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_SpeedLimit ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsInertia(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Inertia ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsStream(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Stream ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsStickOnPlatform(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_StickOnPlatform ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsScale(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Scale ? TRUE : FALSE)
|
||||
#define DNM_M_bBaseIdCardIsSwim(_p_stBaseIdCard) ((_p_stBaseIdCard)->ulFlags & DNM_Card_C_Swim ? TRUE : FALSE)
|
||||
|
||||
#define DNM_M_xBaseIdCardGetGravityFactor(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xGravity)
|
||||
#define DNM_M_xBaseIdCardGetSlide(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xSlide)
|
||||
#define DNM_M_xBaseIdCardGetRebound(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xRebound)
|
||||
#define DNM_M_xBaseIdCardGetSlopeLimit(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xSlopeLimit)
|
||||
#define DNM_M_xBaseIdCardGetInertiaFactorX(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xInertiaX)
|
||||
#define DNM_M_xBaseIdCardGetInertiaFactorY(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xInertiaY)
|
||||
#define DNM_M_xBaseIdCardGetInertiaFactorZ(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xInertiaZ)
|
||||
#define DNM_M_xBaseIdCardGetTiltIntensity(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xTiltIntensity)
|
||||
#define DNM_M_xBaseIdCardGetTiltInertia(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xTiltInertia)
|
||||
#define DNM_M_xBaseIdCardGetTiltOrigin(_p_stBaseIdCard) ((_p_stBaseIdCard)->m_xTiltOrigin)
|
||||
#define DNM_M_pBaseIdCardGetMaxSpeed(_p_stBaseIdCard) (&(_p_stBaseIdCard)->m_stMaxSpeed)
|
||||
|
||||
|
||||
#define DNM_M_vBaseIdCardSetAnimation(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Animation) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Animation)))
|
||||
#define DNM_M_vBaseIdCardSetPlatform(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Platform) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Platform)))
|
||||
#define DNM_M_vBaseIdCardSetCollide(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Collide) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Collide)))
|
||||
#define DNM_M_vBaseIdCardSetGravity(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Gravity) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Gravity)))
|
||||
#define DNM_M_vBaseIdCardSetTilt(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Tilt) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Tilt)))
|
||||
#define DNM_M_vBaseIdCardSetGi(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Gi) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Gi)))
|
||||
#define DNM_M_vBaseIdCardSetOnGround(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_OnGround) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_OnGround)))
|
||||
#define DNM_M_vBaseIdCardSetClimb(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Climb) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Climb)))
|
||||
#define DNM_M_vBaseIdCardSetSpider(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Spider) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Spider)))
|
||||
#define DNM_M_vBaseIdCardSetShoot(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Shoot) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Shoot)))
|
||||
#define DNM_M_vBaseIdCardSetCollisionControl(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_CollisionControl) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_CollisionControl)))
|
||||
#define DNM_M_vBaseIdCardSetKeepWallSpeedZ(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_KeepWallSpeedZ) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_KeepWallSpeedZ)))
|
||||
#define DNM_M_vBaseIdCardSetSpeedLimit(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_SpeedLimit) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_SpeedLimit)))
|
||||
#define DNM_M_vBaseIdCardSetInertia(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Inertia) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Inertia)))
|
||||
#define DNM_M_vBaseIdCardSetStream(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Stream) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Stream)))
|
||||
#define DNM_M_vBaseIdCardSetStickOnPlatform(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_StickOnPlatform) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_StickOnPlatform)))
|
||||
#define DNM_M_vBaseIdCardSetScale(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Scale) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Scale)))
|
||||
#define DNM_M_vBaseIdCardSetSwim(_p_stBaseIdCard,_bValue) ((_p_stBaseIdCard)->ulFlags = ((_bValue) ? ((_p_stBaseIdCard)->ulFlags |= DNM_Card_C_Swim) : ((_p_stBaseIdCard)->ulFlags &= ~DNM_Card_C_Swim)))
|
||||
|
||||
|
||||
#define DNM_M_vBaseIdCardSetGravityFactor(_p_stBaseIdCard,xGravity) ((_p_stBaseIdCard)->m_xGravity = xGravity)
|
||||
#define DNM_M_vBaseIdCardSetSlide(_p_stBaseIdCard,xSlide) ((_p_stBaseIdCard)->m_xSlide = xSlide)
|
||||
#define DNM_M_vBaseIdCardSetRebound(_p_stBaseIdCard,xRebound) ((_p_stBaseIdCard)->m_xRebound = xRebound)
|
||||
#define DNM_M_vBaseIdCardSetSlopeLimit(_p_stBaseIdCard,xSlopeLimit) ((_p_stBaseIdCard)->m_xSlopeLimit = xSlopeLimit)
|
||||
#define DNM_M_vBaseIdCardSetInertiaFactorX(_p_stBaseIdCard,xInertiaX) ((_p_stBaseIdCard)->m_xInertiaX = xInertiaX)
|
||||
#define DNM_M_vBaseIdCardSetInertiaFactorY(_p_stBaseIdCard,xInertiaY) ((_p_stBaseIdCard)->m_xInertiaY = xInertiaY)
|
||||
#define DNM_M_vBaseIdCardSetInertiaFactorZ(_p_stBaseIdCard,xInertiaZ) ((_p_stBaseIdCard)->m_xInertiaZ = xInertiaZ)
|
||||
#define DNM_M_vBaseIdCardSetTiltIntensity(_p_stBaseIdCard,xTiltIntensity) ((_p_stBaseIdCard)->m_xTiltIntensity = xTiltIntensity)
|
||||
#define DNM_M_vBaseIdCardSetTiltInertia(_p_stBaseIdCard,xTiltInertia) ((_p_stBaseIdCard)->m_xTiltInertia = xTiltInertia)
|
||||
#define DNM_M_vBaseIdCardSetTiltOrigin(_p_stBaseIdCard,xTiltOrigin) ((_p_stBaseIdCard)->m_xTiltOrigin = xTiltOrigin)
|
||||
#define DNM_M_vBaseIdCardSetMaxSpeed(_p_stBaseIdCard,pstSpeedLimit) MTH3D_M_vCopyVector ( DNM_M_pBaseIdCardGetMaxSpeed(_p_stBaseIdCard), pstSpeedLimit )
|
||||
|
||||
|
||||
/* Private */
|
||||
#define DNM_M_eBaseIdCardSetIdentity(_p_stBaseIdCard,_eValue) (DNM_M_eBaseIdCardGetIdentity(_p_stBaseIdCard) = _eValue)
|
||||
|
||||
/* Give handle a semantic */
|
||||
DNM_tdstMecBaseIdCard *DNM_fn_p_stMecBaseIdCardGiveBackSemantic(DNM_tdxHandleToMecIdentityCard _hBaseIdCard);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__MecBaseIdCard_TYPES__ */
|
Reference in New Issue
Block a user