|
@@ -31,31 +31,31 @@ enum VehicleListType {
|
|
|
struct VehicleListIdentifier {
|
|
|
VehicleListType type; ///< The type of vehicle list.
|
|
|
VehicleType vtype; ///< The vehicle type associated with this list.
|
|
|
CompanyID company; ///< The company associated with this list.
|
|
|
uint32 index; ///< A vehicle list type specific index.
|
|
|
|
|
|
uint32 Pack() const;
|
|
|
bool UnpackIfValid(uint32 data);
|
|
|
static VehicleListIdentifier UnPack(uint32 data);
|
|
|
|
|
|
/**
|
|
|
* Create a simple vehicle list.
|
|
|
* @param type List type.
|
|
|
* @param vtype Vehicle type associated with this list.
|
|
|
* @param company Company associated with this list.
|
|
|
* @param index Optional type specific index.
|
|
|
*/
|
|
|
VehicleListIdentifier(VehicleListType type, VehicleType vtype, CompanyID company, uint index = 0) :
|
|
|
type(type), vtype(vtype), company(company), index(index) {}
|
|
|
|
|
|
VehicleListIdentifier() : type(), vtype(), company(), index() {}
|
|
|
};
|
|
|
|
|
|
/** A list of vehicles. */
|
|
|
typedef SmallVector<const Vehicle *, 32> VehicleList;
|
|
|
typedef std::vector<const Vehicle *> VehicleList;
|
|
|
|
|
|
bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &identifier);
|
|
|
void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine_list, VehicleList *wagon_list, bool individual_wagons = false);
|
|
|
uint GetUnitNumberDigits(VehicleList &vehicles);
|
|
|
|
|
|
#endif /* VEHICLELIST_H */
|