MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / updateTreeColours

Function updateTreeColours

src/OpenLoco/src/Ui/Windows/TerraForm.cpp:168–180  ·  view source on GitHub ↗

0x004BB6B2

Source from the content-addressed store, hash-verified

166
167 // 0x004BB6B2
168 static void updateTreeColours(Window& self)
169 {
170 if (self.rowHover != -1)
171 {
172 auto treeObj = ObjectManager::get<TreeObject>(self.rowHover);
173 if (treeObj->colours != 0)
174 {
175 auto bit = Numerics::bitScanReverse(treeObj->colours);
176 auto colour = bit == -1 ? Colour::black : static_cast<Colour>(bit);
177 _treeColour = colour;
178 }
179 }
180 }
181
182 // 0x004BC4B7
183 static void updateActiveThumb(Window& self)

Callers 3

refreshTreeListFunction · 0.85
tabResetFunction · 0.85
scrollMouseDownFunction · 0.85

Calls 1

bitScanReverseFunction · 0.85

Tested by

no test coverage detected