OpenTTD Source 20241224-master-gee860a5c8e
rail_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 RAIL_TYPE_H
11#define RAIL_TYPE_H
12
13#include "core/enum_type.hpp"
14
15typedef uint32_t RailTypeLabel;
16
17static const RailTypeLabel RAILTYPE_LABEL_RAIL = 'RAIL';
18static const RailTypeLabel RAILTYPE_LABEL_ELECTRIC = 'ELRL';
19static const RailTypeLabel RAILTYPE_LABEL_MONO = 'MONO';
20static const RailTypeLabel RAILTYPE_LABEL_MAGLEV = 'MGLV';
21
36
39
40
53
54#endif /* RAIL_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
RailTypes
Allow incrementing of Track variables.
Definition rail_type.h:44
@ RAILTYPES_ELECTRIC
Electrified rails.
Definition rail_type.h:47
@ INVALID_RAILTYPES
Invalid railtypes.
Definition rail_type.h:50
@ RAILTYPES_MAGLEV
Ever fast maglev.
Definition rail_type.h:49
@ RAILTYPES_RAIL
Non-electrified rails.
Definition rail_type.h:46
@ RAILTYPES_NONE
No rail types.
Definition rail_type.h:45
@ RAILTYPES_MONO
Monorail!
Definition rail_type.h:48
RailType
Enumeration for all possible railtypes.
Definition rail_type.h:27
@ RAILTYPE_BEGIN
Used for iterations.
Definition rail_type.h:28
@ RAILTYPE_END
Used for iterations.
Definition rail_type.h:33
@ RAILTYPE_MONO
Monorail.
Definition rail_type.h:31
@ INVALID_RAILTYPE
Flag for invalid railtype.
Definition rail_type.h:34
@ RAILTYPE_ELECTRIC
Electric rails.
Definition rail_type.h:30
@ RAILTYPE_RAIL
Standard non-electric rails.
Definition rail_type.h:29
@ RAILTYPE_MAGLEV
Maglev.
Definition rail_type.h:32