From 294a4dfbb9b4c777d628e16b259057d95054c09b Mon Sep 17 00:00:00 2001 From: Valery Guskov Date: Mon, 4 Apr 2016 00:25:20 +0300 Subject: [PATCH] cleaning up removed non-minimal changes from porting stereo-quake --- src/client/cl_screen.c | 30 ------------------------------ src/client/header/client.h | 4 ---- src/client/refresh/r_main.c | 15 +-------------- 3 files changed, 1 insertion(+), 48 deletions(-) diff --git a/src/client/cl_screen.c b/src/client/cl_screen.c index 3b389d6b..5f2b4ea6 100644 --- a/src/client/cl_screen.c +++ b/src/client/cl_screen.c @@ -50,7 +50,6 @@ cvar_t *scr_graphscale; cvar_t *scr_graphshift; cvar_t *scr_drawall; -cvar_t *scr_scale; cvar_t *gl_hudscale; /* named for consistency with R1Q2 */ cvar_t *gl_consolescale; cvar_t *gl_menuscale; @@ -71,34 +70,6 @@ extern cvar_t *crosshair_scale; void SCR_TimeRefresh_f(void); void SCR_Loading_f(void); -int SCR_Scale ( void ) -{ - - int scale_x, scale_y, scale; - - scale = scr_scale->value; - if (scale == 1) { - return scale; - } else if (scale < 0) { - scale = 0; - } - - scale_x = abs(viddef.width) / 320; - scale_y = abs(viddef.height) / 240; - - if (scale_x > scale_y) { - scale_x = scale_y; - } - - if (scale == 0 || (scale_x > 0 && scale_x < scale)) - { - scale = scale_x; - } - - return scale; -} - - /* * A new packet was just parsed */ @@ -463,7 +434,6 @@ SCR_Init(void) scr_graphscale = Cvar_Get("graphscale", "1", 0); scr_graphshift = Cvar_Get("graphshift", "0", 0); scr_drawall = Cvar_Get("scr_drawall", "0", 0); - scr_scale = Cvar_Get ("scr_scale", "0", CVAR_ARCHIVE); gl_hudscale = Cvar_Get("gl_hudscale", "-1", CVAR_ARCHIVE); gl_consolescale = Cvar_Get("gl_consolescale", "-1", CVAR_ARCHIVE); gl_menuscale = Cvar_Get("gl_menuscale", "-1", CVAR_ARCHIVE); diff --git a/src/client/header/client.h b/src/client/header/client.h index 23ae304f..b2092a86 100644 --- a/src/client/header/client.h +++ b/src/client/header/client.h @@ -284,8 +284,6 @@ extern cvar_t *cl_vwep; extern cvar_t *horplus; extern cvar_t *cin_force43; -int SCR_Scale (void); - typedef struct { int key; /* so entities can reuse same entry */ @@ -407,8 +405,6 @@ void CL_AddDLights (void); void CL_AddTEnts (void); void CL_AddLightStyles (void); -void CL_CalcViewValues (void); - void CL_PrepRefresh (void); void CL_RegisterSounds (void); diff --git a/src/client/refresh/r_main.c b/src/client/refresh/r_main.c index c1e9a57d..1ee5fa54 100644 --- a/src/client/refresh/r_main.c +++ b/src/client/refresh/r_main.c @@ -147,9 +147,6 @@ cvar_t *cl_stereo_separation; cvar_t *cl_stereo_anaglyph_colors; cvar_t *cl_stereo_convergence; -cvar_t *scr_viewsize; - - /* * Returns true if the box is completely outside the frustom */ @@ -420,7 +417,6 @@ R_DrawParticles2(int num_particles, const particle_t particles[], vec3_t up, right; float scale; byte color[4]; - float viewsize; R_Bind(r_particletexture->texnum); glDepthMask(GL_FALSE); /* no z buffering */ @@ -431,8 +427,6 @@ R_DrawParticles2(int num_particles, const particle_t particles[], VectorScale(vup, 1.5, up); VectorScale(vright, 1.5, right); - viewsize = scr_viewsize->value * 0.01f; - for (p = particles, i = 0; i < num_particles; i++, p++) { /* hack a scale up to keep particles from disapearing */ @@ -449,8 +443,6 @@ R_DrawParticles2(int num_particles, const particle_t particles[], scale = 1 + scale * 0.004; } - scale *= viewsize; - *(int *)color = colortable[p->color]; color[3] = p->alpha * 255; @@ -489,14 +481,11 @@ R_DrawParticles(void) unsigned char color[4]; const particle_t *p; - float viewsize; - viewsize = scr_viewsize->value * 0.01f; - glDepthMask(GL_FALSE); glEnable(GL_BLEND); glDisable(GL_TEXTURE_2D); - glPointSize(LittleFloat(gl_particle_size->value * viewsize)); + glPointSize(LittleFloat(gl_particle_size->value)); glBegin(GL_POINTS); @@ -1224,8 +1213,6 @@ R_Register(void) cl_stereo_anaglyph_colors = Cvar_Get( "cl_stereo_anaglyph_colors", "rc", CVAR_ARCHIVE ); cl_stereo_convergence = Cvar_Get( "cl_stereo_convergence", "1", CVAR_ARCHIVE ); - scr_viewsize = Cvar_Get( "viewsize", "100", CVAR_ARCHIVE ); - Cmd_AddCommand("imagelist", R_ImageList_f); Cmd_AddCommand("screenshot", R_ScreenShot); Cmd_AddCommand("modellist", Mod_Modellist_f);