OpenTTD Source 20241224-master-gee860a5c8e
transport_type.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
7
10#ifndef TRANSPORT_TYPE_H
11#define TRANSPORT_TYPE_H
12
13#include "core/enum_type.hpp"
14
16typedef uint16_t UnitID;
17
19enum TransportType : uint8_t {
20 /* These constants are for now linked to the representation of bridges
21 * and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge.
22 * In an ideal world, these constants would be used everywhere when
23 * accessing tunnels and bridges. For now, you should just not change
24 * the values for road and rail.
25 */
33};
34
35#endif /* TRANSPORT_TYPE_H */
Type (helpers) for enums.
TransportType
Available types of transport.
@ TRANSPORT_RAIL
Transport by train.
@ INVALID_TRANSPORT
Sentinel for invalid transport types.
@ TRANSPORT_ROAD
Transport by road vehicle.
@ TRANSPORT_END
End of iterations.
@ TRANSPORT_WATER
Transport over water.
@ TRANSPORT_AIR
Transport through air.
@ TRANSPORT_BEGIN
Begin of the iterator.
uint16_t UnitID
Type for the company global vehicle unit number.