mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
look to height instead width
This commit is contained in:
parent
14af679b7e
commit
758ab07a38
3 changed files with 11 additions and 12 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue