Added R_SetColorMapLight and R_SetDSColorMapLight

This commit is contained in:
Magnus Norddahl 2016-05-31 01:49:39 +02:00
commit 20b7743ec3
10 changed files with 162 additions and 183 deletions

View file

@ -4601,3 +4601,30 @@ bool R_GetTransMaskDrawers (fixed_t (**tmvline1)(), void (**tmvline4)())
return false;
}
void R_SetColorMapLight(BYTE *basecolormapdata, float light, int shade)
{
if (r_swtruecolor)
{
dc_colormap = basecolormapdata;
dc_light = LIGHTSCALE(light, shade);
}
else
{
dc_colormap = basecolormapdata + (GETPALOOKUP(light, shade) << COLORMAPSHIFT);
dc_light = 0;
}
}
void R_SetDSColorMapLight(BYTE *basecolormapdata, float light, int shade)
{
if (r_swtruecolor)
{
ds_colormap = basecolormapdata;
ds_light = LIGHTSCALE(light, shade);
}
else
{
ds_colormap = basecolormapdata + (GETPALOOKUP(light, shade) << COLORMAPSHIFT);
ds_light = 0;
}
}