Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
/*
MODULE : PRT (Particle system Library)
AUTHOR : Frederic PHILIPPE
UBI R&D
FILE : PRT.h (Principal header file)
*/
#ifndef D_THROW_PRT
#ifndef PRT_POINTPRT_H
#define PRT_POINTPRT_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cpa_expt.h"
/* For Global declaration in C files : */
#ifdef PRT_GLOBALS
#define PRT_EXTERN extern
#else /* !PRT_GLOBALS */
#define PRT_EXTERN
#endif /* !PRT_GLOBALS */
/*
-----------------------------------------------------------------------------
INCLUDES FILES
-----------------------------------------------------------------------------
*/
#include "PrtSyst.h"
#include "PrtSrc.h"
#include "PrtEnv.h"
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
TYPES DEFINITION
-----------------------------------------------------------------------------
*/
/* bubble structure */
typedef struct PRT_tdstPointParticle_
{
MTH_tdxReal xBirthDate;
}
PRT_tdstPointParticle;
typedef struct PRT_tdstPointCommonData_
{
GMT_tdxHandleToGameMaterial hMaterial;
}
PRT_tdstPointCommonData;
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
FUNCTIONS DECLARATION
-----------------------------------------------------------------------------
*/
extern CPA_EXPORT void PRT_fn_vCreatePointParticles ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
GMT_tdxHandleToGameMaterial _hMaterial );
extern CPA_EXPORT void PRT_fn_vDestructPointParticles ( PRT_tdstParticlesSystem *_p_stParticlesSystem );
extern CPA_EXPORT void PRT_fn_vSetGameMaterialPointParticles ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
GMT_tdxHandleToGameMaterial _hGameMaterial );
extern CPA_EXPORT void PRT_fn_vGeneratePointParticle ( MTH3D_tdstVector *_p_stParticlePosition,
MTH3D_tdstVector *_p_stParticleSpeed,
PRT_tdstPointParticle *_p_stPointParticle,
PRT_tdstPointCommonData *_p_stPointCommonData,
PRT_tdstParticlesSource *_p_stParticlesSource,
struct POS_stCompletePosition *_p_stSourceMatrix,
MTH_tdxReal _xTimeT );
extern CPA_EXPORT void PRT_fn_vMecaPointParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
PRT_tdstParticlesEnvironment *_p_stParticlesEnvironment,
MTH_tdxReal _xTimeT,
MTH_tdxReal _xDeltaT );
extern CPA_EXPORT void PRT_fn_vSourceGeneratePointParticle ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
PRT_tdstParticlesSource *_p_stParticlesSource,
struct POS_stCompletePosition *_p_stSourceMatrix,
MTH_tdxReal _xTimeT );
extern CPA_EXPORT void PRT_fn_vPreDrawPointParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem );
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* PRT_POINTPRT_H */
#endif /* D_THROW_PRT */

View File

