Functions related to time tabling. More...
#include "date_type.h"
#include "vehicle_type.h"
Go to the source code of this file.
Defines | |
#define | WALLCLOCK_NETWORK_COMPATIBLE 0 |
Whether wallclock should preserve network compatibility. If so, then timetable start dates cannot be set exactly using minutes. | |
Functions | |
void | ShowTimetableWindow (const Vehicle *v) |
Show the timetable for a given vehicle. | |
void | UpdateVehicleTimetable (Vehicle *v, bool travelling) |
Update the timetable for the vehicle. | |
void | SetTimetableParams (int param1, int param2, Ticks ticks) |
Set the timetable parameters in the format as described by the setting. |
Functions related to time tabling.
Definition in file timetable.h.
void SetTimetableParams | ( | int | param1, | |
int | param2, | |||
Ticks | ticks | |||
) |
Set the timetable parameters in the format as described by the setting.
param1 | the first DParam to fill | |
param2 | the second DParam to fill | |
ticks | the number of ticks to 'draw' |
Definition at line 63 of file timetable_gui.cpp.
References _settings_client, ClientSettings::gui, SetDParam(), GUISettings::time_in_minutes, and GUISettings::timetable_in_ticks.
Referenced by DrawOrderString(), and TimetableWindow::DrawWidget().
void ShowTimetableWindow | ( | const Vehicle * | v | ) |
Show the timetable for a given vehicle.
v | The vehicle to show the timetable for. |
Definition at line 731 of file timetable_gui.cpp.
References DeleteWindowById(), and Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index.
Referenced by VehicleViewWindow::OnClick(), and OrdersWindow::OnClick().
void UpdateVehicleTimetable | ( | Vehicle * | v, | |
bool | travelling | |||
) |
Update the timetable for the vehicle.
v | The vehicle to update the timetable for. | |
travelling | Whether we just travelled or waited at a station. |
Definition at line 407 of file timetable_cmd.cpp.
References _date, _date_fract, _settings_game, CeilDiv(), ChangeTimetable(), Vehicle::ClearSeparation(), ClrBit(), Vehicle::cur_real_order_index, Vehicle::current_loading_time, Vehicle::current_order, Vehicle::current_order_time, DAY_TICKS, Vehicle::FirstShared(), Vehicle::GetFirstOrder(), OrderList::GetTimetableTotalDuration(), HasBit(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, INVALID_TICKS, OrderList::IsCompleteTimetable(), Order::IsType(), Vehicle::lateness_counter, Vehicle::list, max(), Vehicle::NextShared(), GameSettings::order, Vehicle::orders, SetBit(), SetWindowDirty(), OrderSettings::timetable_separation, Vehicle::timetable_start, OrderSettings::timetabling, Order::travel_time, Vehicle::vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME, VF_AUTOFILL_TIMETABLE, VF_AUTOMATE_TIMETABLE, VF_TIMETABLE_STARTED, and Order::wait_time.
Referenced by Vehicle::BeginLoading(), Vehicle::LeaveStation(), ProcessOrders(), UpdateOrderDest(), and VehicleEnterDepot().