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

Function GetSmallMapContoursPixels

src/smallmap_gui.cpp:429–433  ·  view source on GitHub ↗

* Return the colour a tile would be displayed with in the small map in mode "Contour". * @param tile The tile of which we would like to get the colour. * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Contour" */

Source from the content-addressed store, hash-verified

427 * @return The colour of tile in the small map in mode "Contour"
428 */
429static inline uint32_t GetSmallMapContoursPixels(TileIndex tile, TileType t)
430{
431 const SmallMapColourScheme *cs = &_heightmap_schemes[_settings_client.gui.smallmap_land_colour];
432 return ApplyMask(cs->height_colours[TileHeight(tile)], &_smallmap_contours_andor[t]);
433}
434
435/**
436 * Return the colour a tile would be displayed with in the small map in mode "Vehicles".

Callers 2

GetTileColoursMethod · 0.85

Calls 2

ApplyMaskFunction · 0.85
TileHeightFunction · 0.85

Tested by

no test coverage detected