OpenTTD Source: src/transport_type.h Source File

OpenTTD Source 15.3

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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#ifndef TRANSPORT_TYPE_H
11#define TRANSPORT_TYPE_H
12
14 typedef uint16_t UnitID;
15
17 enum TransportType : uint8_t {
18 /* These constants are for now linked to the representation of bridges
19 * and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge.
20 * In an ideal world, these constants would be used everywhere when
21 * accessing tunnels and bridges. For now, you should just not change
22 * the values for road and rail.
23 */
24 TRANSPORT_BEGIN = 0,
25 TRANSPORT_RAIL = TRANSPORT_BEGIN,
26 TRANSPORT_ROAD,
27 TRANSPORT_WATER,
28 TRANSPORT_AIR,
29 TRANSPORT_END,
30 INVALID_TRANSPORT = 0xff,
31};
32
33#endif /* TRANSPORT_TYPE_H */
TransportType
TransportType
Available types of transport.
Definition transport_type.h:17
TRANSPORT_RAIL
@ TRANSPORT_RAIL
Transport by train.
Definition transport_type.h:25
INVALID_TRANSPORT
@ INVALID_TRANSPORT
Sentinel for invalid transport types.
Definition transport_type.h:30
TRANSPORT_ROAD
@ TRANSPORT_ROAD
Transport by road vehicle.
Definition transport_type.h:26
TRANSPORT_END
@ TRANSPORT_END
End of iterations.
Definition transport_type.h:29
TRANSPORT_WATER
@ TRANSPORT_WATER
Transport over water.
Definition transport_type.h:27
TRANSPORT_AIR
@ TRANSPORT_AIR
Transport through air.
Definition transport_type.h:28
TRANSPORT_BEGIN
@ TRANSPORT_BEGIN
Begin of the iterator.
Definition transport_type.h:24
UnitID
uint16_t UnitID
Type for the company global vehicle unit number.
Definition transport_type.h:14