OpenTTD Source  12.0-beta2
timetable.h File Reference
#include "date_type.h"
#include "vehicle_type.h"

Go to the source code of this file.

Functions

void ShowTimetableWindow (const Vehicle *v)
 Show the timetable for a given vehicle. More...
 
void UpdateVehicleTimetable (Vehicle *v, bool travelling)
 Update the timetable for the vehicle. More...
 
void SetTimetableParams (int param1, int param2, Ticks ticks)
 Set the timetable parameters in the format as described by the setting. More...
 

Detailed Description

Functions related to time tabling.

Definition in file timetable.h.

Function Documentation

◆ SetTimetableParams()

void SetTimetableParams ( int  param1,
int  param2,
Ticks  ticks 
)

Set the timetable parameters in the format as described by the setting.

Parameters
param1the first DParam to fill
param2the second DParam to fill
ticksthe number of ticks to 'draw'

Definition at line 45 of file timetable_gui.cpp.

References _settings_client, DAY_TICKS, ClientSettings::gui, SetDParam(), and GUISettings::timetable_in_ticks.

◆ ShowTimetableWindow()

void ShowTimetableWindow ( const Vehicle v)

Show the timetable for a given vehicle.

Parameters
vThe vehicle to show the timetable for.

Definition at line 708 of file timetable_gui.cpp.

References CloseWindowById(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, WC_VEHICLE_DETAILS, and WC_VEHICLE_ORDERS.

◆ UpdateVehicleTimetable()

void UpdateVehicleTimetable ( Vehicle v,
bool  travelling 
)

Update the timetable for the vehicle.

Parameters
vThe vehicle to update the timetable for.
travellingWhether we just travelled or waited at a station.

Definition at line 372 of file timetable_cmd.cpp.

References Vehicle::current_order, BaseConsist::current_order_time, and Order::IsType().