mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-27 06:02:16 +00:00
5fbe74b582
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@297 fc73d0e0-1445-4013-8a0c-d673dee63da5
83 lines
1.3 KiB
C
83 lines
1.3 KiB
C
#ifndef _PARTICLES_H_
|
|
#define _PARTICLES_H_
|
|
|
|
extern int pt_explosion,
|
|
pt_emp,
|
|
pt_pointfile,
|
|
pt_entityparticles,
|
|
pt_darkfield,
|
|
pt_blob,
|
|
pt_blood,
|
|
pt_lightningblood,
|
|
pt_gunshot,
|
|
pt_wizspike,
|
|
pt_knightspike,
|
|
pt_spike,
|
|
pt_superspike,
|
|
pt_lavasplash,
|
|
pt_teleportsplash,
|
|
pt_blasterparticles,
|
|
pt_torch,
|
|
pt_flame,
|
|
pt_bullet,
|
|
pt_superbullet,
|
|
pe_default;
|
|
|
|
extern int rt_rocket_trail,
|
|
rt_smoke,
|
|
rt_blood,
|
|
rt_tracer,
|
|
rt_slight_blood,
|
|
rt_tracer2,
|
|
rt_voor_trail,
|
|
rt_fireball,
|
|
rt_ice,
|
|
rt_spit,
|
|
rt_spell,
|
|
rt_vorpal,
|
|
rt_setstaff,
|
|
rt_magicmissile,
|
|
rt_boneshard,
|
|
rt_scarab,
|
|
rt_acidball,
|
|
rt_bloodshot,
|
|
rt_blastertrail,
|
|
rt_railtrail,
|
|
rt_bubbletrail;
|
|
|
|
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
|
|
typedef struct particle_s
|
|
{
|
|
// driver-usable fields
|
|
vec3_t org;
|
|
float color;
|
|
vec3_t rgb;
|
|
float alpha;
|
|
float scale;
|
|
|
|
union {
|
|
struct {
|
|
vec3_t vel;
|
|
float angle;
|
|
float rotationspeed;
|
|
float nextemit;
|
|
} p; //point blob
|
|
struct {
|
|
vec3_t org2;
|
|
vec3_t lastdir;
|
|
} b; //beam
|
|
} u;
|
|
|
|
// drivers never touch the following fields
|
|
|
|
struct particle_s *next;
|
|
float die;
|
|
} particle_t;
|
|
|
|
#define PARTICLE_Z_CLIP 8.0
|
|
|
|
#define frandom() (rand()*(1.0f/RAND_MAX))
|
|
#define crandom() (rand()*(2.0f/RAND_MAX)-1.0f)
|
|
#define hrandom() (rand()*(1.0f/RAND_MAX)-0.5f)
|
|
|
|
#endif
|