OpenTTD Source
1.11.0-beta2
|
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. More... | |
void | SetSnowLine (byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]) |
Set a variable snow line, as loaded from a newgrf file. More... | |
byte | GetSnowLine () |
Get the current snow line, either variable or static. More... | |
byte | HighestSnowLine () |
Get the highest possible snow line height, either variable or static. More... | |
byte | LowestSnowLine () |
Get the lowest possible snow line height, either variable or static. More... | |
void | ClearSnowLine () |
Clear the variable snow line table and free the memory. | |
Variables | |
static SnowLine * | _snow_line = nullptr |
Description of the snow line throughout the year. More... | |
byte GetSnowLine | ( | ) |
Get the current snow line, either variable or static.
Definition at line 644 of file landscape.cpp.
References _date, _settings_game, _snow_line, ConvertDateToYMD(), YearMonthDay::day, GameSettings::game_creation, YearMonthDay::month, GameCreationSettings::snow_line_height, and SnowLine::table.
Referenced by TileLoopClearAlps().
byte HighestSnowLine | ( | ) |
Get the highest possible snow line height, either variable or static.
Definition at line 658 of file landscape.cpp.
References _settings_game, _snow_line, GameSettings::game_creation, SnowLine::highest_value, and GameCreationSettings::snow_line_height.
bool IsSnowLineSet | ( | ) |
Has a snow line table already been loaded.
Definition at line 615 of file landscape.cpp.
References _snow_line.
byte LowestSnowLine | ( | ) |
Get the lowest possible snow line height, either variable or static.
Definition at line 668 of file landscape.cpp.
References _settings_game, _snow_line, GameSettings::game_creation, SnowLine::lowest_value, and GameCreationSettings::snow_line_height.
void SetSnowLine | ( | byte | table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS] | ) |
Set a variable snow line, as loaded from a newgrf file.
table | the 12 * 32 byte table containing the snowline for each day |
Definition at line 625 of file landscape.cpp.
References _snow_line, SnowLine::highest_value, SnowLine::lowest_value, SNOW_LINE_DAYS, SNOW_LINE_MONTHS, and SnowLine::table.
|
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 88 of file landscape.cpp.
Referenced by ClearSnowLine(), GetSnowLine(), HighestSnowLine(), IsSnowLineSet(), LowestSnowLine(), and SetSnowLine().