Particle scaling code. Controlled with gl_pscale cvar. 1 is default,

anything over 20 is just plain overkill.  Thanx to QER for the idea.
This commit is contained in:
Dan Olson 2000-03-19 21:50:00 +00:00
parent 64683cdc75
commit 934ace091f
4 changed files with 9 additions and 2 deletions

View file

@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern particle_t *active_particles, *free_particles;
extern int ramp1[8], ramp2[8], ramp3[8];
extern cvar_t *gl_pscale;
/*
===============
@ -112,9 +113,9 @@ void R_DrawParticles (void)
+ (p->org[1] - r_origin[1])*vpn[1]
+ (p->org[2] - r_origin[2])*vpn[2];
if (scale < 20)
scale = 1;
scale = gl_pscale->value;
else
scale = 1 + scale * 0.004;
scale = gl_pscale->value + scale * 0.004;
#if 0 // was in uquake, but give it a go
glColor3ubv ((byte *)&d_8to24table[(int)p->color]);
#else

View file

@ -85,6 +85,7 @@ cvar_t *vid_mode;
cvar_t *vid_glx_fullscreen;
extern cvar_t *gl_triplebuffer;
extern cvar_t *vid_dga_mouseaccel;
cvar_t *gl_pscale;
#ifdef HAS_DGA
static int nummodes;
@ -555,4 +556,5 @@ void VID_Init(unsigned char *palette)
void VID_InitCvars()
{
gl_triplebuffer = Cvar_Get("gl_triplebuffer","1",CVAR_ARCHIVE,"None");
gl_pscale = Cvar_Get("gl_pscale","1",0,"Sets the size of particles");
}

View file

@ -51,6 +51,7 @@ static cvar_t *vid_redrawfull;
static cvar_t *vid_waitforrefresh;
cvar_t *gl_ztrick;
extern cvar_t *gl_triplebuffer;
cvar_t *gl_pscale;
static fxMesaContext fc = NULL;
static int scr_width, scr_height;
@ -511,4 +512,5 @@ void VID_ExtraOptionCmd(int option_cursor)
void VID_InitCvars ()
{
gl_triplebuffer = Cvar_Get ("gl_triplebuffer","1",CVAR_ARCHIVE,"None");
gl_pscale = Cvar_Get ("gl_pscale","1",0,"Sets the size of particles");
}

View file

@ -151,6 +151,7 @@ qboolean gl_mtexable = false;
//====================================
cvar_t *gl_ztrick;
cvar_t *gl_pscale;
cvar_t *vid_mode;
// Note that 0 is MODE_WINDOWED
@ -1607,6 +1608,7 @@ void VID_Init (unsigned char *palette)
"None");
_windowed_mouse = Cvar_Get ("_windowed_mouse","1",CVAR_ARCHIVE,"None");
gl_ztrick = Cvar_Get ("gl_ztrick","1",CVAR_ARCHIVE,"None");
gl_pscale = Cvar_Get ("gl_pscale","1",0,"Sets the size of particles");
Cmd_AddCommand ("vid_nummodes", VID_NumModes_f);
Cmd_AddCommand ("vid_describecurrentmode", VID_DescribeCurrentMode_f);