mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 00:41:24 +00:00
- moved shadeToLight out of build.h.
This commit is contained in:
parent
957f7e9487
commit
168b0385cf
11 changed files with 24 additions and 27 deletions
|
@ -98,4 +98,14 @@ inline int sectorofwall(int wallNum)
|
|||
return -1;
|
||||
}
|
||||
|
||||
extern int numshades;
|
||||
|
||||
// Return type is int because this gets passed to variadic functions where structs may produce undefined behavior.
|
||||
inline int shadeToLight(int shade)
|
||||
{
|
||||
shade = clamp(shade, 0, numshades - 1);
|
||||
int light = Scale(numshades - 1 - shade, 255, numshades - 1);
|
||||
return PalEntry(255, light, light, light);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue