- move more of the light calculation code to the drawerargs

This commit is contained in:
Magnus Norddahl 2018-12-18 00:37:50 +01:00
commit efb8e39aa9
26 changed files with 202 additions and 279 deletions

View file

@ -323,12 +323,8 @@ namespace swrenderer
}
SpriteDrawerArgs drawerargs;
drawerargs.SetLight(vis->Light.BaseColormap, 0, vis->Light.ColormapNum << FRACBITS);
drawerargs.SetDynamicLight(dynlightcolor);
FDynamicColormap *basecolormap = static_cast<FDynamicColormap*>(vis->Light.BaseColormap);
bool visible = drawerargs.SetStyle(thread->Viewport.get(), vis->RenderStyle, vis->Alpha, vis->Translation, vis->FillColor, basecolormap, vis->Light.ColormapNum << FRACBITS);
bool visible = drawerargs.SetStyle(thread->Viewport.get(), vis->RenderStyle, vis->Alpha, vis->Translation, vis->FillColor, vis->Light);
if (visible)
{