mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
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:
parent
26a1533f97
commit
5baf239a6d
1 changed files with 20 additions and 8 deletions
|
@ -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_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)
|
||||
for (i=0 ; i<size ; i++)
|
||||
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)
|
||||
for (i=0 ; i<size ; i++)
|
||||
blueblklights[i] += lightmap[i] * scale;
|
||||
}
|
||||
lightmap += size; // skip to next lightmap
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue