2009-01-11 22:00:00 +01:00
|
|
|
|
//=======================================================================
|
|
|
|
|
// Copyright XashXT Group 2009 <20>
|
|
|
|
|
// effects_api.h - client temp entities
|
|
|
|
|
//=======================================================================
|
|
|
|
|
#ifndef EFFECTS_API_H
|
|
|
|
|
#define EFFECTS_API_H
|
|
|
|
|
|
2009-10-18 22:00:00 +02:00
|
|
|
|
typedef void (*HITCALLBACK)( TEMPENTITY *ent, trace_t *ptr );
|
|
|
|
|
typedef void (*CALLBACK)( TEMPENTITY *ent );
|
|
|
|
|
|
2009-01-15 22:00:00 +01:00
|
|
|
|
struct cparticle_s
|
|
|
|
|
{
|
|
|
|
|
vec3_t origin;
|
|
|
|
|
vec3_t velocity;
|
|
|
|
|
vec3_t accel;
|
|
|
|
|
vec3_t color;
|
|
|
|
|
vec3_t colorVelocity;
|
|
|
|
|
float alpha;
|
|
|
|
|
float alphaVelocity;
|
|
|
|
|
float radius;
|
|
|
|
|
float radiusVelocity;
|
|
|
|
|
float length;
|
|
|
|
|
float lengthVelocity;
|
|
|
|
|
float rotation;
|
|
|
|
|
float bounceFactor;
|
|
|
|
|
};
|
|
|
|
|
|
2009-10-18 22:00:00 +02:00
|
|
|
|
struct tempent_s
|
|
|
|
|
{
|
|
|
|
|
int flags;
|
|
|
|
|
float die;
|
|
|
|
|
float frameMax;
|
|
|
|
|
vec3_t origin;
|
|
|
|
|
float fadeSpeed;
|
|
|
|
|
float bounceFactor;
|
|
|
|
|
sound_t hitSound;
|
|
|
|
|
|
|
|
|
|
HITCALLBACK hitcallback;
|
|
|
|
|
CALLBACK callback;
|
|
|
|
|
|
|
|
|
|
TEMPENTITY *next;
|
|
|
|
|
int priority;
|
|
|
|
|
} TEMPENTITY;
|
|
|
|
|
|
2009-01-11 22:00:00 +01:00
|
|
|
|
typedef struct efxapi_s
|
|
|
|
|
{
|
2009-01-15 22:00:00 +01:00
|
|
|
|
size_t api_size; // must match with sizeof( efxapi_t );
|
|
|
|
|
|
|
|
|
|
int (*R_AllocParticle)( cparticle_t *src, HSPRITE shader, int flags );
|
|
|
|
|
void (*R_SetDecal)( float *org, float *dir, float *rgba, float rot, float rad, HSPRITE hSpr, int flags );
|
2009-09-17 22:00:00 +02:00
|
|
|
|
void (*CL_AllocDLight)( const float *org, float *rgb, float rad, float time, int flags, int key );
|
2009-01-16 22:00:00 +01:00
|
|
|
|
void (*CL_FindExplosionPlane)( const float *origin, float radius, float *result );
|
|
|
|
|
int (*CL_DecalIndexFromName)( const char *szDecalName );
|
|
|
|
|
int (*CL_DecalIndex)( int id );
|
2009-01-11 22:00:00 +01:00
|
|
|
|
} efxapi_t;
|
|
|
|
|
|
|
|
|
|
#endif//EFFECTS_API_H
|