@@ -0,0 +1,109 @@
/*
MODULE : PRT (Particle system Library)
AUTHOR : Frederic PHILIPPE
UBI R&D
FILE : PRT.h (Principal header file)
*/
#ifndef D_THROW_PRT
#ifndef PRT_PRTENV_H
#define PRT_PRTENV_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cpa_expt.h"
/* For Global declaration in C files : */
#ifdef PRT_GLOBALS
#define PRT_EXTERN extern
#else /* !PRT_GLOBALS */
#define PRT_EXTERN
#endif /* !PRT_GLOBALS */
/*
-----------------------------------------------------------------------------
INCLUDES FILES
-----------------------------------------------------------------------------
*/
/*#include "Futil.h"*/
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION
-----------------------------------------------------------------------------
*/
#define PRT_C_ulAlignedBoxEnv 0x00000000
#define PRT_C_ulSphereEnv 0x00000001
/*
-----------------------------------------------------------------------------
TYPES DEFINITION
-----------------------------------------------------------------------------
*/
/* source particules structure */
typedef struct PRT_tdstParticlesEnvironment_
{
unsigned long ulEnvType;
MTH3D_tdstVector stMinPoint;
MTH3D_tdstVector stMaxPoint;
MTH3D_tdstVector stSphereCenter;
MTH_tdxReal xRadius;
MTH3D_tdstVector stAcceleration;
MTH_tdxReal xAccelerationRange;
}
PRT_tdstParticlesEnvironment;
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
FUNCTIONS DECLARATION
-----------------------------------------------------------------------------
*/
#define PRT_M_vCopyParticlesEnvironment( _p_stDstParticlesEnvironment, _p_stSrcParticlesEnvironment )\
memcpy ( _p_stDstParticlesEnvironment, _p_stSrcParticlesEnvironment, sizeof ( PRT_tdstParticlesEnvironment ) )
#define PRT_M_vSetTypeParticlesEnvironment( _p_stParticlesEnvironment, _ulEnvType )\
( (_p_stParticlesEnvironment)->ulEnvType = ( _ulEnvType ) )
#define PRT_M_vSetMinMaxPointParticlesEnvironment( _p_stParticlesEnvironment, _p_stMinPoint, _p_stMaxPoint )\
{\
MTH3D_M_vCopyVector ( &((_p_stParticlesEnvironment)->stMinPoint), ( _p_stMinPoint ) );\
MTH3D_M_vCopyVector ( &((_p_stParticlesEnvironment)->stMaxPoint), ( _p_stMaxPoint ) );\
}
#define PRT_M_vSetSphereParticlesEnvironment( _p_stParticlesEnvironment, _p_stSphereCenter, _xRadius )\
{\
MTH3D_M_vCopyVector ( &((_p_stParticlesEnvironment)->stSphereCenter), ( _p_stSphereCenter ) );\
(_p_stParticlesEnvironment)->xRadius = ( _xRadius );\
}
#define PRT_M_vSetAccelerationParticlesEnvironment( _p_stParticlesEnvironment, _p_stAcceleration )\
{\
MTH3D_M_vCopyVector ( &((_p_stParticlesEnvironment)->stAcceleration), ( _p_stAcceleration ) );\
}
#define PRT_M_vSetAccelerationRangeParticlesEnvironment( _p_stParticlesEnvironment, _xAccelerationRange )\
( (_p_stParticlesEnvironment)->xAccelerationRange = ( _xAccelerationRange ) )
extern CPA_EXPORT void PRT_fn_vCreateParticlesEnvironment ( PRT_tdstParticlesEnvironment **_p_pstParticlesEnvironment );
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* PRT_PRTENV_H */
#endif /* D_THROW_PRT */

View File

@@ -0,0 +1,104 @@
/*
MODULE : PRT (Particle system Library)
AUTHOR : Frederic PHILIPPE
UBI R&D
FILE : PRT.h (Principal header file)
*/
#ifndef D_THROW_PRT
#ifndef PRT_PRTMECA_H
#define PRT_PRTMECA_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cpa_expt.h"
/* For Global declaration in C files : */
#ifdef PRT_GLOBALS
#define PRT_EXTERN extern
#else /* !PRT_GLOBALS */
#define PRT_EXTERN
#endif /* !PRT_GLOBALS */
/*
-----------------------------------------------------------------------------
INCLUDES FILES
-----------------------------------------------------------------------------
*/
#include "PrtSyst.h"
#include "PrtSrc.h"
#include "PrtEnv.h"
#include "PointPrt.h"
#include "SegmtPrt.h"
#include "SprtPrt.h"
#define D_MSPrtSrc_StructureDefine
#include "Gam\Actions\MsPrtSrc.h"
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
TYPES DEFINITION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
FUNCTIONS DECLARATION
-----------------------------------------------------------------------------
*/
extern CPA_EXPORT void PRT_fn_vDestructParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem );
extern CPA_EXPORT void PRT_fn_vCopyCloneParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystemDst,
PRT_tdstParticlesSystem *_p_stParticlesSystemSrc );
/*
extern CPA_EXPORT void PRT_fn_vMecaParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
PRT_tdstParticlesEnvironment *_p_stParticlesEnvironment,
MTH_tdxReal _xTimeT,
MTH_tdxReal _xDeltaT );
*/
extern CPA_EXPORT void PRT_fn_vMecaParticlesSystem
(
tdstParticleGenerator *_p_stPrtGen,
MTH_tdxReal _xTimeT,
MTH_tdxReal _xDeltaT
);
extern CPA_EXPORT void PRT_fn_vSourceGenerateParticle
(
PRT_tdstParticlesSystem *_p_stParticlesSystem,
PRT_tdstParticlesSource *_p_stParticlesSource,
struct POS_stCompletePosition *_p_stSourceMatrix,
MTH_tdxReal _xTimeT
);
/*extern CPA_EXPORT void PRT_fn_vPreDrawParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem );*/
extern CPA_EXPORT void PRT_fn_vPreDrawParticlesSystem ( tdstParticleGenerator *_p_stPrtGen );
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* PRT_PRTMECA_H */
#endif /* D_THROW_PRT */

