OpenTTD Source 20241224-master-gee860a5c8e
road_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 ROAD_TYPE_H
11#define ROAD_TYPE_H
12
13#include "core/enum_type.hpp"
14
15typedef uint32_t RoadTypeLabel;
16
17static const RoadTypeLabel ROADTYPE_LABEL_ROAD = 'ROAD';
18static const RoadTypeLabel ROADTYPE_LABEL_TRAM = 'ELRL';
19
33
34
45
46
71
72
81
82#endif /* ROAD_TYPE_H */
Type (helpers) for enums.
#define DECLARE_ENUM_AS_BIT_SET(enum_type)
Operators to allow to work with enum as with type safe bit set in C++.
Definition enum_type.hpp:35
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
Definition enum_type.hpp:18
RoadBits
Enumeration for the road parts on a tile.
Definition road_type.h:52
@ ROAD_SW
South-west part.
Definition road_type.h:55
@ ROAD_ALL
Full 4-way crossing.
Definition road_type.h:66
@ ROAD_NONE
No road-part is build.
Definition road_type.h:53
@ ROAD_E
Road at the two eastern edges.
Definition road_type.h:62
@ ROAD_NE
North-east part.
Definition road_type.h:57
@ ROAD_N
Road at the two northern edges.
Definition road_type.h:61
@ ROAD_SE
South-east part.
Definition road_type.h:56
@ ROAD_Y
Full road along the y-axis (north-west + south-east)
Definition road_type.h:59
@ ROAD_S
Road at the two southern edges.
Definition road_type.h:63
@ ROAD_W
Road at the two western edges.
Definition road_type.h:64
@ ROAD_NW
North-west part.
Definition road_type.h:54
@ ROAD_X
Full road along the x-axis (south-west + north-east)
Definition road_type.h:58
@ ROAD_END
Out-of-range roadbits, used for iterations.
Definition road_type.h:68
RoadTypes
The different roadtypes we support, but then a bitmask of them.
Definition road_type.h:38
@ ROADTYPES_TRAM
Trams.
Definition road_type.h:41
@ INVALID_ROADTYPES
Invalid roadtypes.
Definition road_type.h:42
@ ROADTYPES_ROAD
Road.
Definition road_type.h:40
@ ROADTYPES_NONE
No roadtypes.
Definition road_type.h:39
RoadType
The different roadtypes we support.
Definition road_type.h:25
@ INVALID_ROADTYPE
flag for invalid roadtype
Definition road_type.h:30
@ ROADTYPE_TRAM
Trams.
Definition road_type.h:28
@ ROADTYPE_ROAD
Basic road type.
Definition road_type.h:27
@ ROADTYPE_END
Used for iterations.
Definition road_type.h:29
@ ROADTYPE_BEGIN
Used for iterations.
Definition road_type.h:26
DisallowedRoadDirections
Which directions are disallowed ?
Definition road_type.h:73
@ DRD_NORTHBOUND
All northbound traffic is disallowed.
Definition road_type.h:76
@ DRD_END
Sentinel.
Definition road_type.h:78
@ DRD_BOTH
All directions are disallowed.
Definition road_type.h:77
@ DRD_NONE
None of the directions are disallowed.
Definition road_type.h:74
@ DRD_SOUTHBOUND
All southbound traffic is disallowed.
Definition road_type.h:75