2009-08-21 22:21:05 +02:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
|
|
|
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 17:11:33 +02:00
|
|
|
/** @file timetable.h Functions related to time tabling. */
|
2007-06-20 21:26:25 +02:00
|
|
|
|
|
|
|
#ifndef TIMETABLE_H
|
|
|
|
#define TIMETABLE_H
|
|
|
|
|
2023-08-16 15:01:24 +02:00
|
|
|
#include "timer/timer_game_tick.h"
|
2024-01-22 15:04:34 +01:00
|
|
|
#include "timer/timer_game_economy.h"
|
2010-01-15 17:41:15 +01:00
|
|
|
#include "vehicle_type.h"
|
2009-11-21 13:43:09 +01:00
|
|
|
|
2024-01-22 15:04:34 +01:00
|
|
|
static const TimerGameEconomy::Year MAX_TIMETABLE_START_YEARS = 15; ///< The maximum start date offset, in economy years.
|
2023-04-21 17:31:26 +02:00
|
|
|
|
2023-09-25 01:43:10 +02:00
|
|
|
enum class TimetableMode : uint8_t {
|
|
|
|
Days,
|
|
|
|
Seconds,
|
|
|
|
Ticks,
|
|
|
|
};
|
|
|
|
|
2024-01-22 15:04:34 +01:00
|
|
|
TimerGameTick::TickCounter GetStartTickFromDate(TimerGameEconomy::Date start_date);
|
|
|
|
TimerGameEconomy::Date GetDateFromStartTick(TimerGameTick::TickCounter start_tick);
|
2023-11-11 14:31:27 +01:00
|
|
|
|
2007-06-20 21:26:25 +02:00
|
|
|
void ShowTimetableWindow(const Vehicle *v);
|
|
|
|
void UpdateVehicleTimetable(Vehicle *v, bool travelling);
|
2023-08-16 15:01:24 +02:00
|
|
|
void SetTimetableParams(int param1, int param2, TimerGameTick::Ticks ticks);
|
2007-06-20 21:26:25 +02:00
|
|
|
|
|
|
|
#endif /* TIMETABLE_H */
|