Fix the inverted lighting for sw32.

LordHavoc had made lighting positive for sw32, but I had done something in
the plugin code that broke that (probably something to do with the
colormap loading). Going back to id's original code fixes the issue.
This commit is contained in:
Bill Currie 2012-07-12 18:15:45 +09:00
parent 4a9d18ae40
commit a822a683cd

View file

@ -193,13 +193,12 @@ R_BuildLightMap (void)
if (surf->dlightframe == r_framecount)
R_AddDynamicLights ();
// LordHavoc: changed to positive (not inverse) lighting
for (i = 0; i < size; i++) {
t = bound(256, blocklights[i] >> (8 - VID_CBITS),
256 * (VID_GRADES - 1));
blocklights[i] = t;
}
/*
// // LordHavoc: changed to positive (not inverse) lighting
// for (i = 0; i < size; i++) {
// t = bound(256, blocklights[i] >> (8 - VID_CBITS),
// 256 * (VID_GRADES - 1));
// blocklights[i] = t;
// }
// bound, invert, and shift
for (i = 0; i < size; i++) {
t = (255 * 256 - blocklights[i]) >> (8 - VID_CBITS);
@ -209,7 +208,6 @@ R_BuildLightMap (void)
blocklights[i] = t;
}
*/
}
void