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

Function GetSnowLine

src/landscape.cpp:606–612  ·  view source on GitHub ↗

* Get the current snow line, either variable or static. * @return the snow line height. * @ingroup SnowLineGroup */

Source from the content-addressed store, hash-verified

604 * @ingroup SnowLineGroup
605 */
606uint8_t GetSnowLine()
607{
608 if (_snow_line == nullptr) return _settings_game.game_creation.snow_line_height;
609
610 TimerGameCalendar::YearMonthDay ymd = TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::date);
611 return _snow_line->table[ymd.month][ymd.day];
612}
613
614/**
615 * Get the highest possible snow line height, either variable or static.

Callers 14

PlantFarmFieldFunction · 0.85
TileLoop_TrackFunction · 0.85
TileLoop_TunnelBridgeFunction · 0.85
DrawWidgetMethod · 0.85
GetTerrainTypeFunction · 0.85
TileLoop_StationFunction · 0.85
TileLoopClearAlpsFunction · 0.85
PlaceTreesRandomlyFunction · 0.85
TileLoopTreesAlpsFunction · 0.85
UpdateTownGrowthFunction · 0.85
TileLoop_RoadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected