OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
10 #ifndef TIMER_GAME_ECONOMY_H
11 #define TIMER_GAME_ECONOMY_H
13 #include "../core/strong_typedef_type.hpp"
static Date ConvertYMDToDate(Year year, Month month, Day day)
Converts a tuple of Year, Month and Day to a Date.
static Month month
Current month (0..11).
Template class for all TimerGame based timers.
static DateFract date_fract
Fractional part of the day.
Storage class for Economy time constants.
static bool UsingWallclockUnits(bool newgame=false)
Check if we are using wallclock units.
Template class for time constants shared by both Calendar and Economy time.
static constexpr int DAYS_IN_ECONOMY_YEAR
Days in an economy year, when in wallclock timekeeping mode.
static YearMonthDay ConvertDateToYMD(Date date)
Converts a Date to a Year, Month & Day.
static Year year
Current year, starting at 0.
static void SetDate(Date date, DateFract fract)
Set the date.
uint16_t DateFract
The fraction of a date we're in, i.e.
uint8_t Day
Type for the day of the month, note: 1 based, first day of a month is 1.
static constexpr int DAYS_IN_ECONOMY_MONTH
Days in an economy month, when in wallclock timekeeping mode.
Timer that is increased every 27ms, and counts towards economy time units, expressed in days / months...
uint8_t Month
Type for the month, note: 0 based, i.e.
static Date date
Current date in days (day counter).