OpenTTD Source: src/landscape_type.h Source File

OpenTTD Source 15.3

landscape_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 LANDSCAPE_TYPE_H
11#define LANDSCAPE_TYPE_H
12
13#include "core/enum_type.hpp"
14
16 enum class LandscapeType : uint8_t {
17 Temperate = 0,
18 Arctic = 1,
19 Tropic = 2,
20 Toyland = 3,
21};
22using LandscapeTypes = EnumBitSet<LandscapeType, uint8_t>;
23
24static constexpr uint NUM_LANDSCAPE = 4;
25
29 enum class BorderFlag : uint8_t {
30 NorthEast,
31 SouthEast,
32 SouthWest,
33 NorthWest,
34 Random,
35};
36using BorderFlags = EnumBitSet<BorderFlag, uint8_t>;
37
38 static constexpr BorderFlags BORDERFLAGS_ALL = BorderFlags{BorderFlag::NorthEast, BorderFlag::SouthEast, BorderFlag::SouthWest, BorderFlag::NorthWest};
39
40#endif /* LANDSCAPE_TYPE_H */
EnumBitSet< LandscapeType, uint8_t >
enum_type.hpp
Type (helpers) for enums.
BORDERFLAGS_ALL
static constexpr BorderFlags BORDERFLAGS_ALL
Border on all sides.
Definition landscape_type.h:38
LandscapeType
LandscapeType
Landscape types.
Definition landscape_type.h:16
BorderFlag
BorderFlag
For storing the water borders which shall be retained.
Definition landscape_type.h:29
BorderFlag::NorthWest
@ NorthWest
Border on North West.
BorderFlag::Random
@ Random
Randomise borders.
BorderFlag::NorthEast
@ NorthEast
Border on North East.
BorderFlag::SouthEast
@ SouthEast
Border on South East.
BorderFlag::SouthWest
@ SouthWest
Border on South West.