2018-04-26 22:22:00 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-04-27 18:28:59 +00:00
|
|
|
#include "c_cvars.h"
|
2018-04-26 22:22:00 +00:00
|
|
|
#include "v_palette.h"
|
|
|
|
#include "templates.h"
|
2018-04-27 18:28:59 +00:00
|
|
|
#include "r_utility.h"
|
2018-04-26 22:22:00 +00:00
|
|
|
|
|
|
|
struct Colormap;
|
|
|
|
|
2018-09-08 11:08:04 +00:00
|
|
|
int hw_CalcLightLevel(int lightlevel, int rellight, bool weapon, int blendfactor);
|
2018-04-26 22:22:00 +00:00
|
|
|
PalEntry hw_CalcLightColor(int light, PalEntry pe, int blendfactor);
|
2018-09-08 11:08:04 +00:00
|
|
|
float hw_GetFogDensity(int lightlevel, PalEntry fogcolor, int sectorfogdensity, int blendfactor);
|
2018-04-26 22:22:00 +00:00
|
|
|
bool hw_CheckFog(sector_t *frontsector, sector_t *backsector);
|
|
|
|
|
|
|
|
inline int hw_ClampLight(int lightlevel)
|
|
|
|
{
|
|
|
|
return clamp(lightlevel, 0, 255);
|
|
|
|
}
|
|
|
|
|
2018-04-27 18:28:59 +00:00
|
|
|
EXTERN_CVAR(Int, gl_weaponlight);
|
|
|
|
|
|
|
|
inline int getExtraLight()
|
|
|
|
{
|
|
|
|
return r_viewpoint.extralight * gl_weaponlight;
|
|
|
|
}
|
|
|
|
|