00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00043 #ifndef _orxFX_H_
00044 #define _orxFX_H_
00045
00046
00047 #include "orxInclude.h"
00048 #include "math/orxVector.h"
00049 #include "object/orxObject.h"
00050
00051
00054 #define orxFX_SLOT_KU32_FLAG_ABSOLUTE 0x00000100
00055 #define orxFX_SLOT_KU32_FLAG_USE_ROTATION 0x00000200
00056 #define orxFX_SLOT_KU32_FLAG_USE_SCALE 0x00000400
00061 typedef enum __orxFX_CURVE_t
00062 {
00063 orxFX_CURVE_LINEAR = 0,
00064 orxFX_CURVE_SMOOTH,
00065 orxFX_CURVE_TRIANGLE,
00066 orxFX_CURVE_SINE,
00067 orxFX_CURVE_SQUARE,
00068
00069 orxFX_CURVE_NUMBER,
00070
00071 orxFX_CURVE_NONE = orxENUM_NONE
00072
00073 } orxFX_CURVE;
00074
00075
00078 typedef struct __orxFX_t orxFX;
00079
00080
00083 typedef enum __orxFX_EVENT_t
00084 {
00085 orxFX_EVENT_START = 0,
00086 orxFX_EVENT_STOP,
00087 orxFX_EVENT_ADD,
00088 orxFX_EVENT_REMOVE,
00089 orxFX_EVENT_LOOP,
00091 orxFX_EVENT_NUMBER,
00092
00093 orxFX_EVENT_NONE = orxENUM_NONE
00094
00095 } orxFX_EVENT;
00096
00099 typedef struct __orxFX_EVENT_PAYLOAD_t
00100 {
00101 orxFX *pstFX;
00102 const orxSTRING zFXName;
00104 } orxFX_EVENT_PAYLOAD;
00105
00106
00109 extern orxDLLAPI void orxFASTCALL orxFX_Setup();
00110
00114 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_Init();
00115
00118 extern orxDLLAPI void orxFASTCALL orxFX_Exit();
00119
00123 extern orxDLLAPI orxFX *orxFASTCALL orxFX_Create();
00124
00129 extern orxDLLAPI orxFX *orxFASTCALL orxFX_CreateFromConfig(const orxSTRING _zConfigID);
00130
00135 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_Delete(orxFX *_pstFX);
00136
00144 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_Apply(const orxFX *_pstFX, orxOBJECT *_pstObject, orxFLOAT _fStartTime, orxFLOAT _fEndTime);
00145
00150 extern orxDLLAPI void orxFASTCALL orxFX_Enable(orxFX *_pstFX, orxBOOL _bEnable);
00151
00156 extern orxDLLAPI orxBOOL orxFASTCALL orxFX_IsEnabled(const orxFX *_pstFX);
00157
00173 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_AddAlpha(orxFX *_pstFX, orxFLOAT _fStartTime, orxFLOAT _fEndTime, orxFLOAT _fCyclePeriod, orxFLOAT _fCyclePhase, orxFLOAT _fAmplification, orxFLOAT _fAcceleration, orxFLOAT _fStartAlpha, orxFLOAT _fEndAlpha, orxFX_CURVE _eCurve, orxFLOAT _fPow, orxU32 _u32Flags);
00174
00190 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_AddColor(orxFX *_pstFX, orxFLOAT _fStartTime, orxFLOAT _fEndTime, orxFLOAT _fCyclePeriod, orxFLOAT _fCyclePhase, orxFLOAT _fAmplification, orxFLOAT _fAcceleration, orxVECTOR *_pvStartColor, orxVECTOR *_pvEndColor, orxFX_CURVE _eCurve, orxFLOAT _fPow, orxU32 _u32Flags);
00191
00207 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_AddRotation(orxFX *_pstFX, orxFLOAT _fStartTime, orxFLOAT _fEndTime, orxFLOAT _fCyclePeriod, orxFLOAT _fCyclePhase, orxFLOAT _fAmplification, orxFLOAT _fAcceleration, orxFLOAT _fStartRotation, orxFLOAT _fEndRotation, orxFX_CURVE _eCurve, orxFLOAT _fPow, orxU32 _u32Flags);
00208
00224 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_AddScale(orxFX *_pstFX, orxFLOAT _fStartTime, orxFLOAT _fEndTime, orxFLOAT _fCyclePeriod, orxFLOAT _fCyclePhase, orxFLOAT _fAmplification, orxFLOAT _fAcceleration, const orxVECTOR *_pvStartScale, const orxVECTOR *_pvEndScale, orxFX_CURVE _eCurve, orxFLOAT _fPow, orxU32 _u32Flags);
00225
00241 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_AddPosition(orxFX *_pstFX, orxFLOAT _fStartTime, orxFLOAT _fEndTime, orxFLOAT _fCyclePeriod, orxFLOAT _fCyclePhase, orxFLOAT _fAmplification, orxFLOAT _fAcceleration, const orxVECTOR *_pvStartTranslation, const orxVECTOR *_pvEndTranslation, orxFX_CURVE _eCurve, orxFLOAT _fPow, orxU32 _u32Flags);
00242
00258 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_AddSpeed(orxFX *_pstFX, orxFLOAT _fStartTime, orxFLOAT _fEndTime, orxFLOAT _fCyclePeriod, orxFLOAT _fCyclePhase, orxFLOAT _fAmplification, orxFLOAT _fAcceleration, const orxVECTOR *_pvStartSpeed, const orxVECTOR *_pvEndSpeed, orxFX_CURVE _eCurve, orxFLOAT _fPow, orxU32 _u32Flags);
00259
00265 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_AddSlotFromConfig(orxFX *_pstFX, const orxSTRING _zSlotID);
00266
00271 extern orxDLLAPI orxFLOAT orxFASTCALL orxFX_GetDuration(const orxFX *_pstFX);
00272
00277 extern orxDLLAPI const orxSTRING orxFASTCALL orxFX_GetName(const orxFX *_pstFX);
00278
00284 extern orxDLLAPI orxSTATUS orxFASTCALL orxFX_Loop(orxFX *_pstFX, orxBOOL _bLoop);
00285
00290 extern orxDLLAPI orxBOOL orxFASTCALL orxFX_IsLooping(const orxFX *_pstFX);
00291
00292 #endif
00293