![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include "qtypes.h"
Go to the source code of this file.
Data Structures | |
struct | particle_t |
struct | particletype_t |
Functions | |
void | CL_EntityParticles (const struct entity_s *ent) |
particle_t * | CL_NewParticle (const vec3_t sortorigin, unsigned short ptypeindex, int pcolor1, int pcolor2, int ptex, float psize, float psizeincrease, float palpha, float palphafade, float pgravity, float pbounce, float px, float py, float pz, float pvx, float pvy, float pvz, float pairfriction, float pliquidfriction, float originjitter, float velocityjitter, qbool pqualityreduction, float lifetime, float stretch, pblend_t blendmode, porientation_t orientation, int staincolor1, int staincolor2, int staintex, float stainalpha, float stainsize, float angle, float spin, float tint[4]) |
Creates a new particle and returns a pointer to it. | |
particle_t * | CL_NewQuakeParticle (const vec3_t origin, const unsigned short ptypeindex, const int color_1, const int color_2, const float gravity, const float offset_x, const float offset_y, const float offset_z, const float velocity_offset_x, const float velocity_offset_y, const float velocity_offset_z, const float air_friction, const float liquid_friction, const float origin_jitter, const float velocity_jitter, const float lifetime) |
Creates a simple particle, a square like Quake, or a disc like GLQuake. | |
void | CL_ParseParticleEffect (void) |
void | CL_ParticleBox (int effectindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, struct entity_s *ent, int palettecolor, qbool spawndlight, qbool spawnparticles, float tintmins[4], float tintmaxs[4], float fade) |
void | CL_ParticleCube (const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, vec_t gravity, vec_t randomvel) |
void | CL_ParticleEffect (int effectindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, struct entity_s *ent, int palettecolor) |
int | CL_ParticleEffectIndexForName (const char *name) |
const char * | CL_ParticleEffectNameForIndex (int i) |
void | CL_ParticleExplosion (const vec3_t org) |
void | CL_ParticleExplosion2 (const vec3_t org, int colorStart, int colorLength) |
void | CL_ParticleRain (const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, int type) |
void | CL_Particles_Clear (void) |
void | CL_Particles_Init (void) |
void | CL_Particles_Shutdown (void) |
void | CL_ParticleTrail (int effectindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, struct entity_s *ent, int palettecolor, qbool spawndlight, qbool spawnparticles, float tintmins[4], float tintmaxs[4], float fade) |
Variables | |
struct cvar_s | cl_decals |
struct cvar_s | cl_decals_fadetime |
struct cvar_s | cl_decals_time |
struct cvar_s | cl_particles |
struct cvar_s | cl_particles_blood |
struct cvar_s | cl_particles_blood_alpha |
struct cvar_s | cl_particles_blood_bloodhack |
struct cvar_s | cl_particles_blood_decal_alpha |
struct cvar_s | cl_particles_blood_decal_scalemax |
struct cvar_s | cl_particles_blood_decal_scalemin |
struct cvar_s | cl_particles_bubbles |
struct cvar_s | cl_particles_bulletimpacts |
struct cvar_s | cl_particles_explosions_shell |
struct cvar_s | cl_particles_explosions_sparks |
struct cvar_s | cl_particles_quake |
struct cvar_s | cl_particles_quality |
struct cvar_s | cl_particles_rain |
struct cvar_s | cl_particles_size |
struct cvar_s | cl_particles_smoke |
struct cvar_s | cl_particles_smoke_alpha |
struct cvar_s | cl_particles_smoke_alphafade |
struct cvar_s | cl_particles_snow |
struct cvar_s | cl_particles_sparks |
enum effectnameindex_t |
Definition at line 128 of file cl_particles.h.
enum pblend_t |
Enumerator | |
---|---|
PBLEND_ALPHA | |
PBLEND_ADD | |
PBLEND_INVMOD | |
PBLEND_INVALID |
Definition at line 42 of file cl_particles.h.
enum porientation_t |
Enumerator | |
---|---|
PARTICLE_BILLBOARD | |
PARTICLE_SPARK | |
PARTICLE_ORIENTED_DOUBLESIDED | |
PARTICLE_VBEAM | |
PARTICLE_HBEAM | |
PARTICLE_INVALID |
Definition at line 31 of file cl_particles.h.
enum ptype_t |
Enumerator | |
---|---|
pt_dead | |
pt_alphastatic | |
pt_static | |
pt_spark | |
pt_beam | |
pt_rain | |
pt_raindecal | |
pt_snow | |
pt_bubble | |
pt_blood | |
pt_smoke | |
pt_decal | |
pt_entityparticle | |
pt_explode | |
pt_explode2 | |
pt_total |
Definition at line 59 of file cl_particles.h.
void CL_EntityParticles | ( | const struct entity_s * | ent | ) |
particle_t * CL_NewParticle | ( | const vec3_t | sortorigin, |
unsigned short | ptypeindex, | ||
int | pcolor1, | ||
int | pcolor2, | ||
int | ptex, | ||
float | psize, | ||
float | psizeincrease, | ||
float | palpha, | ||
float | palphafade, | ||
float | pgravity, | ||
float | pbounce, | ||
float | px, | ||
float | py, | ||
float | pz, | ||
float | pvx, | ||
float | pvy, | ||
float | pvz, | ||
float | pairfriction, | ||
float | pliquidfriction, | ||
float | originjitter, | ||
float | velocityjitter, | ||
qbool | pqualityreduction, | ||
float | lifetime, | ||
float | stretch, | ||
pblend_t | blendmode, | ||
porientation_t | orientation, | ||
int | staincolor1, | ||
int | staincolor2, | ||
int | staintex, | ||
float | stainalpha, | ||
float | stainsize, | ||
float | angle, | ||
float | spin, | ||
float | tint[4] ) |
Creates a new particle and returns a pointer to it.
[in] | sortorigin | ? |
[in] | ptypeindex | Any of the pt_ enum values (pt_static, pt_blood, etc), see ptype_t near the top of this file |
[in] | pcolor1,pcolor2 | Minimum and maximum range of color, randomly interpolated with pcolor2 to decide particle color |
[in] | ptex | Any of the tex_ values such as tex_smoke[rand()&7] or tex_particle |
[in] | psize | Size of particle (or thickness for PARTICLE_SPARK and PARTICLE_*BEAM) |
[in] | psizeincrease | ? |
[in] | palpha | Opacity of particle as 0-255 (can be more than 255) |
[in] | palphafade | Rate of fade per second (so 256 would mean a 256 alpha particle would fade to nothing in 1 second) |
[in] | pgravity | How much effect gravity has on the particle (0-1) |
[in] | pbounce | How much bounce the particle has when it hits a surface (0-1), -1 makes a blood splat when it hits a surface, 0 does not even check for collisions |
[in] | px,py,pz | Starting origin of particle |
[in] | pvx,pvy,pvz | Starting velocity of particle |
[in] | pairfriction | How much the particle slows down, in air, per second (0-1 typically, can slowdown faster than 1) |
[in] | pliquidfriction | How much the particle slows down, in liquids, per second (0-1 typically, can slowdown faster than 1) |
[in] | originjitter | ? |
[in] | velocityjitter | ? |
[in] | pqualityreduction | ? |
[in] | lifetime | How long the particle can live (note it is also removed if alpha drops to nothing) |
[in] | stretch | ? |
[in] | blendmode | One of the PBLEND_ values |
[in] | orientation | One of the PARTICLE_ values |
[in] | staincolor1 | Minimum and maximum ranges of stain color, randomly interpolated to decide stain color (-1 to use none) |
[in] | staincolor2 | Minimum and maximum ranges of stain color, randomly interpolated to decide stain color (-1 to use none) |
[in] | staintex | Any of the tex_ values such as tex_smoke[rand()&7] or tex_particle |
[in] | angle | Base rotation of the particle geometry around its center normal |
[in] | spin | Rotation speed of the particle geometry around its center normal |
[in] | tint | The tint |
Definition at line 668 of file cl_particles.c.
References particle_t::airfriction, particle_t::alpha, particle_t::alphafade, particle_t::angle, b, particle_t::blendmode, particle_t::bounce, cl, CL_NewParticle(), cl_particles, CL_TraceLine(), collision_extendmovelength, particle_t::color, particle_t::delayedspawn, particle_t::die, trace_t::endpos, floor(), trace_t::fraction, client_state_t::free_particle, g, particle_t::gravity, i, Image_LinearFloatFromsRGB, int(), cvar_t::integer, lhrandom, particle_t::liquidfriction, client_state_t::max_particles, min, MOVE_NOMONSTERS, client_state_t::movevars_gravity, plane_t::normal, NULL, client_state_t::num_particles, particle_t::org, particle_t::orientation, PARTICLE_HBEAM, PARTICLE_ORIENTED_DOUBLESIDED, PARTICLE_SPARK, PARTICLE_VBEAM, client_state_t::particles, particletexture, PBLEND_ADD, PBLEND_INVMOD, trace_t::plane, pt_explode, pt_explode2, pt_rain, pt_raindecal, pt_snow, pt_spark, px, particle_t::qualityreduction, r, particle_t::size, particle_t::sizeincrease, particle_t::sortorigin, particle_t::spin, viddef_t::sRGB3D, particle_t::stainalpha, particle_t::staincolor, particle_t::stainsize, particle_t::staintexnum, particle_t::stretch, SUPERCONTENTS_BODY, SUPERCONTENTS_LIQUIDSMASK, SUPERCONTENTS_SOLID, particletexture_t::t1, particletexture_t::t2, tex_particle, tex_rainsplash, particle_t::texnum, client_state_t::time, particle_t::time2, particle_t::typeindex, v, cvar_t::value, VectorCopy, VectorMA, VectorRandom, particle_t::vel, and vid.
Referenced by CL_EntityParticles(), CL_NewParticle(), CL_NewParticlesFromEffectinfo(), CL_NewQuakeParticle(), CL_ParticleCube(), CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), CL_ParticleExplosion2(), CL_ParticleRain(), CL_ReadPointFile_f(), CL_Smoke(), CL_Sparks(), VM_CL_SpawnParticle(), and VM_CL_SpawnParticleDelayed().
particle_t * CL_NewQuakeParticle | ( | const vec3_t | origin, |
const unsigned short | ptypeindex, | ||
const int | color_1, | ||
const int | color_2, | ||
const float | gravity, | ||
const float | offset_x, | ||
const float | offset_y, | ||
const float | offset_z, | ||
const float | velocity_offset_x, | ||
const float | velocity_offset_y, | ||
const float | velocity_offset_z, | ||
const float | air_friction, | ||
const float | liquid_friction, | ||
const float | origin_jitter, | ||
const float | velocity_jitter, | ||
const float | lifetime ) |
Creates a simple particle, a square like Quake, or a disc like GLQuake.
[in] | origin | ? |
[in] | color_1,color_2 | Minimum and maximum range of color, randomly interpolated with pcolor2 to decide particle color |
[in] | gravity | How much effect gravity has on the particle (0-1) |
[in] | offset_x,offset_y,offset_z | Starting origin of particle |
[in] | velocity_offset_x,velocity_offset_y,velocity_offset_z | Starting velocity of particle |
[in] | air_friction | How much the particle slows down, in air, per second (0-1 typically, can slowdown faster than 1) |
[in] | liquid_friction | How much the particle slows down, in liquids, per second (0-1 typically, can slowdown faster than 1) |
[in] | origin_jitter | ? |
[in] | velocity_jitter | ? |
[in] | lifetime | How long the particle can live (note it is also removed if alpha drops to nothing) |
Definition at line 869 of file cl_particles.c.
References CL_NewParticle(), cl_particles_quake, cvar_t::integer, NULL, origin, PARTICLE_BILLBOARD, PBLEND_ALPHA, tex_particle, tex_square, and texture.
Referenced by CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), and CL_ParticleExplosion2().
Definition at line 1914 of file cl_particles.c.
References cl_message, CL_ParticleEffect(), cls, color, count, dir, EFFECT_SVC_PARTICLE, i, MSG_ReadByte, MSG_ReadChar, MSG_ReadVector(), NULL, and client_static_t::protocol.
Referenced by CL_ParseServerMessage().
void CL_ParticleBox | ( | int | effectindex, |
float | pcount, | ||
const vec3_t | originmins, | ||
const vec3_t | originmaxs, | ||
const vec3_t | velocitymins, | ||
const vec3_t | velocitymaxs, | ||
struct entity_s * | ent, | ||
int | palettecolor, | ||
qbool | spawndlight, | ||
qbool | spawnparticles, | ||
float | tintmins[4], | ||
float | tintmaxs[4], | ||
float | fade ) |
void CL_ParticleCube | ( | const vec3_t | mins, |
const vec3_t | maxs, | ||
const vec3_t | dir, | ||
int | count, | ||
int | colorbase, | ||
vec_t | gravity, | ||
vec_t | randomvel ) |
Definition at line 2073 of file cl_particles.c.
References CL_NewParticle(), cl_particles, cl_particles_quality, count, dir, int(), cvar_t::integer, lhrandom, maxs, mins, NULL, PARTICLE_BILLBOARD, particlepalette, PBLEND_ALPHA, pt_alphastatic, tex_particle, cvar_t::value, and VectorMAM.
Referenced by CL_ParseTempEntity(), and VM_CL_te_particlecube().
void CL_ParticleEffect | ( | int | effectindex, |
float | pcount, | ||
const vec3_t | originmins, | ||
const vec3_t | originmaxs, | ||
const vec3_t | velocitymins, | ||
const vec3_t | velocitymaxs, | ||
struct entity_s * | ent, | ||
int | palettecolor ) |
int CL_ParticleEffectIndexForName | ( | const char * | name | ) |
Definition at line 481 of file cl_particles.c.
References i, MAX_PARTICLEEFFECTNAME, name, and particleeffectname.
Referenced by VM_CL_particleeffectnum().
const char * CL_ParticleEffectNameForIndex | ( | int | i | ) |
Definition at line 490 of file cl_particles.c.
References i, MAX_PARTICLEEFFECTNAME, NULL, and particleeffectname.
Definition at line 1939 of file cl_particles.c.
References CL_NewParticle(), CL_NewQuakeParticle(), cl_particles, cl_particles_bubbles, cl_particles_explosions_shell, cl_particles_explosions_sparks, cl_particles_quake, cl_particles_quality, cl_particles_sparks, CL_PointSuperContents, CL_SpawnDecalParticleForPoint(), CL_TraceLine(), collision_extendmovelength, color, trace_t::endpos, trace_t::fraction, i, cvar_t::integer, lhrandom, MOVE_NOMONSTERS, NULL, PARTICLE_BILLBOARD, PARTICLE_SPARK, particlepalette, PBLEND_ADD, pt_bubble, pt_explode, pt_explode2, pt_spark, r, R_NewExplosion(), R_Stain(), ramp1, ramp2, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, SUPERCONTENTS_WATER, tex_bubble, tex_bulletdecal, tex_particle, v, v2, cvar_t::value, VectorMA, VectorRandom, VectorScale, and VectorSubtract.
Referenced by CL_ParseTempEntity(), CL_ParticleEffect_Fallback(), and VM_CL_te_explosionrgb().
Definition at line 2034 of file cl_particles.c.
References CL_NewParticle(), CL_NewQuakeParticle(), cl_particles, cl_particles_quake, cl_particles_quality, i, cvar_t::integer, lhrandom, NULL, PARTICLE_BILLBOARD, particlepalette, PBLEND_ALPHA, pt_alphastatic, tex_particle, and cvar_t::value.
Referenced by CL_ParseTempEntity(), and VM_CL_te_explosion2().
void CL_ParticleRain | ( | const vec3_t | mins, |
const vec3_t | maxs, | ||
const vec3_t | dir, | ||
int | count, | ||
int | colorbase, | ||
int | type ) |
Definition at line 2088 of file cl_particles.c.
References cl, CL_NewParticle(), cl_particles, cl_particles_quality, cl_particles_rain, cl_particles_snow, Con_Printf(), count, dir, GAME_GOODVSBAD2, gamemode, int(), cvar_t::integer, lhrandom, max, maxs, mins, NULL, PARTICLE_BILLBOARD, particle_size, PARTICLE_SPARK, particlepalette, PBLEND_ADD, pt_rain, pt_snow, tex_particle, type, cvar_t::value, VectorSet, and client_state_t::worldmodel.
Referenced by CL_ParseTempEntity(), VM_CL_te_particlerain(), and VM_CL_te_particlesnow().
Definition at line 586 of file cl_particles.c.
References CF_CLIENT, cl_decals, cl_decals_bias, cl_decals_fadetime, cl_decals_max, cl_decals_models, cl_decals_newsystem_bloodsmears, cl_decals_newsystem_immediatebloodstain, cl_decals_newsystem_intensitymultiplier, cl_decals_time, cl_particles, cl_particles_alpha, cl_particles_blood, cl_particles_blood_alpha, cl_particles_blood_bloodhack, cl_particles_blood_decal_alpha, cl_particles_blood_decal_scalemax, cl_particles_blood_decal_scalemin, cl_particles_bubbles, cl_particles_bulletimpacts, cl_particles_collisions, cl_particles_explosions_shell, cl_particles_explosions_sparks, cl_particles_forcetraileffects, CL_Particles_LoadEffectInfo_f(), cl_particles_quake, cl_particles_quality, cl_particles_rain, cl_particles_size, cl_particles_smoke, cl_particles_smoke_alpha, cl_particles_smoke_alphafade, cl_particles_snow, cl_particles_sparks, cl_particles_visculling, CL_ReadPointFile_f(), Cmd_AddCommand(), and Cvar_RegisterVariable().
Referenced by CL_Init().
void CL_ParticleTrail | ( | int | effectindex, |
float | pcount, | ||
const vec3_t | originmins, | ||
const vec3_t | originmaxs, | ||
const vec3_t | velocitymins, | ||
const vec3_t | velocitymaxs, | ||
struct entity_s * | ent, | ||
int | palettecolor, | ||
qbool | spawndlight, | ||
qbool | spawnparticles, | ||
float | tintmins[4], | ||
float | tintmaxs[4], | ||
float | fade ) |
|
extern |
Definition at line 303 of file cl_particles.c.
Referenced by CL_ImmediateBloodStain(), CL_Particles_Init(), CL_SpawnDecalParticleForSurface(), M_Menu_Options_Effects_AdjustSliders(), M_Options_Effects_Draw(), and R_DrawParticles().
|
extern |
Definition at line 305 of file cl_particles.c.
Referenced by CL_Particles_Init(), R_DrawModelDecals_Entity(), and R_DrawModelDecals_FadeEntity().
|
extern |
Definition at line 304 of file cl_particles.c.
Referenced by CL_Particles_Init(), R_DrawModelDecals_Entity(), and R_DrawModelDecals_FadeEntity().
|
extern |
Definition at line 279 of file cl_particles.c.
Referenced by CL_EntityParticles(), CL_NewParticle(), CL_NewParticlesFromEffectinfo(), CL_ParticleCube(), CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), CL_ParticleExplosion2(), CL_ParticleRain(), CL_Particles_Init(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 284 of file cl_particles.c.
Referenced by CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), CL_Particles_Init(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 285 of file cl_particles.c.
Referenced by CL_ParticleEffect_Fallback(), CL_Particles_Init(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 289 of file cl_particles.c.
Referenced by CL_ParticleEffect_Fallback(), CL_Particles_Init(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 286 of file cl_particles.c.
Referenced by CL_Particles_Init(), and R_DrawParticles().
|
extern |
Definition at line 288 of file cl_particles.c.
Referenced by CL_Particles_Init(), and R_DrawParticles().
|
extern |
Definition at line 287 of file cl_particles.c.
Referenced by CL_Particles_Init(), and R_DrawParticles().
|
extern |
Definition at line 299 of file cl_particles.c.
Referenced by CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), CL_Particles_Init(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 290 of file cl_particles.c.
Referenced by CL_ParticleEffect_Fallback(), CL_Particles_Init(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 292 of file cl_particles.c.
Referenced by CL_ParticleExplosion(), CL_Particles_Init(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 291 of file cl_particles.c.
Referenced by CL_ParticleExplosion(), and CL_Particles_Init().
|
extern |
Definition at line 283 of file cl_particles.c.
Referenced by CL_NewParticlesFromEffectinfo(), CL_NewQuakeParticle(), CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), CL_ParticleExplosion2(), CL_Particles_Init(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 280 of file cl_particles.c.
Referenced by CL_NewParticlesFromEffectinfo(), CL_ParticleCube(), CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), CL_ParticleExplosion2(), CL_ParticleRain(), CL_Particles_Init(), CL_Smoke(), CL_Sparks(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 293 of file cl_particles.c.
Referenced by CL_NewParticlesFromEffectinfo(), CL_ParticleRain(), and CL_Particles_Init().
|
extern |
Definition at line 282 of file cl_particles.c.
Referenced by CL_Particles_Init(), and R_DrawParticle_TransparentCallback().
|
extern |
Definition at line 295 of file cl_particles.c.
Referenced by CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), CL_Particles_Init(), CL_Smoke(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().
|
extern |
Definition at line 296 of file cl_particles.c.
Referenced by CL_ParticleEffect_Fallback(), and CL_Particles_Init().
|
extern |
Definition at line 297 of file cl_particles.c.
Referenced by CL_ParticleEffect_Fallback(), and CL_Particles_Init().
|
extern |
Definition at line 294 of file cl_particles.c.
Referenced by CL_NewParticlesFromEffectinfo(), CL_ParticleRain(), and CL_Particles_Init().
|
extern |
Definition at line 298 of file cl_particles.c.
Referenced by CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), CL_Particles_Init(), CL_Sparks(), M_Menu_Options_Effects_AdjustSliders(), and M_Options_Effects_Draw().