Whitespace.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-11-25 08:00:16 +00:00
parent 1cdf7fa55f
commit dea0a2c08d

View file

@ -647,21 +647,20 @@ R_DrawSkyBoxPoly (glpoly_t *poly)
void void
EmitSkyPolys (float speedscale, msurface_t *fa) EmitSkyPolys (float speedscale, msurface_t *fa)
{ {
glpoly_t *p; float length, s, t;
float *v; float *v;
int i; int i;
float s, t; glpoly_t *p;
vec3_t dir; vec3_t dir;
float length;
for (p = fa->polys; p; p = p->next) { for (p = fa->polys; p; p = p->next) {
qfglBegin (GL_POLYGON); qfglBegin (GL_POLYGON);
for (i = 0, v = p->verts[0]; i < p->numverts; i++, v += VERTEXSIZE) { for (i = 0, v = p->verts[0]; i < p->numverts; i++, v += VERTEXSIZE) {
VectorSubtract (v, r_origin, dir); VectorSubtract (v, r_origin, dir);
dir[2] *= 3; // flatten the sphere dir[2] *= 3.0; // flatten the sphere
length = DotProduct (dir, dir); length = DotProduct (dir, dir);
length = 2.95 / sqrt (length); length = 2.953125 / sqrt (length);
dir[0] *= length; dir[0] *= length;
dir[1] *= length; dir[1] *= length;
@ -715,7 +714,7 @@ draw_skybox_sky_polys (msurface_t *sky_chain)
{ {
msurface_t *sc = sky_chain; msurface_t *sc = sky_chain;
//qfglDepthRange (gldepthmax, gldepthmax); // qfglDepthRange (gldepthmax, gldepthmax);
qfglDepthMask (GL_FALSE); qfglDepthMask (GL_FALSE);
qfglDisable (GL_DEPTH_TEST); qfglDisable (GL_DEPTH_TEST);
while (sc) { while (sc) {
@ -729,7 +728,7 @@ draw_skybox_sky_polys (msurface_t *sky_chain)
} }
qfglEnable (GL_DEPTH_TEST); qfglEnable (GL_DEPTH_TEST);
qfglDepthMask (GL_TRUE); qfglDepthMask (GL_TRUE);
//qfglDepthRange (gldepthmin, gldepthmax); // qfglDepthRange (gldepthmin, gldepthmax);
} }
static void static void
@ -821,6 +820,7 @@ R_DrawSkyChain (msurface_t *sky_chain)
while (p) { while (p) {
int i; int i;
qfglBegin (GL_POLYGON); qfglBegin (GL_POLYGON);
for (i = 0; i < p->numverts; i++) { for (i = 0; i < p->numverts; i++) {
qfglVertex3fv (p->verts[i]); qfglVertex3fv (p->verts[i]);
@ -837,8 +837,10 @@ R_DrawSkyChain (msurface_t *sky_chain)
qfglColor3ubv (255, 255, 255); qfglColor3ubv (255, 255, 255);
while (sc) { while (sc) {
glpoly_t *p = sc->polys; glpoly_t *p = sc->polys;
while (p) { while (p) {
int i; int i;
qfglBegin (GL_LINE_LOOP); qfglBegin (GL_LINE_LOOP);
for (i = 0; i < p->numverts; i++) { for (i = 0; i < p->numverts; i++) {
qfglVertex3fv (p->verts[i]); qfglVertex3fv (p->verts[i]);
@ -853,9 +855,11 @@ R_DrawSkyChain (msurface_t *sky_chain)
qfglBegin (GL_POINTS); qfglBegin (GL_POINTS);
while (sc) { while (sc) {
glpoly_t *p = sc->polys; glpoly_t *p = sc->polys;
while (p) { while (p) {
int i; int i;
vec3_t x, c = { 0, 0, 0 }; vec3_t x, c = { 0, 0, 0 };
for (i = 0; i < p->numverts; i++) { for (i = 0; i < p->numverts; i++) {
VectorSubtract (p->verts[i], r_refdef.vieworg, x); VectorSubtract (p->verts[i], r_refdef.vieworg, x);
VectorAdd (x, c, c); VectorAdd (x, c, c);
@ -870,9 +874,11 @@ R_DrawSkyChain (msurface_t *sky_chain)
qfglEnd (); qfglEnd ();
if (skyloaded) { if (skyloaded) {
int i, j; int i, j;
qfglColor3ubv (255, 0, 0); qfglColor3ubv (255, 0, 0);
for (i = 0; i < 6; i++) { for (i = 0; i < 6; i++) {
vec3_t v; vec3_t v;
qfglBegin (GL_LINE_LOOP); qfglBegin (GL_LINE_LOOP);
for (j = 0; j < 4; j++) { for (j = 0; j < 4; j++) {
VectorScale (&skyvec[i][j][2], 1.0 / 128.0, v); VectorScale (&skyvec[i][j][2], 1.0 / 128.0, v);