#include "r_local.h"
#include "r_particle.h"
Go to the source code of this file.
Functions | |
static void | R_GetSpriteVectors (const ptl_t *p, vec3_t right, vec3_t up) |
Get Sprite Vectors. | |
static void | R_SpriteTexcoords (const ptl_t *p, float out[8]) |
Fills float array with texture coordinates. | |
static void | R_DrawSprite (const ptl_t *p) |
static void | R_DrawParticleModel (ptl_t *p) |
static void | R_DrawPtlCircle (const ptl_t *p) |
Draws a circle out of lines. | |
static void | R_DrawPtlLine (const ptl_t *p) |
static void | R_SetBlendMode (int mode) |
void | R_DrawParticles (void) |
Variables | |
ptlArt_t | r_particlesArt [MAX_PTL_ART] |
int | r_numParticlesArt |
ptl_t | r_particles [MAX_PTLS] |
int | r_numParticles |
static void R_DrawParticleModel | ( | ptl_t * | p | ) | [static] |
Definition at line 169 of file r_particle.c.
References ptl_s::angles, modelInfo_t::angles, ptlArt_s::art, ptl_s::color, modelInfo_t::color, ptlArt_s::model, modelInfo_t::model, ptl_s::model, modelInfo_t::origin, R_DrawModelParticle(), ptl_s::s, ptl_s::skin, and modelInfo_t::skin.
Referenced by R_DrawParticles().
void R_DrawParticles | ( | void | ) |
Definition at line 292 of file r_particle.c.
References ptl_s::blend, i, ptl_s::inuse, ptl_s::invis, ptl_s::levelFlags, ptl_s::model, ptl_s::pic, ptl_s::program, R_BlendFunc(), R_Color(), R_DrawParticleModel(), R_DrawPtlCircle(), R_DrawPtlLine(), R_DrawSprite(), r_numParticles, R_SetBlendMode(), R_TexEnv(), R_UseProgram(), refdef, ptl_s::style, STYLE_CIRCLE, STYLE_LINE, and rendererData_t::worldlevel.
Referenced by R_RenderFrame().
static void R_DrawPtlCircle | ( | const ptl_t * | p | ) | [static] |
Draws a circle out of lines.
[in] | p | The particle definition with origin, radius and color |
Definition at line 191 of file r_particle.c.
References ptl_s::color, f, int(), qfalse, qtrue, R_Color(), R_EnableTexture(), ptl_s::s, ptl_s::size, and texunit_diffuse.
Referenced by R_DrawParticles().
static void R_DrawPtlLine | ( | const ptl_t * | p | ) | [static] |
Definition at line 232 of file r_particle.c.
References ptl_s::color, qfalse, qtrue, R_Color(), R_EnableTexture(), ptl_s::s, texunit_diffuse, and ptl_s::v.
Referenced by R_DrawParticles().
static void R_DrawSprite | ( | const ptl_t * | p | ) | [static] |
Definition at line 101 of file r_particle.c.
References ptlArt_s::art, ptl_s::color, ptlArt_s::image, ptl_s::offset, ptl_s::parent, ptl_s::pic, pos, R_BindTexture, R_Color(), R_GetSpriteVectors(), R_SpriteTexcoords(), right, ptl_s::s, image_s::texnum, VectorAdd, VectorCopy, VectorMA(), VectorNormalize(), and VectorSubtract.
Referenced by R_DrawParticles().
Get Sprite Vectors.
[in] | p | the particle to give the dimensions for |
[out] | right | the output right vector for the particle |
[out] | up | the output up vector for the particle |
Definition at line 47 of file r_particle.c.
References ptl_s::angles, AngleVectors(), Com_Error(), CrossProduct(), ERR_FATAL, rlocals_s::forward, r_locals, rlocals_s::right, ptl_s::size, ptl_s::style, STYLE_AXIS, STYLE_BEAM, STYLE_FACING, STYLE_ROTATED, rlocals_s::up, VectorNormalize(), and VectorScale.
Referenced by R_DrawSprite().
static void R_SetBlendMode | ( | int | mode | ) | [static] |
Definition at line 261 of file r_particle.c.
References BLEND_ADD, BLEND_BLEND, BLEND_FILTER, BLEND_INVFILTER, BLEND_ONE, BLEND_REPLACE, Com_Error(), ERR_DROP, R_BlendFunc(), and R_TexEnv().
Referenced by R_DrawParticles().
static void R_SpriteTexcoords | ( | const ptl_t * | p, | |
float | out[8] | |||
) | [inline, static] |
Fills float array with texture coordinates.
Definition at line 80 of file r_particle.c.
References refdef, ptl_s::scrollS, ptl_s::scrollT, and rendererData_t::time.
Referenced by R_DrawSprite().
int r_numParticles |
Definition at line 32 of file r_particle.c.
Referenced by CL_ClearState(), CL_ParticleCheckRounds(), CL_ParticleRun(), CL_ParticleSpawn(), PTL_DebugList_f(), PTL_InitStartup(), and R_DrawParticles().
Definition at line 29 of file r_particle.c.
Referenced by CL_ParticleGetArt(), CL_ParticleRegisterArt(), and PTL_InitStartup().
ptl_t r_particles[MAX_PTLS] |
Definition at line 31 of file r_particle.c.
Referenced by CL_ParticleCheckRounds(), CL_ParticleRun(), CL_ParticleSpawn(), and PTL_DebugList_f().
ptlArt_t r_particlesArt[MAX_PTL_ART] |
Definition at line 28 of file r_particle.c.
Referenced by CL_ParticleGetArt(), and CL_ParticleRegisterArt().