vehiclelist.cpp File Reference

Lists of vehicles. More...

#include "stdafx.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.
bool GenerateVehicleSortList (VehicleList *list, const VehicleListIdentifier &vli)
 Generate a list of vehicles based on window type.

Detailed Description

Lists of vehicles.

Definition in file vehiclelist.cpp.


Function Documentation

void BuildDepotVehicleList ( VehicleType  type,
TileIndex  tile,
VehicleList engines,
VehicleList wagons,
bool  individual_wagons 
)

Generate a list of vehicles inside a depot.

Parameters:
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 63 of file vehiclelist.cpp.

References SmallVector< T, S >::Append(), SmallVector< T, S >::Clear(), SmallVector< T, S >::Compact(), SpecializedVehicle< T, Type >::First(), SpecializedVehicle< Train, Type >::From(), GroundVehicle< T, Type >::IsArticulatedPart(), GroundVehicle< T, Type >::IsFreeWagon(), Vehicle::IsInDepot(), Vehicle::IsPrimaryVehicle(), GroundVehicle< T, Type >::IsRearDualheaded(), Vehicle::tile, TRACK_BIT_DEPOT, BaseVehicle::type, and VEH_TRAIN.

Referenced by CmdDepotMassAutoReplace(), CmdDepotSellAllVehicles(), CmdMassStartStopVehicle(), and DepotWindow::OnPaint().

bool GenerateVehicleSortList ( VehicleList list,
const VehicleListIdentifier vli 
)

Generated on Sun Jan 23 01:49:40 2011 for OpenTTD by  doxygen 1.6.1