vehiclelist.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef VEHICLELIST_H
00013 #define VEHICLELIST_H
00014
00015 #include "core/smallvec_type.hpp"
00016 #include "vehicle_type.h"
00017 #include "company_type.h"
00018 #include "tile_type.h"
00019
00021 enum VehicleListType {
00022 VL_STANDARD,
00023 VL_SHARED_ORDERS,
00024 VL_STATION_LIST,
00025 VL_DEPOT_LIST,
00026 VL_GROUP_LIST,
00027 VLT_END
00028 };
00029
00031 struct VehicleListIdentifier {
00032 VehicleListType type;
00033 VehicleType vtype;
00034 CompanyID company;
00035 uint32 index;
00036
00037 uint32 Pack();
00038 bool Unpack(uint32 data);
00039
00047 VehicleListIdentifier(VehicleListType type, VehicleType vtype, CompanyID company, uint index = 0) :
00048 type(type), vtype(vtype), company(company), index(index) {}
00049
00050 VehicleListIdentifier(uint32 data);
00051
00053 VehicleListIdentifier() {}
00054 };
00055
00056 typedef SmallVector<const Vehicle *, 32> VehicleList;
00057
00058 bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &identifier);
00059 void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine_list, VehicleList *wagon_list, bool individual_wagons = false);
00060
00061 #endif