MCPcopy Create free account
hub / github.com/DFHack/dfhack / getSkyColor

Method getSkyColor

plugins/rendermax/renderer_light.cpp:592–608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590 }
591}
592rgbf lightingEngineViewscreen::getSkyColor(float v)
593{
594 if(dayColors.size()<2)
595 {
596 v=abs(fmod(v+0.5,1)-0.5)*2;
597 return rgbf(v,v,v);
598 }
599 else
600 {
601 float pos=v*(dayColors.size()-1);
602 int pre=floor(pos);
603 pos-=pre;
604 if(pre==int(dayColors.size())-1)
605 return dayColors[pre];
606 return dayColors[pre]*(1-pos)+dayColors[pre+1]*pos;
607 }
608}
609void lightingEngineViewscreen::doOcupancyAndLights()
610{
611 float daycol;

Callers

nothing calls this directly

Calls 2

rgbfClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected