mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 00:20:51 +00:00
- Fixed: LIGHT2SHADE would overflow with light values larger than 10 bits.
SVN r3339 (trunk)
This commit is contained in:
parent
1bdbfb360e
commit
2faf92858a
2 changed files with 8 additions and 8 deletions
|
@ -74,7 +74,7 @@ extern bool r_dontmaplines;
|
||||||
// Convert a light level into an unbounded colormap index (shade). Result is
|
// Convert a light level into an unbounded colormap index (shade). Result is
|
||||||
// fixed point. Why the +12? I wish I knew, but experimentation indicates it
|
// fixed point. Why the +12? I wish I knew, but experimentation indicates it
|
||||||
// is necessary in order to best reproduce Doom's original lighting.
|
// is necessary in order to best reproduce Doom's original lighting.
|
||||||
#define LIGHT2SHADE(l) ((NUMCOLORMAPS*2*FRACUNIT)-(((l)+12)*FRACUNIT*NUMCOLORMAPS/128))
|
#define LIGHT2SHADE(l) ((NUMCOLORMAPS*2*FRACUNIT)-(((l)+12)*(FRACUNIT*NUMCOLORMAPS/128)))
|
||||||
|
|
||||||
// MAXLIGHTSCALE from original DOOM, divided by 2.
|
// MAXLIGHTSCALE from original DOOM, divided by 2.
|
||||||
#define MAXLIGHTVIS (24*FRACUNIT)
|
#define MAXLIGHTVIS (24*FRACUNIT)
|
||||||
|
|
Loading…
Reference in a new issue