MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / UpdateLights

Method UpdateLights

Source/GridModule.cpp:111–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111void GridModule::UpdateLights()
112{
113 if (!mGridControlTarget)
114 return;
115
116 for (int x = 0; x < GetCols(); ++x)
117 {
118 for (int y = 0; y < GetRows(); ++y)
119 {
120 if (mGridControlTarget->GetGridController())
121 {
122 if (mDirectColorMode)
123 mGridControlTarget->GetGridController()->SetLightDirect(x, y, Get(x, y) * 127);
124 else
125 mGridControlTarget->GetGridController()->SetLight(x, y, Get(x, y) > 0 ? kGridColor1Bright : kGridColorOff);
126 }
127 }
128 }
129}
130
131void GridModule::DrawModule()
132{

Callers

nothing calls this directly

Calls 3

GetGridControllerMethod · 0.80
SetLightDirectMethod · 0.45
SetLightMethod · 0.45

Tested by

no test coverage detected