OpenTTD
|
All types related to tracks. More...
#include "core/enum_type.hpp"
Go to the source code of this file.
Data Structures | |
struct | EnumPropsT< Track > |
Allow incrementing of Track variables. More... | |
struct | EnumPropsT< Trackdir > |
Define basic enum properties. More... |
Typedefs | |
typedef TinyEnumT< Track > | TrackByte |
typedef SimpleTinyEnumT < TrackBits, byte > | TrackBitsByte |
typedef TinyEnumT< Trackdir > | TrackdirByte |
typedef SimpleTinyEnumT < TrackdirBits, uint16 > | TrackdirBitsShort |
typedef uint32 | TrackStatus |
Enumerations | |
enum | Track { 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 { 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 } |
Bitfield corresponding to Track. More... | |
enum | Trackdir { 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 { TRACKDIR_BIT_NONE = 0x0000, TRACKDIR_BIT_X_NE = 0x0001, TRACKDIR_BIT_Y_SE = 0x0002, TRACKDIR_BIT_UPPER_E = 0x0004, TRACKDIR_BIT_LOWER_E = 0x0008, TRACKDIR_BIT_LEFT_S = 0x0010, TRACKDIR_BIT_RIGHT_S = 0x0020, TRACKDIR_BIT_X_SW = 0x0100, TRACKDIR_BIT_Y_NW = 0x0200, TRACKDIR_BIT_UPPER_W = 0x0400, TRACKDIR_BIT_LOWER_W = 0x0800, TRACKDIR_BIT_LEFT_N = 0x1000, TRACKDIR_BIT_RIGHT_N = 0x2000, TRACKDIR_BIT_MASK = 0x3F3F, INVALID_TRACKDIR_BIT = 0xFFFF } |
Enumeration of bitmasks for the TrackDirs. More... |
All types related to tracks.
Definition in file track_type.h.
enum Track |
These are used to specify a single track.
Can be translated to a trackbit with TrackToTrackbit
Definition at line 21 of file track_type.h.
enum TrackBits |
Bitfield corresponding to Track.
Definition at line 41 of file track_type.h.
enum Trackdir |
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 74 of file track_type.h.
enum TrackdirBits |
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 106 of file track_type.h.