MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetColourGradient

Function GetColourGradient

src/palette.cpp:388–391  ·  view source on GitHub ↗

* Get colour gradient palette index. * @param colour Colour. * @param shade Shade level from 1 to 7. * @returns palette index of colour. */

Source from the content-addressed store, hash-verified

386 * @returns palette index of colour.
387 */
388PixelColour GetColourGradient(Colours colour, ColourShade shade)
389{
390 return ColourGradients::gradient[colour % COLOUR_END][shade % SHADE_END];
391}
392
393/**
394 * Set colour gradient palette index.

Callers 15

DrawMethod · 0.85
DrawDetailsMethod · 0.85
IsValidConsoleColourFunction · 0.85
DrawWidgetMethod · 0.85
DrawMethod · 0.85
DrawWidgetMethod · 0.85
DrawEditBoxMethod · 0.85
DrawMethod · 0.85
DrawWidgetMethod · 0.85
DrawGroupInfoMethod · 0.85
DrawWidgetMethod · 0.85
DrawWidgetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected