Revert an optimization that impacts legibility more than performance.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-10-06 00:31:57 +00:00
parent 7813b9c1b7
commit 8afd4a870e

View file

@ -233,40 +233,28 @@ set_vertex (struct box_def *box, int face, int ind, vec3_t v)
VectorAdd (v, r_refdef.vieworg, box->face[face].poly.verts[ind]);
switch (face) {
case 0:
box->face[face].poly.verts[ind][3] = (1024 - v[1] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][3] = (1024 - v[1] + 4) / BOX_WIDTH;
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) / BOX_WIDTH;
break;
case 1:
box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) / BOX_WIDTH;
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) / BOX_WIDTH;
break;
case 2:
box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 + v[1] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) / BOX_WIDTH;
box->face[face].poly.verts[ind][4] = (1024 + v[1] + 4) / BOX_WIDTH;
break;
case 3:
box->face[face].poly.verts[ind][3] = (1024 + v[1] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][3] = (1024 + v[1] + 4) / BOX_WIDTH;
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) / BOX_WIDTH;
break;
case 4:
box->face[face].poly.verts[ind][3] = (1024 - v[0] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][3] = (1024 - v[0] + 4) / BOX_WIDTH;
box->face[face].poly.verts[ind][4] = (1024 - v[2] + 4) / BOX_WIDTH;
break;
case 5:
box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][4] = (1024 - v[1] + 4) *
(1.0 / BOX_WIDTH);
box->face[face].poly.verts[ind][3] = (1024 + v[0] + 4) / BOX_WIDTH;
box->face[face].poly.verts[ind][4] = (1024 - v[1] + 4) / BOX_WIDTH;
break;
}
}