View File

@@ -0,0 +1,203 @@
/*
MODULE : PRT (Particle system Library)
AUTHOR : Frederic PHILIPPE
UBI R&D
FILE : PRT.h (Principal header file)
*/
#ifndef D_THROW_PRT
#ifndef PRT_PRTSRC_H
#define PRT_PRTSRC_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cpa_expt.h"
/* For Global declaration in C files : */
#ifdef PRT_GLOBALS
#define PRT_EXTERN extern
#else /* !PRT_GLOBALS */
#define PRT_EXTERN
#endif /* !PRT_GLOBALS */
/*
-----------------------------------------------------------------------------
INCLUDES FILES
-----------------------------------------------------------------------------
*/
/*#include "Futil.h"*/
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION
-----------------------------------------------------------------------------
*/
#define PRT_C_ucNoGeneration 0
#define PRT_C_ucContinousGeneration 1
#define PRT_C_ucProbabilistGeneration 2
#define PRT_C_ucCrenelGeneration 3
#define PRT_C_ucConstantNb 0
#define PRT_C_ucProbabilistNb 1
#define PRT_C_ucPoint 0
#define PRT_C_ucQuad 1
#define PRT_C_ucParallelepipede 2
#define PRT_C_ucRotationLink 0
#define PRT_C_ucTranslationLink 1
#define PRT_C_ucRotAndTransLink 2
#define PRT_C_ucNoLifeTime 0
#define PRT_C_ucConstantLifeTime 1
#define PRT_C_ucProbabilistLifeTime 2
/*
-----------------------------------------------------------------------------
TYPES DEFINITION
-----------------------------------------------------------------------------
*/
/* source particules structure */
typedef struct PRT_tdstParticlesSource_
{
/* parametres de generation */
unsigned char ucGenerationMode;
MTH_tdxReal xGenerationProbability;
ACP_tdxIndex xNbFramesNoGeneration;
ACP_tdxIndex xNbFramesTotal;
ACP_tdxIndex xFramesCounter;
unsigned char ucNbParticlesToGenerateMode;
ACP_tdxIndex xNbParticlesToGenerate;
ACP_tdxIndex xNbMin;
ACP_tdxIndex xNbMax;
/* parametres geometriques */
/* source parallelelogramme */
/* 3_____________ */
/* N_ |\__ | */
/* / \ | \__ | */
/* |*| | \__ | */
/* \_/ | \__ | */
/* 1|____________\2 */
/* */
unsigned char ucGeometryMode;
unsigned char ucLinkMode;
MTH3D_tdstVector stVertex1;
MTH3D_tdstVector stVertex2;
MTH3D_tdstVector stVertex3;
MTH3D_tdstVector stNormal;
MTH3D_tdstVector stVertex4;
/* vitesse initiale */
MTH_tdxReal xSpeed;
MTH_tdxReal xSpeedRange;
unsigned char ucLifeMode;
MTH_tdxReal xMinTime;
MTH_tdxReal xMaxTime;
}
PRT_tdstParticlesSource;
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION
-----------------------------------------------------------------------------
*/
extern MTH_tdxReal PRT_g_xNbParticlesFactor;
/*
-----------------------------------------------------------------------------
FUNCTIONS DECLARATION
-----------------------------------------------------------------------------
*/
#define PRT_M_vCopyCloneParticlesSource( _p_stDstParticlesSource, _p_stSrcParticlesSource )\
memcpy ( _p_stDstParticlesSource, _p_stSrcParticlesSource, sizeof ( PRT_tdstParticlesSource ) )
#define PRT_M_vSetGenerationModeParticlesSource( _p_stParticlesSource, _ucGenerationMode )\
( (_p_stParticlesSource)->ucGenerationMode = ( _ucGenerationMode ) )
#define PRT_M_vSetGenerationProbabilityParticlesSource( _p_stParticlesSource, _xGenerationProbability )\
( (_p_stParticlesSource)->xGenerationProbability = ( _xGenerationProbability ) )
#define PRT_M_vSetNbFramesCrenelParticlesSource( _p_stParticlesSource, _xNbFramesNoGeneration, _xNbFramesGeneration )\
{\
(_p_stParticlesSource)->xNbFramesNoGeneration = (ACP_tdxIndex) ( _xNbFramesNoGeneration );\
(_p_stParticlesSource)->xNbFramesTotal = (ACP_tdxIndex) (( _xNbFramesNoGeneration ) + ( _xNbFramesGeneration ));\
(_p_stParticlesSource)->xFramesCounter = 0;\
}
#define PRT_M_vSetNbParticlesToGenerateModeParticlesSource( _p_stParticlesSource, _ucNbParticlesToGenerateMode )\
( (_p_stParticlesSource)->ucNbParticlesToGenerateMode = ( _ucNbParticlesToGenerateMode ) )
#define PRT_M_vSetNbParticlesToGenerateParticlesSource( _p_stParticlesSource, _xNbParticlesToGenerate )\
( (_p_stParticlesSource)->xNbParticlesToGenerate = ( _xNbParticlesToGenerate ) )
#define PRT_M_vSetFlowParticlesSource( _p_stParticlesSource, _xFlow, _xDeltaT )\
( (_p_stParticlesSource)->xNbParticlesToGenerate = MTH_M_xRealToLong ( MTH_M_xMul ( ( _xFlow ), ( _xDeltaT ) ) ) )
#define PRT_M_vSetNbMinMaxParticlesSource( _p_stParticlesSource, _xNbMin, _xNbMax )\
{\
(_p_stParticlesSource)->xNbMin = ( _xNbMin );\
(_p_stParticlesSource)->xNbMax = ( _xNbMax );\
}
#define PRT_M_vSetGeometryModeParticlesSource( _p_stParticlesSource, _ucGeometryMode )\
( (_p_stParticlesSource)->ucGeometryMode = ( _ucGeometryMode ) )
#define PRT_M_vSetLinkModeParticlesSource( _p_stParticlesSource, _ucLinkMode )\
( (_p_stParticlesSource)->ucLinkMode = ( _ucLinkMode ) )
#define PRT_M_vSetSpeedParticlesSource( _p_stParticlesSource, _xSpeed )\
( (_p_stParticlesSource)->xSpeed = ( _xSpeed ) )
#define PRT_M_vSetVertex4ParticlesSource( _p_stParticlesSource, _p_stVertex4 )\
{\
MTH3D_M_vCopyVector ( &((_p_stParticlesSource)->stVertex4), ( _p_stVertex4 ) );\
}
#define PRT_M_vSetSpeedRangeParticlesSource( _p_stParticlesSource, _xSpeedRange )\
( (_p_stParticlesSource)->xSpeedRange = ( _xSpeedRange ) )
#define PRT_M_vSetLifeModeParticlesSource( _p_stParticlesSource, _ucLifeMode )\
( (_p_stParticlesSource)->ucLifeMode = ( _ucLifeMode ) )
#define PRT_M_vSetLifeTimeParticlesSource( _p_stParticlesSource, _xLifeTime )\
( (_p_stParticlesSource)->xMinTime = ( _xLifeTime ) )
#define PRT_M_vSetMinMaxLifeTimeParticlesSource( _p_stParticlesSource, _xMinTime, _xMaxTime )\
{\
(_p_stParticlesSource)->xMinTime = ( _xMinTime );\
(_p_stParticlesSource)->xMaxTime = ( _xMaxTime );\
}
extern CPA_EXPORT void PRT_fn_vCreateParticlesSource ( PRT_tdstParticlesSource **_p_pstParticlesSource );
extern CPA_EXPORT void PRT_fn_vDestructParticlesSource ( PRT_tdstParticlesSource *_p_stParticlesSource );
extern CPA_EXPORT void PRT_fn_vSetQuadParticlesSource ( PRT_tdstParticlesSource *_p_stParticlesSource,
MTH3D_tdstVector *_p_stVertex1,
MTH3D_tdstVector *_p_stVertex2,
MTH3D_tdstVector *_p_stVertex3 );
extern CPA_EXPORT void PRT_fn_vSetPointParticlesSource ( PRT_tdstParticlesSource *_p_stParticlesSource, MTH3D_tdstVector *_p_stVertex );
extern CPA_EXPORT ACP_tdxBool PRT_fn_bComputeParticlesGeneration ( PRT_tdstParticlesSource *_p_stParticlesSource );
extern CPA_EXPORT ACP_tdxIndex PRT_fn_xComputeNbParticlesToInject ( PRT_tdstParticlesSource *_p_stParticlesSource );
extern CPA_EXPORT void PRT_fn_vSetNbParticlesFactor ( MTH_tdxReal _xNbParticlesFactor );
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* PRT_PRTSRC_H */
#endif /* D_THROW_PRT */

