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

Function DrawRoadAsSnowOrDesert

src/road_cmd.cpp:1353–1358  ·  view source on GitHub ↗

* Should the road be drawn as a unpaved snow/desert road? * By default, roads are always drawn as unpaved if they are on desert or * above the snow line, but NewGRFs can override this for desert. * * @param snow_or_desert Is snowy or desert tile * @param roadside What sort of road this is * @return True if snow/desert road sprites should be used. */

Source from the content-addressed store, hash-verified

1351 * @return True if snow/desert road sprites should be used.
1352 */
1353static bool DrawRoadAsSnowOrDesert(bool snow_or_desert, Roadside roadside)
1354{
1355 return (snow_or_desert &&
1356 !(_settings_game.game_creation.landscape == LandscapeType::Tropic && HasGrfMiscBit(GrfMiscBit::DesertPavedRoads) &&
1357 roadside != Roadside::Barren && roadside != Roadside::Grass && roadside != Roadside::GrassRoadWorks));
1358}
1359
1360/**
1361 * Draws the catenary for the RoadType of the given tile

Callers 2

GetRoadGroundSpriteFunction · 0.85
DrawTile_RoadFunction · 0.85

Calls 1

HasGrfMiscBitFunction · 0.85

Tested by

no test coverage detected