Tiny speedup.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@668 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-21 04:34:58 +00:00
parent 26a1533f97
commit 5baf239a6d

View file

@ -881,6 +881,17 @@ void GLR_BuildLightMap (msurface_t *surf, qbyte *dest, qbyte *deluxdest, stmap *
surf->cached_light[maps] = scale; // 8.8 fraction surf->cached_light[maps] = scale; // 8.8 fraction
surf->cached_colour[maps] = cl_lightstyle[surf->styles[maps]].colour; surf->cached_colour[maps] = cl_lightstyle[surf->styles[maps]].colour;
if (cl_lightstyle[surf->styles[maps]].colour == 7) //hopefully a faster alternative.
{
for (i=0 ; i<size ; i++)
{
blocklights[i] += lightmap[i] * scale;
greenblklights[i] += lightmap[i] * scale;
blueblklights[i] += lightmap[i] * scale;
}
}
else
{
if (cl_lightstyle[surf->styles[maps]].colour & 1) if (cl_lightstyle[surf->styles[maps]].colour & 1)
for (i=0 ; i<size ; i++) for (i=0 ; i<size ; i++)
blocklights[i] += lightmap[i] * scale; blocklights[i] += lightmap[i] * scale;
@ -890,6 +901,7 @@ void GLR_BuildLightMap (msurface_t *surf, qbyte *dest, qbyte *deluxdest, stmap *
if (cl_lightstyle[surf->styles[maps]].colour & 4) if (cl_lightstyle[surf->styles[maps]].colour & 4)
for (i=0 ; i<size ; i++) for (i=0 ; i<size ; i++)
blueblklights[i] += lightmap[i] * scale; blueblklights[i] += lightmap[i] * scale;
}
lightmap += size; // skip to next lightmap lightmap += size; // skip to next lightmap
} }
} }