OpenTTD Source 20241224-master-gf74b0cf984
|
Storage class for Ticks constants. More...
#include <timer_game_tick.h>
Static Public Attributes | |
static constexpr TimerGameTick::Ticks | INVALID_TICKS = -1 |
Representation of an invalid number of ticks. | |
static constexpr TimerGameTick::Ticks | DAY_TICKS = 74 |
1 day is 74 ticks; TimerGameCalendar::date_fract used to be uint16_t and incremented by 885. | |
static constexpr TimerGameTick::Ticks | TICKS_PER_SECOND = 1000 / MILLISECONDS_PER_TICK |
Estimation of how many ticks fit in a single second. | |
static constexpr TimerGameTick::Ticks | STATION_RATING_TICKS = 185 |
Cycle duration for updating station rating. | |
static constexpr TimerGameTick::Ticks | STATION_ACCEPTANCE_TICKS = 250 |
Cycle duration for updating station acceptance. | |
static constexpr TimerGameTick::Ticks | STATION_LINKGRAPH_TICKS = 504 |
Cycle duration for cleaning dead links. | |
static constexpr TimerGameTick::Ticks | CARGO_AGING_TICKS = 185 |
Cycle duration for aging cargo. | |
static constexpr TimerGameTick::Ticks | INDUSTRY_PRODUCE_TICKS = 256 |
Cycle duration for industry production. | |
static constexpr TimerGameTick::Ticks | TOWN_GROWTH_TICKS = 70 |
Cycle duration for towns trying to grow (this originates from the size of the town array in TTD). | |
static constexpr TimerGameTick::Ticks | INDUSTRY_CUT_TREE_TICKS = INDUSTRY_PRODUCE_TICKS * 2 |
Cycle duration for lumber mill's extra action. | |
Storage class for Ticks constants.
Definition at line 66 of file timer_game_tick.h.
|
staticconstexpr |
Cycle duration for aging cargo.
Definition at line 81 of file timer_game_tick.h.
|
staticconstexpr |
1 day is 74 ticks; TimerGameCalendar::date_fract used to be uint16_t and incremented by 885.
On an overflow the new day begun and 65535 / 885 = 74. 1 tick is approximately 27 ms. 1 day is thus about 2 seconds (74 * 27 = 1998) on a machine that can run OpenTTD normally ticks per day
Definition at line 75 of file timer_game_tick.h.
Referenced by LinkGraphOverlay::AddLinks(), AfterLoadGame(), CcStartStopVehicle(), CmdSetTimetableStart(), MultiCommodityFlow::Dijkstra(), TimetableWindow::DrawArrivalDeparturePanel(), TownViewWindow::DrawWidget(), GetDateFromStartTick(), GetStartTickFromDate(), HandleBankruptcyTakeover(), NetworkServer_Tick(), Aircraft::OnNewEconomyDay(), RoadVehicle::OnNewEconomyDay(), Ship::OnNewEconomyDay(), Train::OnNewEconomyDay(), ServerNetworkGameSocketHandler::Receive_CLIENT_ACK(), ClientNetworkGameSocketHandler::Receive_SERVER_FRAME(), GUIList< T, P, F >::ResetResortTimer(), RunEconomyVehicleDayProc(), RunVehicleCalendarDayProc(), TimerGameCalendar::SetDate(), TimerGameEconomy::SetDate(), SetTimetableParams(), ShowCostOrIncomeAnimation(), ShowFeederIncomeAnimation(), TicksPerTimetableUnit(), TrainController(), UpdateOrderDest(), UpdateVehicleTimetable(), and VehicleIsAboveLatenessThreshold().
|
staticconstexpr |
Cycle duration for lumber mill's extra action.
Definition at line 84 of file timer_game_tick.h.
|
staticconstexpr |
Cycle duration for industry production.
Definition at line 82 of file timer_game_tick.h.
|
staticconstexpr |
Representation of an invalid number of ticks.
Definition at line 68 of file timer_game_tick.h.
Referenced by TimetableWindow::DrawArrivalDeparturePanel(), FillTimetableArrivalDepartureTable(), OrderList::GetTimetableTotalDuration(), and UpdateVehicleTimetable().
|
staticconstexpr |
Cycle duration for updating station acceptance.
Definition at line 79 of file timer_game_tick.h.
|
staticconstexpr |
Cycle duration for cleaning dead links.
Definition at line 80 of file timer_game_tick.h.
|
staticconstexpr |
Cycle duration for updating station rating.
Definition at line 78 of file timer_game_tick.h.
|
staticconstexpr |
Estimation of how many ticks fit in a single second.
Definition at line 76 of file timer_game_tick.h.
Referenced by TimetableWindow::DrawArrivalDeparturePanel(), NetworkGameWindow::DrawServerLine(), TimetableWindow::DrawSummaryPanel(), GenerateDefaultSaveName(), TimetableWindow::OnQueryTextFinished(), OnTick_Companies(), SetTimetableParams(), TicksPerTimetableUnit(), UpdateVehicleTimetable(), and VehicleIsAboveLatenessThreshold().
|
staticconstexpr |
Cycle duration for towns trying to grow (this originates from the size of the town array in TTD).
Definition at line 83 of file timer_game_tick.h.
Referenced by AfterLoadGame(), DoCreateTown(), TownScopeResolver::GetVariable(), TownActionFundBuildings(), and TownTickHandler().