Whitespace.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-10-02 06:58:44 +00:00
parent 820fcbb8d2
commit 9c21edc6d0

View file

@ -233,28 +233,40 @@ set_vertex (struct box_def *box, int face, int ind, vec3_t v)
VectorAdd (v, r_refdef.vieworg, box->face[face].poly.verts[ind]); VectorAdd (v, r_refdef.vieworg, box->face[face].poly.verts[ind]);
switch (face) { switch (face) {
case 0: case 0:
box->face[face].poly.verts[ind][3] = (1024 - v[1] + 4) / BOX_WIDTH; box->face[face].poly.verts[ind][3] = (1024 - v[1] + 4) *
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) / BOX_WIDTH; (1 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) *
(1 / BOX_WIDTH);
break; break;
case 1: case 1:
box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) / BOX_WIDTH; box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) *
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) / BOX_WIDTH; (1 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) *
(1 / BOX_WIDTH);
break; break;
case 2: case 2:
box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) / BOX_WIDTH; box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) *
box->face[face].poly.verts[ind][4] = (1024 + v[1] + 4) / BOX_WIDTH; (1 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 + v[1] + 4) *
(1 / BOX_WIDTH);
break; break;
case 3: case 3:
box->face[face].poly.verts[ind][3] = (1024 + v[1] + 4) / BOX_WIDTH; box->face[face].poly.verts[ind][3] = (1024 + v[1] + 4) *
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) / BOX_WIDTH; (1 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) *
(1 / BOX_WIDTH);
break; break;
case 4: case 4:
box->face[face].poly.verts[ind][3] = (1024 - v[0] + 4) / BOX_WIDTH; box->face[face].poly.verts[ind][3] = (1024 - v[0] + 4) *
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) / BOX_WIDTH; (1 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) *
(1 / BOX_WIDTH);
break; break;
case 5: case 5:
box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) / BOX_WIDTH; box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) *
box->face[face].poly.verts[ind][4] = (1024 - v[1] + 4) / BOX_WIDTH; (1 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[1] + 4) *
(1 / BOX_WIDTH);
break; break;
} }
} }
@ -288,7 +300,8 @@ insert_cube_vertices (struct box_def *box, struct visit_def visit, int count,
#ifdef __BORLANDC__ #ifdef __BORLANDC__
// This is fix for borland alloca "feature" which fails to restore stack // This is fix for borland alloca "feature" which fails to restore stack
// correcly if calling function doesn't have any references to local variables. // correctly if calling function doesn't have any references to local
// variables.
char dummy[5]; char dummy[5];
dummy[0]=0; dummy[0]=0;
@ -304,13 +317,12 @@ insert_cube_vertices (struct box_def *box, struct visit_def visit, int count,
if (ind == box->face[face].poly.numverts) { if (ind == box->face[face].poly.numverts) {
// the vertex the sky poly left this cube fase through is very // the vertex the sky poly left this cube fase through is very
// conveniently the last vertex of the face poly. this means we // conveniently the last vertex of the face poly. this means we can
// can just append the vetexen // just append the vetexen
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
add_vertex (box, face, *v[i]); add_vertex (box, face, *v[i]);
} else { } else {
// we have to insert the cube vertices into the face poly // we have to insert the cube vertices into the face poly vertex list
// vertex list
glpoly_t *p = &box->face[face].poly; glpoly_t *p = &box->face[face].poly;
int c = p->numverts - ind; int c = p->numverts - ind;
const int vert_size = sizeof (p->verts[0]); const int vert_size = sizeof (p->verts[0]);
@ -413,8 +425,7 @@ process_corners (struct box_def *box)
int sum, diff; int sum, diff;
vec3_t v[4]; vec3_t v[4];
sum = sum = visit[0].face + visit[1].face + visit[2].face +
visit[0].face + visit[1].face + visit[2].face +
visit[3].face; visit[3].face;
diff = visit[1].face - visit[0].face; diff = visit[1].face - visit[0].face;
sum %= 3; sum %= 3;
@ -474,7 +485,6 @@ process_corners (struct box_def *box)
insert_cube_vertices (box, visit[i], 1, v); insert_cube_vertices (box, visit[i], 1, v);
insert_cube_vertices (box, visit[(i + 1) % 5], 1, v); insert_cube_vertices (box, visit[(i + 1) % 5], 1, v);
insert_cube_vertices (box, visit[(i + 4) % 5], 1, v); insert_cube_vertices (box, visit[(i + 4) % 5], 1, v);
} else { } else {
// 3 vertices // 3 vertices
unsigned int sel = unsigned int sel =
@ -731,7 +741,7 @@ R_DrawSkyChain (msurface_t *sky_chain)
} else if (gl_sky_clip->int_val == 2) { } else if (gl_sky_clip->int_val == 2) {
float speedscale; float speedscale;
speedscale = r_realtime*8; speedscale = r_realtime * 8;
speedscale -= (int)speedscale & ~127 ; speedscale -= (int)speedscale & ~127 ;
qfglBindTexture (GL_TEXTURE_2D, solidskytexture); qfglBindTexture (GL_TEXTURE_2D, solidskytexture);
@ -743,7 +753,7 @@ R_DrawSkyChain (msurface_t *sky_chain)
if (gl_skymultipass->int_val) { if (gl_skymultipass->int_val) {
sc = sky_chain; sc = sky_chain;
speedscale = r_realtime*16; speedscale = r_realtime * 16;
speedscale -= (int)speedscale & ~127 ; speedscale -= (int)speedscale & ~127 ;
qfglBindTexture (GL_TEXTURE_2D, alphaskytexture); qfglBindTexture (GL_TEXTURE_2D, alphaskytexture);