mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +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
14
src/r_defs.h
14
src/r_defs.h
|
@ -907,13 +907,13 @@ struct line_t
|
|||
side_t *sidedef[2];
|
||||
//DWORD sidenum[2]; // sidenum[1] will be NO_SIDE if one sided
|
||||
fixed_t bbox[4]; // bounding box, for the extent of the LineDef.
|
||||
slopetype_t slopetype; // To aid move clipping.
|
||||
sector_t *frontsector, *backsector;
|
||||
int validcount; // if == validcount, already checked
|
||||
int locknumber; // [Dusk] lock number for special
|
||||
};
|
||||
|
||||
// phares 3/14/98
|
||||
slopetype_t slopetype; // To aid move clipping.
|
||||
sector_t *frontsector, *backsector;
|
||||
int validcount; // if == validcount, already checked
|
||||
int locknumber; // [Dusk] lock number for special
|
||||
};
|
||||
|
||||
// phares 3/14/98
|
||||
//
|
||||
// Sector list node showing all sectors an object appears in.
|
||||
//
|
||||
|
|
|
@ -74,7 +74,7 @@ extern bool r_dontmaplines;
|
|||
// 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
|
||||
// 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.
|
||||
#define MAXLIGHTVIS (24*FRACUNIT)
|
||||
|
|
Loading…
Reference in a new issue