OpenTTD Source 20250205-master-gfd85ab1e2c
|
Template class for time constants shared by both Calendar and Economy time. More...
#include <timer_game_common.h>
Static Public Attributes | |
static constexpr int | DAYS_IN_YEAR = 365 |
days per year | |
static constexpr int | DAYS_IN_LEAP_YEAR = 366 |
sometimes, you need one day more... | |
static constexpr int | MONTHS_IN_YEAR = 12 |
months per year | |
static constexpr int | SECONDS_PER_DAY = 2 |
approximate seconds per day, not for precise calculations | |
static constexpr TimerGame< T >::Year | ORIGINAL_BASE_YEAR {1920} |
The minimum starting year/base year of the original TTD. | |
static constexpr TimerGame< T >::Year | ORIGINAL_END_YEAR {2051} |
The original ending year. | |
static constexpr TimerGame< T >::Year | ORIGINAL_MAX_YEAR {2090} |
The maximum year of the original TTD. | |
static constexpr TimerGame< T >::Year | MAX_YEAR {5000000} |
MAX_YEAR, nicely rounded value of the number of years that can be encoded in a single 32 bits date, about 2^31 / 366 years. | |
static constexpr TimerGame< T >::Year | MIN_YEAR {0} |
The absolute minimum year in OTTD. | |
static constexpr TimerGame< T >::Year | DEF_START_YEAR {1950} |
The default starting year. | |
static constexpr TimerGame< T >::Year | DEF_END_YEAR {ORIGINAL_END_YEAR - 1} |
The default scoring end year. | |
static constexpr TimerGame< T >::Date | DAYS_TILL_ORIGINAL_BASE_YEAR {TimerGame<T>::DateAtStartOfYear(ORIGINAL_BASE_YEAR)} |
The date of the first day of the original base year. | |
static constexpr TimerGame< T >::Date | MAX_DATE {TimerGame<T>::DateAtStartOfYear(MAX_YEAR + 1) - 1} |
The date of the last day of the max year. | |
static constexpr TimerGame< T >::Date | MIN_DATE {0} |
The date on January 1, year 0. | |
static constexpr TimerGame< T >::Year | INVALID_YEAR {-1} |
Representation of an invalid year. | |
static constexpr TimerGame< T >::Date | INVALID_DATE {-1} |
Representation of an invalid date. | |
Template class for time constants shared by both Calendar and Economy time.
Definition at line 147 of file timer_game_common.h.
|
staticconstexpr |
sometimes, you need one day more...
Definition at line 150 of file timer_game_common.h.
|
staticconstexpr |
days per year
Definition at line 149 of file timer_game_common.h.
|
staticconstexpr |
The date of the first day of the original base year.
Definition at line 184 of file timer_game_common.h.
|
staticconstexpr |
The default scoring end year.
Definition at line 181 of file timer_game_common.h.
|
staticconstexpr |
The default starting year.
Definition at line 179 of file timer_game_common.h.
|
staticconstexpr |
Representation of an invalid date.
Definition at line 193 of file timer_game_common.h.
|
staticconstexpr |
Representation of an invalid year.
Definition at line 192 of file timer_game_common.h.
|
staticconstexpr |
The date of the last day of the max year.
Definition at line 187 of file timer_game_common.h.
|
staticconstexpr |
MAX_YEAR, nicely rounded value of the number of years that can be encoded in a single 32 bits date, about 2^31 / 366 years.
Definition at line 173 of file timer_game_common.h.
|
staticconstexpr |
The date on January 1, year 0.
Definition at line 190 of file timer_game_common.h.
|
staticconstexpr |
The absolute minimum year in OTTD.
Definition at line 176 of file timer_game_common.h.
|
staticconstexpr |
months per year
Definition at line 151 of file timer_game_common.h.
|
staticconstexpr |
The minimum starting year/base year of the original TTD.
Definition at line 163 of file timer_game_common.h.
|
staticconstexpr |
The original ending year.
Definition at line 165 of file timer_game_common.h.
|
staticconstexpr |
The maximum year of the original TTD.
Definition at line 167 of file timer_game_common.h.
|
staticconstexpr |
approximate seconds per day, not for precise calculations
Definition at line 153 of file timer_game_common.h.