#include "stdafx.h"
#include "vehicle_gui.h"
#include "train.h"
#include "vehiclelist.h"
Go to the source code of this file.
Functions | |
void | BuildDepotVehicleList (VehicleType type, TileIndex tile, VehicleList *engines, VehicleList *wagons, bool individual_wagons) |
Generate a list of vehicles inside a depot. | |
void | GenerateVehicleSortList (VehicleList *list, VehicleType type, Owner owner, uint32 index, uint16 window_type) |
Generate a list of vehicles based on window type. |
Definition in file vehiclelist.cpp.
void BuildDepotVehicleList | ( | VehicleType | type, | |
TileIndex | tile, | |||
VehicleList * | engines, | |||
VehicleList * | wagons, | |||
bool | individual_wagons | |||
) |
Generate a list of vehicles inside a depot.
type | Type of vehicle | |
tile | The tile the depot is located on | |
engines | Pointer to list to add vehicles to | |
wagons | Pointer to list to add wagons to (can be NULL) | |
individual_wagons | If true add every wagon to wagons which is not attached to an engine. If false only add the first wagon of every row. |
Definition at line 25 of file vehiclelist.cpp.
References SmallVector< T, S >::Append(), SmallVector< T, S >::Clear(), SmallVector< T, S >::Compact(), SpecializedVehicle< T, Type >::First(), SpecializedVehicle< Train, VEH_TRAIN >::From(), Train::IsArticulatedPart(), Train::IsFreeWagon(), Train::IsRearDualheaded(), Train::track, TRACK_BIT_DEPOT, and VEH_TRAIN.
Referenced by CmdDepotMassAutoReplace(), CmdDepotSellAllVehicles(), and CmdMassStartStopVehicle().
void GenerateVehicleSortList | ( | VehicleList * | list, | |
VehicleType | type, | |||
Owner | owner, | |||
uint32 | index, | |||
uint16 | window_type | |||
) |
Generate a list of vehicles based on window type.
list | Pointer to list to add vehicles to | |
type | Type of vehicle | |
owner | Company to generate list for | |
index | This parameter has different meanings depending on window_type
| |
window_type | The type of window the list is for, using the VLW_ flags in vehicle_gui.h |
Definition at line 80 of file vehiclelist.cpp.
References SmallVector< T, S >::Append(), SmallVector< T, S >::Clear(), SmallVector< T, S >::Compact(), and ODATFB_NEAREST_DEPOT.
Referenced by CmdMassStartStopVehicle(), and SendAllVehiclesToDepot().