more diff S/N ratio improvements

This commit is contained in:
Bill Currie 2001-05-19 23:38:56 +00:00
parent 2edaee8f5d
commit 916b52f24c
11 changed files with 48 additions and 54 deletions

View file

@ -50,10 +50,6 @@ extern byte gammatable[256];
extern qboolean V_CheckGamma (void);
extern void V_CalcIntermissionRefdef (void);
extern void V_CalcRefdef (void);
extern cvar_t *gl_cshiftpercent;
extern cvar_t *cl_cshift_powerup;
byte ramps[3][256];

View file

@ -88,8 +88,6 @@ cvar_t *crosshaircolor;
cvar_t *cl_crossx;
cvar_t *cl_crossy;
cvar_t *gl_cshiftpercent;
cvar_t *brightness;
cvar_t *contrast;
@ -718,8 +716,6 @@ V_Init (void)
"None");
cl_crossx = Cvar_Get ("cl_crossx", "0", CVAR_NONE, NULL, "None");
cl_crossy = Cvar_Get ("cl_crossy", "0", CVAR_NONE, NULL, "None");
gl_cshiftpercent = Cvar_Get ("gl_cshiftpercent", "100", CVAR_NONE, NULL,
"None");
scr_ofsx = Cvar_Get ("scr_ofsx", "0", CVAR_NONE, NULL, "None");
scr_ofsy = Cvar_Get ("scr_ofsy", "0", CVAR_NONE, NULL, "None");

View file