View File

@@ -0,0 +1,94 @@
/*
MODULE : PRT (Particle system Library)
AUTHOR : Frederic PHILIPPE
UBI R&D
FILE : PRT.h (Principal header file)
*/
#ifndef D_THROW_PRT
#ifndef PRT_PRTSYST_H
#define PRT_PRTSYST_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cpa_expt.h"
/* For Global declaration in C files : */
#ifdef PRT_GLOBALS
#define PRT_EXTERN extern
#else /* !PRT_GLOBALS */
#define PRT_EXTERN
#endif /* !PRT_GLOBALS */
/*
-----------------------------------------------------------------------------
INCLUDES FILES
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION
-----------------------------------------------------------------------------
*/
#define PRT_C_xNullParticles 0
#define PRT_C_xBubbleParticles 1
#define PRT_C_xPointParticles 2
#define PRT_C_xSegmentParticles 3
#define PRT_C_xSpriteParticles 4
#define PRT_C_xTriangleParticles 5
#define PRT_C_xRectangleParticles 6
/*
-----------------------------------------------------------------------------
TYPES DEFINITION
-----------------------------------------------------------------------------
*/
/* element particules structure */
typedef struct PRT_tdstParticlesSystem_
{
ACP_tdxIndex xNbParticles;
ACP_tdxIndex xNbActiveParticles;
MTH3D_tdstVector *d_stSpeed;
ACP_tdxHandleOfObject hParticlesSystemObject;
ACP_tdxIndex xParticlesType;
void *d_stListOfParticles;
void *p_stCommonData;
}
PRT_tdstParticlesSystem;
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
FUNCTIONS DECLARATION
-----------------------------------------------------------------------------
*/
#define PRT_M_vCopyParticlesSystem( _p_stDstParticlesSystem, _p_stSrcParticlesSystem )\
memcpy ( _p_stDstParticlesSystem, _p_stSrcParticlesSystem, sizeof ( PRT_tdstParticlesSystem ) )
extern CPA_EXPORT void PRT_fn_vCreateParticlesSystem ( PRT_tdstParticlesSystem **_p_pstParticlesSystem,
ACP_tdxIndex _xNbParticles );
extern CPA_EXPORT void PRT_fn_vInitParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem );
extern CPA_EXPORT void PRT_fn_vSetObjectParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
ACP_tdxHandleOfObject _hParticlesSystemObject );
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* PRT_PRTSYST_H */
#endif /* D_THROW_PRT */

