summaryrefslogtreecommitdiff
path: root/src/vehiclelist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehiclelist.h')
-rw-r--r--src/vehiclelist.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/vehiclelist.h b/src/vehiclelist.h
index 18357b941..5c13f326b 100644
--- a/src/vehiclelist.h
+++ b/src/vehiclelist.h
@@ -17,9 +17,37 @@
#include "company_type.h"
#include "tile_type.h"
+/** Vehicle List type flags */
+enum VehicleListType {
+ VL_STANDARD,
+ VL_SHARED_ORDERS,
+ VL_STATION_LIST,
+ VL_DEPOT_LIST,
+ VL_GROUP_LIST,
+ VLT_END
+};
+
+/** The information about a vehicle list. */
+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.
+
+ /**
+ * 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) {}
+};
+
typedef SmallVector<const Vehicle *, 32> VehicleList;
-bool GenerateVehicleSortList(VehicleList *list, VehicleType type, Owner owner, uint32 index, uint16 window_type);
+bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &identifier);
void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine_list, VehicleList *wagon_list, bool individual_wagons = false);
#endif /* VEHICLELIST_H */