mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-02 04:32:24 +00:00
Back out Chris Ison's patch, make another change for readability (in this
case, 255 << 8 is more readable than 255*256, and was the intent anyway)
This commit is contained in:
parent
50abe6080e
commit
cbc9d34954
1 changed files with 15 additions and 13 deletions
|
@ -254,15 +254,23 @@ R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
|
|||
if (!cl.worldmodel->lightdata) {
|
||||
bl = blocklights;
|
||||
for (i=0 ; i<size ; i++) {
|
||||
*bl++ = 255*256;
|
||||
*bl++ = 255*256;
|
||||
*bl++ = 255*256;
|
||||
*bl++ = 255 << 8;
|
||||
*bl++ = 255 << 8;
|
||||
*bl++ = 255 << 8;
|
||||
}
|
||||
goto store;
|
||||
}
|
||||
|
||||
// add all the lightmaps
|
||||
// clear to no light
|
||||
bl = blocklights;
|
||||
for (i=0; i < size; i++) {
|
||||
*bl++ = 0;
|
||||
*bl++ = 0;
|
||||
*bl++ = 0;
|
||||
}
|
||||
bl = blocklights;
|
||||
|
||||
// add all the lightmaps
|
||||
if (lightmap) {
|
||||
for (maps = 0;
|
||||
maps < MAXLIGHTMAPS && surf->styles[maps] != 255;
|
||||
|
@ -271,17 +279,11 @@ R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
|
|||
surf->cached_light[maps] = scale; // 8.8 fraction
|
||||
bl = blocklights;
|
||||
for (i = 0; i < size; i++) {
|
||||
*bl++ = *lightmap++ * scale;
|
||||
*bl++ = *lightmap++ * scale;
|
||||
*bl++ = *lightmap++ * scale;
|
||||
*bl++ += *lightmap++ * scale;
|
||||
*bl++ += *lightmap++ * scale;
|
||||
*bl++ += *lightmap++ * scale;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < size; i++) {
|
||||
*bl++ = 0;
|
||||
*bl++ = 0;
|
||||
*bl++ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// add all the dynamic lights
|
||||
|
|
Loading…
Reference in a new issue