View File

@@ -0,0 +1,115 @@
/*
MODULE : PRT (Particle system Library)
AUTHOR : Frederic PHILIPPE
UBI R&D
FILE : PRT.h (Principal header file)
*/
#ifndef D_THROW_PRT
#ifndef PRT_SEGMTPRT_H
#define PRT_SEGMTPRT_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cpa_expt.h"
/* For Global declaration in C files : */
#ifdef PRT_GLOBALS
#define PRT_EXTERN extern
#else /* !PRT_GLOBALS */
#define PRT_EXTERN
#endif /* !PRT_GLOBALS */
/*
-----------------------------------------------------------------------------
INCLUDES FILES
-----------------------------------------------------------------------------
*/
#include "PrtSyst.h"
#include "PrtSrc.h"
#include "PrtEnv.h"
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
TYPES DEFINITION
-----------------------------------------------------------------------------
*/
/* bubble structure */
typedef struct PRT_tdstSegmentParticle_
{
MTH_tdxReal xDeathDate;
GEO_tdstColor stPointColor;
GEO_tdstColor stLastPointColor;
}
PRT_tdstSegmentParticle;
typedef struct PRT_tdstSegmentCommonData_
{
GMT_tdxHandleToGameMaterial hMaterial;
GEO_tdstColor stPointColor;
GEO_tdstColor stLastPointColor;
}
PRT_tdstSegmentCommonData;
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
FUNCTIONS DECLARATION
-----------------------------------------------------------------------------
*/
extern CPA_EXPORT void PRT_fn_vCreateSegmentParticles ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
GMT_tdxHandleToGameMaterial _hMaterial );
extern CPA_EXPORT void PRT_fn_vDestructSegmentParticles ( PRT_tdstParticlesSystem *_p_stParticlesSystem );
extern CPA_EXPORT void PRT_fn_vSetGameMaterialSegmentParticles ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
GMT_tdxHandleToGameMaterial _hGameMaterial );
extern CPA_EXPORT void PRT_fn_vSetPointColorSegmentParticles ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
GEO_tdstColor *_p_stColor );
extern CPA_EXPORT void PRT_fn_vSetLastPointColorSegmentParticles ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
GEO_tdstColor *_p_stColor );
extern CPA_EXPORT void PRT_fn_vGenerateSegmentParticle ( MTH3D_tdstVector *_p_stParticlePosition,
MTH3D_tdstVector *_p_stParticleSpeed,
PRT_tdstSegmentParticle *_p_stSegmentParticle,
PRT_tdstSegmentCommonData *_p_stSegmentCommonData,
PRT_tdstParticlesSource *_p_stParticlesSource,
struct POS_stCompletePosition *_p_stSourceMatrix,
MTH_tdxReal _xTimeT );
extern CPA_EXPORT void PRT_fn_vMecaSegmentParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
PRT_tdstParticlesEnvironment *_p_stParticlesEnvironment,
MTH_tdxReal _xTimeT,
MTH_tdxReal _xDeltaT );
extern CPA_EXPORT void PRT_fn_vSourceGenerateSegmentParticle ( PRT_tdstParticlesSystem *_p_stParticlesSystem,
PRT_tdstParticlesSource *_p_stParticlesSource,
struct POS_stCompletePosition *_p_stSourceMatrix,
MTH_tdxReal _xTimeT );
extern CPA_EXPORT void PRT_fn_vPreDrawSegmentParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem );
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* PRT_SEGMTPRT_H */
#endif /* D_THROW_PRT */

