Update readme and changelog for v1.27.0
[openttd-joker.git] / src / transport_type.h
blob3ea22f3063e338fcfa22b72c54c8c7fdb15b3fdb
1 /* $Id: transport_type.h 22405 2011-05-01 19:14:12Z rubidium $ */
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 */
10 /** @file transport_type.h Base types related to transport. */
12 #ifndef TRANSPORT_TYPE_H
13 #define TRANSPORT_TYPE_H
15 #include "core/enum_type.hpp"
17 /** Type for the company global vehicle unit number. */
18 typedef uint16 UnitID;
20 /** Available types of transport */
21 enum TransportType {
22 /* These constants are for now linked to the representation of bridges
23 * and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge.
24 * In an ideal world, these constants would be used everywhere when
25 * accessing tunnels and bridges. For now, you should just not change
26 * the values for road and rail.
28 TRANSPORT_BEGIN = 0, ///< Begin of the iterator.
29 TRANSPORT_RAIL = TRANSPORT_BEGIN, ///< Transport by train
30 TRANSPORT_ROAD, ///< Transport by road vehicle
31 TRANSPORT_WATER, ///< Transport over water
32 TRANSPORT_AIR, ///< Transport through air
33 TRANSPORT_END, ///< End of iterations.
34 INVALID_TRANSPORT = 0xff, ///< Sentinel for invalid transport types.
36 /** Helper information for extract tool. */
37 template <> struct EnumPropsT<TransportType> : MakeEnumPropsT<TransportType, byte, TRANSPORT_BEGIN, TRANSPORT_END, INVALID_TRANSPORT, 2> {};
39 #endif /* TRANSPORT_TYPE_H */