r_particle.c File Reference

#include "r_local.h"
#include "r_particle.h"
Include dependency graph for r_particle.c:

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

Function Documentation

static void R_DrawParticleModel ( ptl_t p  )  [static]
void R_DrawParticles ( void   ) 
static void R_DrawPtlCircle ( const ptl_t p  )  [static]

Draws a circle out of lines.

Parameters:
[in] p The particle definition with origin, radius and color
See also:
Draw_Circle

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]
See also:
R_DrawParticles

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]
static void R_GetSpriteVectors ( const ptl_t p,
vec3_t  right,
vec3_t  up 
) [static]

Get Sprite Vectors.

Parameters:
[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
See also:
R_DrawSprite

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]
static void R_SpriteTexcoords ( const ptl_t p,
float  out[8] 
) [inline, static]

Fills float array with texture coordinates.

Note:
Used if sprite is scrolled

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().


Variable Documentation

Definition at line 29 of file r_particle.c.

Referenced by CL_ParticleGetArt(), CL_ParticleRegisterArt(), and PTL_InitStartup().

ptl_t r_particles[MAX_PTLS]
ptlArt_t r_particlesArt[MAX_PTL_ART]

Definition at line 28 of file r_particle.c.

Referenced by CL_ParticleGetArt(), and CL_ParticleRegisterArt().


Generated by  doxygen 1.6.2