mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-25 21:41:57 +00:00
finally. every condition I've been able to produce in start.bsp (quad jump to
the top of the map) works well. Depth issues have been taken care of as well (sort of: same problems as non-clipped skybox, but you don't get sky IN the map any more)
This commit is contained in:
parent
6ced43e560
commit
c90adba9dc
1 changed files with 8 additions and 6 deletions
|
@ -58,7 +58,7 @@ static const int faces_table[3][6] = {
|
|||
{-1, 2, 2, -1, 5, 5},
|
||||
};
|
||||
/* convert face magic bit mask to index into visit array */
|
||||
static const int faces_bit_magic[] = {3, 4, -1, 0, 2, -1, 1, -1};
|
||||
static const int faces_bit_magic[] = {2, 1, -1, 0, 3, -1, 4, -1};
|
||||
/* axis the cube face cuts (also index into vec3_t and n % 3 for 0 <= n < 6) */
|
||||
static const int face_axis[] = {0, 1, 2, 0, 1, 2};
|
||||
/* offset on the axis the cube face cuts */
|
||||
|
@ -431,12 +431,12 @@ process_corners (struct box_def *box)
|
|||
|
||||
} else {
|
||||
// 3 vertexen
|
||||
unsigned int sel = (((abs (visit[2].face - visit[0].face) == 3) << 4)
|
||||
| ((abs (visit[3].face - visit[1].face) == 3) << 3)
|
||||
| ((abs (visit[4].face - visit[2].face) == 3) << 2));
|
||||
unsigned int sel = (((abs (visit[2].face - visit[0].face) == 3) << 2)
|
||||
| ((abs (visit[3].face - visit[1].face) == 3) << 1)
|
||||
| ((abs (visit[4].face - visit[2].face) == 3) << 0));
|
||||
vec3_t v[3];
|
||||
center = faces_bit_magic[sel];
|
||||
//printf ("%02o %d %d %d %d %d %d\n", sel, center, visit[0].face, visit[1].face, visit[2].face, visit[3].face, visit[4].face);
|
||||
printf ("%02o %d %d %d %d %d %d\n", sel, center, visit[0].face, visit[1].face, visit[2].face, visit[3].face, visit[4].face);
|
||||
for (i = 0; i < 3; i++)
|
||||
find_cube_vertex (visit[center].face, visit[(center + 1 + i) % 5].face, visit[(center + 2 + i) % 5].face, v[i]);
|
||||
insert_cube_vertexen (box, visit[center], 3, v[0], v[1], v[2]);
|
||||
|
@ -604,6 +604,7 @@ R_DrawSkyChain (msurface_t *sky_chain)
|
|||
{
|
||||
msurface_t *sc = sky_chain;
|
||||
if (skyloaded) {
|
||||
glDepthRange (gldepthmax, gldepthmax);
|
||||
while (sc) {
|
||||
glpoly_t *p = sc->polys;
|
||||
while (p) {
|
||||
|
@ -612,6 +613,7 @@ R_DrawSkyChain (msurface_t *sky_chain)
|
|||
}
|
||||
sc = sc->texturechain;
|
||||
}
|
||||
glDepthRange (gldepthmin, gldepthmax);
|
||||
} else {
|
||||
while (sc) {
|
||||
glpoly_t *p = sc->polys;
|
||||
|
@ -622,7 +624,7 @@ R_DrawSkyChain (msurface_t *sky_chain)
|
|||
sc = sc->texturechain;
|
||||
}
|
||||
}
|
||||
#if 1
|
||||
#if 0
|
||||
glDisable (GL_TEXTURE_2D);
|
||||
sc = sky_chain;
|
||||
glColor3f (1, 1, 1);
|
||||
|
|
Loading…
Reference in a new issue