OpenTTD Source
20241124-master-g9399a92a4f
|
All types related to tracks. More...
#include "core/enum_type.hpp"
Go to the source code of this file.
Typedefs | |
typedef uint32_t | TrackStatus |
Enumerations | |
enum | Track : uint8_t { TRACK_BEGIN = 0 , TRACK_X = 0 , TRACK_Y = 1 , TRACK_UPPER = 2 , TRACK_LOWER = 3 , TRACK_LEFT = 4 , TRACK_RIGHT = 5 , TRACK_END , INVALID_TRACK = 0xFF } |
These are used to specify a single track. More... | |
enum | TrackBits : uint8_t { TRACK_BIT_NONE = 0U , TRACK_BIT_X = 1U << TRACK_X , TRACK_BIT_Y = 1U << TRACK_Y , TRACK_BIT_UPPER = 1U << TRACK_UPPER , TRACK_BIT_LOWER = 1U << TRACK_LOWER , TRACK_BIT_LEFT = 1U << TRACK_LEFT , TRACK_BIT_RIGHT = 1U << TRACK_RIGHT , TRACK_BIT_CROSS = TRACK_BIT_X | TRACK_BIT_Y , TRACK_BIT_HORZ = TRACK_BIT_UPPER | TRACK_BIT_LOWER , TRACK_BIT_VERT = TRACK_BIT_LEFT | TRACK_BIT_RIGHT , TRACK_BIT_3WAY_NE = TRACK_BIT_X | TRACK_BIT_UPPER | TRACK_BIT_RIGHT , TRACK_BIT_3WAY_SE = TRACK_BIT_Y | TRACK_BIT_LOWER | TRACK_BIT_RIGHT , TRACK_BIT_3WAY_SW = TRACK_BIT_X | TRACK_BIT_LOWER | TRACK_BIT_LEFT , TRACK_BIT_3WAY_NW = TRACK_BIT_Y | TRACK_BIT_UPPER | TRACK_BIT_LEFT , TRACK_BIT_ALL = TRACK_BIT_CROSS | TRACK_BIT_HORZ | TRACK_BIT_VERT , TRACK_BIT_MASK = 0x3FU , TRACK_BIT_WORMHOLE = 0x40U , TRACK_BIT_DEPOT = 0x80U , INVALID_TRACK_BIT = 0xFF } |
Allow incrementing of Track variables. More... | |
enum | Trackdir : uint8_t { TRACKDIR_BEGIN = 0 , TRACKDIR_X_NE = 0 , TRACKDIR_Y_SE = 1 , TRACKDIR_UPPER_E = 2 , TRACKDIR_LOWER_E = 3 , TRACKDIR_LEFT_S = 4 , TRACKDIR_RIGHT_S = 5 , TRACKDIR_RVREV_NE = 6 , TRACKDIR_RVREV_SE = 7 , TRACKDIR_X_SW = 8 , TRACKDIR_Y_NW = 9 , TRACKDIR_UPPER_W = 10 , TRACKDIR_LOWER_W = 11 , TRACKDIR_LEFT_N = 12 , TRACKDIR_RIGHT_N = 13 , TRACKDIR_RVREV_SW = 14 , TRACKDIR_RVREV_NW = 15 , TRACKDIR_END , INVALID_TRACKDIR = 0xFF } |
Enumeration for tracks and directions. More... | |
enum | TrackdirBits : uint16_t { TRACKDIR_BIT_NONE = 0U , TRACKDIR_BIT_X_NE = 1U << TRACKDIR_X_NE , TRACKDIR_BIT_Y_SE = 1U << TRACKDIR_Y_SE , TRACKDIR_BIT_UPPER_E = 1U << TRACKDIR_UPPER_E , TRACKDIR_BIT_LOWER_E = 1U << TRACKDIR_LOWER_E , TRACKDIR_BIT_LEFT_S = 1U << TRACKDIR_LEFT_S , TRACKDIR_BIT_RIGHT_S = 1U << TRACKDIR_RIGHT_S , TRACKDIR_BIT_X_SW = 1U << TRACKDIR_X_SW , TRACKDIR_BIT_Y_NW = 1U << TRACKDIR_Y_NW , TRACKDIR_BIT_UPPER_W = 1U << TRACKDIR_UPPER_W , TRACKDIR_BIT_LOWER_W = 1U << TRACKDIR_LOWER_W , TRACKDIR_BIT_LEFT_N = 1U << TRACKDIR_LEFT_N , TRACKDIR_BIT_RIGHT_N = 1U << TRACKDIR_RIGHT_N , TRACKDIR_BIT_MASK = 0x3F3F , INVALID_TRACKDIR_BIT = 0xFFFF } |
Allow incrementing of Trackdir variables. More... | |
All types related to tracks.
Definition in file track_type.h.
enum Track : uint8_t |
These are used to specify a single track.
Can be translated to a trackbit with TrackToTrackbit
Definition at line 19 of file track_type.h.
enum TrackBits : uint8_t |
Allow incrementing of Track variables.
Bitfield corresponding to Track
Definition at line 35 of file track_type.h.
enum Trackdir : uint8_t |
Enumeration for tracks and directions.
These are a combination of tracks and directions. Values are 0-5 in one direction (corresponding to the Track enum) and 8-13 in the other direction. 6, 7, 14 and 15 are used to encode the reversing of road vehicles. Those reversing track dirs are not considered to be 'valid' except in a small corner in the road vehicle controller.
Definition at line 67 of file track_type.h.
enum TrackdirBits : uint16_t |
Allow incrementing of Trackdir variables.
Enumeration of bitmasks for the TrackDirs
These are a combination of tracks and directions. Values are 0-5 in one direction (corresponding to the Track enum) and 8-13 in the other direction.
Definition at line 98 of file track_type.h.