gl schematics 2.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@666 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-21 04:33:45 +00:00
parent 47afae3dfe
commit 2216d9c0c0

View file

@ -284,14 +284,11 @@ static void PPL_BaseChain_NoBump_1TMU(msurface_t *first, texture_t *tex)
glBlendFunc (GL_ZERO, GL_SRC_COLOR);
else if (gl_lightmap_format == GL_INTENSITY)
{
GL_TexEnv(GL_MODULATE);
glColor4f (0,0,0,1);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
else if (gl_lightmap_format == GL_RGBA)
{
glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA);
}
glTexCoordPointer(2, GL_FLOAT, sizeof(surfvertexarray_t), varray_v->stl);
@ -2492,6 +2489,8 @@ void PPL_SchematicsTextureChain(msurface_t *first)
frow=frow/2+0.5;
glColor3f(frow, frow, 0);
if (gl_schematics.value != 2)
{
glBegin(GL_QUADS);
for (s = first; s ; s=s->texturechain)
{
@ -2527,6 +2526,7 @@ void PPL_SchematicsTextureChain(msurface_t *first)
}
}
glEnd();
}
glDisable(GL_POLYGON_OFFSET_FILL);
glEnable(GL_POLYGON_OFFSET_LINE);
@ -2544,8 +2544,14 @@ void PPL_SchematicsTextureChain(msurface_t *first)
VectorSubtract(s->polys->verts[v2], s->polys->verts[v1], dir);
len = Length(dir);
VectorNormalize(dir);
if (gl_schematics.value != 2)
{
sprintf(str, "%i", (len<1)?1:(int)len);
sl = strlen(str);
}
else
sl = 0;
//left side. (find arrowhead part)
VectorMA(s->polys->verts[v1], 4, s->normal, pos);
@ -2559,14 +2565,15 @@ void PPL_SchematicsTextureChain(msurface_t *first)
glVertex3fv(v);
glVertex3fv(pos);
//the line
glVertex3fv(pos);
VectorMA(pos, len/2 - sl*4, dir, pos);
glVertex3fv(pos);
//right hand side.
VectorMA(s->polys->verts[v2], 4, s->normal, pos);
VectorMA(pos, 4, dir, v);
VectorMA(pos, -4, dir, v);
VectorMA(v, -4, s->normal, v);
glVertex3fv(v);
glVertex3fv(pos);
@ -2575,6 +2582,7 @@ void PPL_SchematicsTextureChain(msurface_t *first)
glVertex3fv(v);
glVertex3fv(pos);
//the line
glVertex3fv(pos);
VectorMA(pos, -(len/2 - sl*4), dir, pos);
glVertex3fv(pos);
@ -2923,11 +2931,11 @@ void PPL_RecursiveWorldNodeQ2_r (mnode_t *node)
{
if (surf->shadowframe != r_shadowframe)
continue;
/*
if (surf->lightframe == r_shadowframe) //done this one!
continue;
surf->lightframe = r_shadowframe;
*/
// if ((dot < 0) ^ !!(surf->flags & SURF_PLANEBACK))
// continue; // wrong side