View File

@@ -0,0 +1,130 @@
/*
MODULE : PRT (Particle system Library)
AUTHOR : Frederic PHILIPPE
UBI R&D
FILE : PRT.h (Principal header file)
*/
#ifndef D_THROW_PRT
#ifndef PRT_SPRTPRT_H
#define PRT_SPRTPRT_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cpa_expt.h"
/* For Global declaration in C files : */
#ifdef PRT_GLOBALS
#define PRT_EXTERN extern
#else /* !PRT_GLOBALS */
#define PRT_EXTERN
#endif /* !PRT_GLOBALS */
/*
-----------------------------------------------------------------------------
INCLUDES FILES
-----------------------------------------------------------------------------
*/
#include "PrtSyst.h"
#include "PrtSrc.h"
#include "PrtEnv.h"
#define D_MSPrtSrc_StructureDefine
#include "Gam\Actions\MsPrtSrc.h"
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
TYPES DEFINITION
-----------------------------------------------------------------------------
*/
/* bubble structure */
typedef struct PRT_tdstSpriteParticle_
{
MTH_tdxReal xDeathDate;
MTH_tdxReal xChangeSpriteDate;
char cNextSpriteIndex;
MTH2D_tdstVector stSize;
char a2_cRotateSpeed[2];
unsigned char a2_ucRotateAngle[2];
} PRT_tdstSpriteParticle;
typedef struct PRT_tdstSpriteData_
{
ACP_tdxHandleOfSprite hSprite;
MTH_tdxReal xTime;
char cProba;
char cNextSprite;
} PRT_tdstSpriteData;
typedef struct PRT_tdstSpriteCommonData_
{
ACP_tdxIndex xNumberOfSprites;
/*ACP_tdxHandleOfSprite *d_hSprite;*/
PRT_tdstSpriteData *d_stSpriteData;
ACP_tdxHandleOfSprite hSprite;
GMT_tdxHandleToGameMaterial hMaterial;
}
PRT_tdstSpriteCommonData;
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
FUNCTIONS DECLARATION
-----------------------------------------------------------------------------
*/
extern CPA_EXPORT void PRT_fn_vCreateSpriteParticles( PRT_tdstParticlesSystem *_p_stParticlesSystem, ACP_tdxHandleOfSprite _hSprite );
extern CPA_EXPORT void PRT_fn_vDestructSpriteParticles( PRT_tdstParticlesSystem *_p_stParticlesSystem );
extern CPA_EXPORT void PRT_fn_vSetGameMaterialSpriteParticles ( PRT_tdstParticlesSystem *_p_stParticlesSystem, GMT_tdxHandleToGameMaterial _hGameMaterial );
extern CPA_EXPORT void PRT_fn_vGenerateSpriteParticle
(
MTH3D_tdstVector *_p_stParticlePosition,
MTH3D_tdstVector *_p_stParticleSpeed,
PRT_tdstSpriteParticle *_p_stSpriteParticle,
PRT_tdstSpriteCommonData *_p_stSpriteCommonData,
PRT_tdstParticlesSource *_p_stParticlesSource,
struct POS_stCompletePosition *_p_stSourceMatrix,
MTH_tdxReal _xTimeT
);
extern CPA_EXPORT void PRT_fn_vMecaSpriteParticlesSystem ( tdstParticleGenerator *_p_stPrtGen,MTH_tdxReal _xTimeT,MTH_tdxReal _xDeltaT );
extern CPA_EXPORT void PRT_fn_vSourceGenerateSpriteParticle
(
PRT_tdstParticlesSystem *_p_stParticlesSystem,
PRT_tdstParticlesSource *_p_stParticlesSource,
struct POS_stCompletePosition *_p_stSourceMatrix,
MTH_tdxReal _xTimeT
);
extern CPA_EXPORT void PRT_fn_vPreDrawSpriteParticlesSystem ( PRT_tdstParticlesSystem *_p_stParticlesSystem );
/*ANNECY VL PRT 30/03/98{*/
extern CPA_EXPORT void PRT_fn_vCreateMultipleSpritesParticles( PRT_tdstParticlesSystem *_p_stPrtSys, ACP_tdxIndex _xNbSprites );
extern CPA_EXPORT void PRT_fn_vEndCreateMultipleSpritesParticles( PRT_tdstParticlesSystem *_p_stPrtSys );
extern CPA_EXPORT char PRT_fn_cSystemIsMultipleSprites( PRT_tdstParticlesSystem *_p_stPrtSys );
extern CPA_EXPORT void PRT_fn_vAddSprite( PRT_tdstParticlesSystem *_p_stPrtSys, ACP_tdxHandleOfSprite _hSprite );
/*ENDANNECY VL}*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* PRT_SPRTPRT_H */
#endif /* D_THROW_PRT */