@ -1,7 +1,7 @@
/*
r_alias.c
@description@
routines for setting up to draw alias models
Copyright (C) 1996-1997 Id Software, Inc.
@ -31,9 +31,13 @@
#endif
#include "QF/console.h"
#include "QF/render.h"
#include "QF/skin.h"
#include "QF/sys.h"
#include "QF/texture.h"
#include "client.h"
#include "d_ifacea.h"
#include "r_local.h"
#define LIGHT_MIN 5 // lowest light value we'll allow, to
@ -162,7 +166,6 @@ R_AliasCheckBBox (void)
}
}
if (zfullyclipped) {
return false; // everything was near-z-clipped
}
@ -358,9 +361,9 @@ R_AliasSetUpTransform (int trivial_accept)
VectorInverse (viewmatrix[1]);
VectorCopy (vpn, viewmatrix[2]);
// viewmatrix[0][3] = 0;
// viewmatrix[1][3] = 0;
// viewmatrix[2][3] = 0;
// viewmatrix[0][3] = 0;
// viewmatrix[1][3] = 0;
// viewmatrix[2][3] = 0;
R_ConcatTransforms (viewmatrix, rotationmatrix, aliastransform);
@ -436,8 +439,7 @@ R_AliasTransformAndProjectFinalVerts (finalvert_t *fv, stvert_t *pstverts)
// x, y, and z are scaled down by 1/2**31 in the transform, so 1/z is
// scaled up by 1/2**31, and the scaling cancels out for x and y in
// the
// projection
// the projection
fv->v[5] = zi;
fv->v[0] = ((DotProduct (pverts->v, aliastransform[0]) +

View file

@ -709,21 +709,21 @@ R_RenderPoly (msurface_t *fa, int clipflags)
// r_nearzi, and extract the s and t coordinates at the vertices
pplane = fa->plane;
switch (pplane->type) {
case PLANE_X:
case PLANE_ANYX:
s_axis = 1;
t_axis = 2;
break;
case PLANE_Y:
case PLANE_ANYY:
s_axis = 0;
t_axis = 2;
break;
case PLANE_Z:
case PLANE_ANYZ:
s_axis = 0;
t_axis = 1;
break;
case PLANE_X:
case PLANE_ANYX:
s_axis = 1;
t_axis = 2;
break;
case PLANE_Y:
case PLANE_ANYY:
s_axis = 0;
t_axis = 2;
break;
case PLANE_Z:
case PLANE_ANYZ:
s_axis = 0;
t_axis = 1;
break;
}
r_nearzi = 0;
@ -795,7 +795,7 @@ R_ZDrawSubmodelPolys (model_t *pmodel)
// draw the polygon
if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON))) {
// FIXME: use bounding-box-based frustum clipping info?
// FIXME: use bounding-box-based frustum clipping info?
R_RenderPoly (psurf, 15);
}
}

View file

@ -137,7 +137,6 @@ R_MakeSky (void)
pnewsky = (unsigned int *) ((byte *) pnewsky + 1);
}
#endif
pnewsky += 128 / sizeof (unsigned int);
}
@ -188,7 +187,6 @@ R_GenSkyTile (void *pdest)
pd = (unsigned int *) ((byte *) pd + 1);
}
#endif
pnewsky += 128 / sizeof (unsigned int);
}
}
@ -245,7 +243,6 @@ R_SetSkyFrame (void)
skytime = cl.time - ((int) (cl.time / temp) * temp);
r_skymade = 0;
}

View file

@ -293,7 +293,7 @@ R_DrawSprite (void)
if (psprite->type == SPR_FACING_UPRIGHT) {
// generate the sprite's axes, with vup straight up in worldspace, and
// r_spritedesc.vright perpendicular to modelorg.
// This will not work if the view direction is very close to straight
// This will not work if the view direction is very close to straight
// up or down, because the cross product will be between two nearly
// parallel vectors and starts to approach an undefined state, so we
// don't draw if the two vectors are less than 1 degree apart
@ -311,16 +311,15 @@ R_DrawSprite (void)
r_spritedesc.vup[1] = 0;
r_spritedesc.vup[2] = 1;
r_spritedesc.vright[0] = tvec[1];
// CrossProduct(r_spritedesc.vup, -modelorg,
//CrossProduct(r_spritedesc.vup, -modelorg,
r_spritedesc.vright[1] = -tvec[0];
// r_spritedesc.vright)
//r_spritedesc.vright)
r_spritedesc.vright[2] = 0;
VectorNormalize (r_spritedesc.vright);
r_spritedesc.vpn[0] = -r_spritedesc.vright[1];
r_spritedesc.vpn[1] = r_spritedesc.vright[0];
r_spritedesc.vpn[2] = 0;
// CrossProduct (r_spritedesc.vright, r_spritedesc.vup,
// r_spritedesc.vpn)
//CrossProduct (r_spritedesc.vright, r_spritedesc.vup, r_spritedesc.vpn)
} else if (psprite->type == SPR_VP_PARALLEL) {
// generate the sprite's axes, completely parallel to the viewplane.
// There are no problem situations, because the sprite is always in the
@ -347,15 +346,14 @@ R_DrawSprite (void)
r_spritedesc.vup[1] = 0;
r_spritedesc.vup[2] = 1;
r_spritedesc.vright[0] = vpn[1];
// CrossProduct (r_spritedesc.vup, vpn,
//CrossProduct (r_spritedesc.vup, vpn,
r_spritedesc.vright[1] = -vpn[0]; // r_spritedesc.vright)
r_spritedesc.vright[2] = 0;
VectorNormalize (r_spritedesc.vright);
r_spritedesc.vpn[0] = -r_spritedesc.vright[1];
r_spritedesc.vpn[1] = r_spritedesc.vright[0];
r_spritedesc.vpn[2] = 0;
// CrossProduct (r_spritedesc.vright, r_spritedesc.vup,
// r_spritedesc.vpn)
//CrossProduct (r_spritedesc.vright, r_spritedesc.vup, r_spritedesc.vpn)
} else if (psprite->type == SPR_ORIENTED) {
// generate the sprite's axes, according to the sprite's world
// orientation

View file

@ -43,7 +43,6 @@ extern byte gammatable[256];
qboolean V_CheckGamma (void);
void
V_CalcPowerupCshift (void)
{

View file

@ -31,6 +31,7 @@
#endif
#include "QF/console.h"
#include "QF/render.h"
#include "QF/skin.h"
#include "QF/sys.h"
#include "QF/texture.h"
@ -38,10 +39,10 @@
#include "client.h"
#include "d_ifacea.h"
#include "r_local.h"
#include "QF/render.h"
#define LIGHT_MIN 5 // lowest light value we'll allow, to
// avoid the need for inner-loop light clamping
#define LIGHT_MIN 5 // lowest light value we'll allow, to
// avoid the need for inner-loop light
// clamping
mtriangle_t *ptriangles;
affinetridesc_t r_affinetridesc;
@ -577,7 +578,6 @@ R_AliasSetupSkin (void)
void
R_AliasSetupLighting (alight_t *plighting)
{
// guarantee that no vertex will ever be lit below LIGHT_MIN, so we don't
// have to clamp off the bottom
r_ambientlight = plighting->ambientlight;

View file

@ -50,7 +50,7 @@ int r_skydirect; // not used?
byte bottomsky[128 * 131];
byte bottommask[128 * 131];
byte newsky[128 * 256]; // newsky and topsky both pack in here, 128
byte newsky[128 * 256]; // newsky and topsky both pack in here, 128
// bytes of newsky on the left of each scan,
// 128 bytes of topsky on the right, because
// the low-level drawers need 256-byte widths

View file

@ -110,7 +110,6 @@ R_ClipSpriteFace (int nump, clipplane_t *pclipplane)
if (dists[i] >= 0) {
memcpy (outstep, instep, sizeof (vec5_t));
outstep += sizeof (vec5_t) / sizeof (float);
outcount++;
}
@ -312,15 +311,15 @@ R_DrawSprite (void)
r_spritedesc.vup[1] = 0;
r_spritedesc.vup[2] = 1;
r_spritedesc.vright[0] = tvec[1];
// CrossProduct(r_spritedesc.vup, -modelorg,
//CrossProduct(r_spritedesc.vup, -modelorg,
r_spritedesc.vright[1] = -tvec[0];
// r_spritedesc.vright)
//r_spritedesc.vright)
r_spritedesc.vright[2] = 0;
VectorNormalize (r_spritedesc.vright);
r_spritedesc.vpn[0] = -r_spritedesc.vright[1];
r_spritedesc.vpn[1] = r_spritedesc.vright[0];
r_spritedesc.vpn[2] = 0;
// CrossProduct (r_spritedesc.vright, r_spritedesc.vup, r_spritedesc.vpn)
//CrossProduct (r_spritedesc.vright, r_spritedesc.vup, r_spritedesc.vpn)
} else if (psprite->type == SPR_VP_PARALLEL) {
// generate the sprite's axes, completely parallel to the viewplane.
// There are no problem situations, because the sprite is always in the
@ -347,14 +346,14 @@ R_DrawSprite (void)
r_spritedesc.vup[1] = 0;
r_spritedesc.vup[2] = 1;
r_spritedesc.vright[0] = vpn[1];
// CrossProduct (r_spritedesc.vup, vpn,
//CrossProduct (r_spritedesc.vup, vpn,
r_spritedesc.vright[1] = -vpn[0]; // r_spritedesc.vright)
r_spritedesc.vright[2] = 0;
VectorNormalize (r_spritedesc.vright);
r_spritedesc.vpn[0] = -r_spritedesc.vright[1];
r_spritedesc.vpn[1] = r_spritedesc.vright[0];
r_spritedesc.vpn[2] = 0;
// CrossProduct (r_spritedesc.vright, r_spritedesc.vup, r_spritedesc.vpn)
//CrossProduct (r_spritedesc.vright, r_spritedesc.vup, r_spritedesc.vpn)
} else if (psprite->type == SPR_ORIENTED) {
// generate the sprite's axes, according to the sprite's world
// orientation

View file

@ -37,6 +37,7 @@
#endif
#include "QF/compat.h"
#include "QF/model.h"
#include "QF/skin.h"
#include "QF/render.h"
@ -77,6 +78,12 @@ Skin_Do_Translation (skin_t *player_skin, int slot)
}
void
Skin_Do_Translation_Model (model_t *model, int skinnum, int slot)
{
}
void
Skin_Init_Translation (void)
{