qzdoom/src/hwrenderer/utility/hw_lighting.h
Christoph Oelckers dca4a42dd6 - changed light mode handling of the hardware renderer so that it only operates on local copies but doesn't alter the level's setting.
There are several places where a temporary change of light mode is needed, all these made this change in the global level struct. Now the change is only local to the active draw info.
2019-01-06 09:00:52 +01:00

21 lines
320 B
C

#pragma once
#include "c_cvars.h"
#include "v_palette.h"
#include "templates.h"
#include "r_utility.h"
struct Colormap;
inline int hw_ClampLight(int lightlevel)
{
return clamp(lightlevel, 0, 255);
}
EXTERN_CVAR(Int, gl_weaponlight);
inline int getExtraLight()
{
return r_viewpoint.extralight * gl_weaponlight;
}