mirror of https://github.com/OpenTTD/OpenTTD.git
Codechange: Split bit numbers from values in RailTypeFlags, RoadTypeFlags enums (#11877)
This commit is contained in:
parent
21581b6ab3
commit
cbb24b5d71
|
@ -21,15 +21,18 @@
|
||||||
#include "signal_type.h"
|
#include "signal_type.h"
|
||||||
#include "settings_type.h"
|
#include "settings_type.h"
|
||||||
|
|
||||||
/** Railtype flags. */
|
/** Railtype flag bit numbers. */
|
||||||
enum RailTypeFlags {
|
enum RailTypeFlag {
|
||||||
RTF_CATENARY = 0, ///< Bit number for drawing a catenary.
|
RTF_CATENARY = 0, ///< Bit number for drawing a catenary.
|
||||||
RTF_NO_LEVEL_CROSSING = 1, ///< Bit number for disallowing level crossings.
|
RTF_NO_LEVEL_CROSSING = 1, ///< Bit number for disallowing level crossings.
|
||||||
RTF_HIDDEN = 2, ///< Bit number for hiding from selection.
|
RTF_HIDDEN = 2, ///< Bit number for hiding from selection.
|
||||||
RTF_NO_SPRITE_COMBINE = 3, ///< Bit number for using non-combined junctions.
|
RTF_NO_SPRITE_COMBINE = 3, ///< Bit number for using non-combined junctions.
|
||||||
RTF_ALLOW_90DEG = 4, ///< Bit number for always allowed 90 degree turns, regardless of setting.
|
RTF_ALLOW_90DEG = 4, ///< Bit number for always allowed 90 degree turns, regardless of setting.
|
||||||
RTF_DISALLOW_90DEG = 5, ///< Bit number for never allowed 90 degree turns, regardless of setting.
|
RTF_DISALLOW_90DEG = 5, ///< Bit number for never allowed 90 degree turns, regardless of setting.
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Railtype flags. */
|
||||||
|
enum RailTypeFlags : uint8_t {
|
||||||
RTFB_NONE = 0, ///< All flags cleared.
|
RTFB_NONE = 0, ///< All flags cleared.
|
||||||
RTFB_CATENARY = 1 << RTF_CATENARY, ///< Value for drawing a catenary.
|
RTFB_CATENARY = 1 << RTF_CATENARY, ///< Value for drawing a catenary.
|
||||||
RTFB_NO_LEVEL_CROSSING = 1 << RTF_NO_LEVEL_CROSSING, ///< Value for disallowing level crossings.
|
RTFB_NO_LEVEL_CROSSING = 1 << RTF_NO_LEVEL_CROSSING, ///< Value for disallowing level crossings.
|
||||||
|
|
|
@ -33,14 +33,17 @@ DECLARE_ENUM_AS_BIT_SET(RoadTramTypes)
|
||||||
|
|
||||||
static const RoadTramType _roadtramtypes[] = { RTT_ROAD, RTT_TRAM };
|
static const RoadTramType _roadtramtypes[] = { RTT_ROAD, RTT_TRAM };
|
||||||
|
|
||||||
/** Roadtype flags. Starts with RO instead of R because R is used for rails */
|
/** Roadtype flag bit numbers. Starts with RO instead of R because R is used for rails */
|
||||||
enum RoadTypeFlags {
|
enum RoadTypeFlag {
|
||||||
ROTF_CATENARY = 0, ///< Bit number for adding catenary
|
ROTF_CATENARY = 0, ///< Bit number for adding catenary
|
||||||
ROTF_NO_LEVEL_CROSSING, ///< Bit number for disabling level crossing
|
ROTF_NO_LEVEL_CROSSING, ///< Bit number for disabling level crossing
|
||||||
ROTF_NO_HOUSES, ///< Bit number for setting this roadtype as not house friendly
|
ROTF_NO_HOUSES, ///< Bit number for setting this roadtype as not house friendly
|
||||||
ROTF_HIDDEN, ///< Bit number for hidden from construction.
|
ROTF_HIDDEN, ///< Bit number for hidden from construction.
|
||||||
ROTF_TOWN_BUILD, ///< Bit number for allowing towns to build this roadtype.
|
ROTF_TOWN_BUILD, ///< Bit number for allowing towns to build this roadtype.
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Roadtype flags. Starts with RO instead of R because R is used for rails */
|
||||||
|
enum RoadTypeFlags : uint8_t {
|
||||||
ROTFB_NONE = 0, ///< All flags cleared.
|
ROTFB_NONE = 0, ///< All flags cleared.
|
||||||
ROTFB_CATENARY = 1 << ROTF_CATENARY, ///< Value for drawing a catenary.
|
ROTFB_CATENARY = 1 << ROTF_CATENARY, ///< Value for drawing a catenary.
|
||||||
ROTFB_NO_LEVEL_CROSSING = 1 << ROTF_NO_LEVEL_CROSSING, ///< Value for disabling a level crossing.
|
ROTFB_NO_LEVEL_CROSSING = 1 << ROTF_NO_LEVEL_CROSSING, ///< Value for disabling a level crossing.
|
||||||
|
|
Loading…
Reference in New Issue