OpenTTD
vehiclelist.h
Go to the documentation of this file.
1 /* $Id: vehiclelist.h 27013 2014-10-14 11:23:41Z rubidium $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8  */
9 
12 #ifndef VEHICLELIST_H
13 #define VEHICLELIST_H
14 
15 #include "core/smallvec_type.hpp"
16 #include "vehicle_type.h"
17 #include "company_type.h"
18 #include "tile_type.h"
19 
22  VL_STANDARD,
23  VL_SHARED_ORDERS,
24  VL_STATION_LIST,
25  VL_DEPOT_LIST,
26  VL_GROUP_LIST,
27  VLT_END
28 };
29 
35  uint32 index;
36 
37  uint32 Pack() const;
38  bool Unpack(uint32 data);
39 
48  type(type), vtype(vtype), company(company), index(index) {}
49 
50  VehicleListIdentifier(uint32 data = 0);
51 };
52 
55 
56 bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &identifier);
57 void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine_list, VehicleList *wagon_list, bool individual_wagons = false);
58 uint GetUnitNumberDigits(VehicleList &vehicles);
59 
60 #endif /* VEHICLELIST_H */