diff --git a/src/client/refresh/soft/header/local.h b/src/client/refresh/soft/header/local.h index cbc1ac90..547b9a15 100644 --- a/src/client/refresh/soft/header/local.h +++ b/src/client/refresh/soft/header/local.h @@ -361,7 +361,6 @@ extern qboolean r_dowarp; extern affinetridesc_t r_affinetridesc; -void R_DrawParticle(void); void D_WarpScreen(void); void R_PolysetUpdateTables(void); diff --git a/src/client/refresh/soft/sw_misc.c b/src/client/refresh/soft/sw_misc.c index db17a638..d429d52d 100644 --- a/src/client/refresh/soft/sw_misc.c +++ b/src/client/refresh/soft/sw_misc.c @@ -64,17 +64,17 @@ D_ViewChanged (void) if (d_pix_max < 1) d_pix_max = 1; - if(r_newrefdef.width >= 800) + if(r_newrefdef.height >= 600) { - d_pix_shift = 16 - (int)((float)r_refdef.vrect.width / 320.0 + 0.5); + d_pix_shift = 16 - (int)((float)r_refdef.vrect.height / 240.0 + 0.5); } - else if(r_newrefdef.width >= 640) + else if(r_newrefdef.height >= 480) { - d_pix_shift = 12 - (int)((float)r_refdef.vrect.width / 320.0 + 0.5); + d_pix_shift = 12 - (int)((float)r_refdef.vrect.height / 240.0 + 0.5); } else { - d_pix_shift = 8 - (int)((float)r_refdef.vrect.width / 320.0 + 0.5); + d_pix_shift = 8 - (int)((float)r_refdef.vrect.height / 240.0 + 0.5); } d_vrectx = r_refdef.vrect.x; diff --git a/src/client/refresh/soft/sw_part.c b/src/client/refresh/soft/sw_part.c index bfcec1a2..e13fac79 100644 --- a/src/client/refresh/soft/sw_part.c +++ b/src/client/refresh/soft/sw_part.c @@ -32,8 +32,6 @@ typedef struct int color; } partparms_t; -static partparms_t partparms; - /* ** R_DrawParticle ** @@ -47,10 +45,10 @@ static partparms_t partparms; ** function pointer route. This exacts some overhead, but ** it pays off in clean and easy to understand code. */ -void R_DrawParticle( void ) +static void R_DrawParticle(partparms_t *partparms) { - particle_t *pparticle = partparms.particle; - int level = partparms.level; + particle_t *pparticle = partparms->particle; + int level = partparms->level; vec3_t local, transformed; float zi; byte *pdest; @@ -165,6 +163,8 @@ void R_DrawParticle( void ) */ void R_DrawParticles (void) { + partparms_t partparms; + particle_t *p; int i; @@ -185,6 +185,6 @@ void R_DrawParticles (void) partparms.particle = p; partparms.color = p->color; - R_DrawParticle(); + R_DrawParticle(&partparms); } }