|
OpenTTD Source 20251117-master-g7398d2e290
|
Data Structures | |
| struct | SnowLine |
| Structure describing the height of the snow line each day of the year. More... | |
Functions | |
| bool | IsSnowLineSet () |
| Has a snow line table already been loaded. | |
| void | SetSnowLine (std::unique_ptr< SnowLine > &&snow_line) |
| Set a variable snow line, as loaded from a newgrf file. | |
| uint8_t | GetSnowLine () |
| Get the current snow line, either variable or static. | |
| uint8_t | HighestSnowLine () |
| Get the highest possible snow line height, either variable or static. | |
| uint8_t | LowestSnowLine () |
| Get the lowest possible snow line height, either variable or static. | |
| void | ClearSnowLine () |
| Clear the variable snow line table and free the memory. | |
Variables | |
| static std::unique_ptr< SnowLine > | _snow_line |
| Description of the snow line throughout the year. | |
| void ClearSnowLine | ( | ) |
Clear the variable snow line table and free the memory.
Definition at line 636 of file landscape.cpp.
References _snow_line.
Referenced by ResetNewGRFData().
| uint8_t GetSnowLine | ( | ) |
Get the current snow line, either variable or static.
Definition at line 604 of file landscape.cpp.
References _settings_game, _snow_line, TimerGameCalendar::ConvertDateToYMD(), TimerGameCalendar::date, GameSettings::game_creation, and GameCreationSettings::snow_line_height.
Referenced by TownViewWindow::DrawWidget(), GetGlobalVariable(), GetTerrainType(), PlaceTreesRandomly(), SplitGroundSpriteForOverlay(), TileLoopClearAlps(), and UpdateTownGrowth().
| uint8_t HighestSnowLine | ( | ) |
Get the highest possible snow line height, either variable or static.
Definition at line 617 of file landscape.cpp.
References _settings_game, _snow_line, GameSettings::game_creation, and GameCreationSettings::snow_line_height.
Referenced by CheckNewIndustry_Farm(), CheckNewIndustry_Forest(), and TryBuildTownHouse().
| bool IsSnowLineSet | ( | ) |
Has a snow line table already been loaded.
Definition at line 584 of file landscape.cpp.
References _snow_line.
Referenced by GlobalVarChangeInfo().
| uint8_t LowestSnowLine | ( | ) |
Get the lowest possible snow line height, either variable or static.
Definition at line 627 of file landscape.cpp.
References _settings_game, _snow_line, GameSettings::game_creation, and GameCreationSettings::snow_line_height.
Referenced by TownViewWindow::DrawWidget(), and TownViewWindow::GetDesiredInfoHeight().
| void SetSnowLine | ( | std::unique_ptr< SnowLine > && | snow_line | ) |
Set a variable snow line, as loaded from a newgrf file.
| snow_line | The new snow line configuration. |
Definition at line 594 of file landscape.cpp.
References _snow_line.
Referenced by GlobalVarChangeInfo().
|
static |
Description of the snow line throughout the year.
If it is nullptr, a static snowline height is used, as set by _settings_game.game_creation.snow_line_height. Otherwise it points to a table loaded from a newGRF file that describes the variable snowline.
Definition at line 98 of file landscape.cpp.
Referenced by ClearSnowLine(), GetSnowLine(), HighestSnowLine(), IsSnowLineSet(), LowestSnowLine(), and SetSnowLine().