OpenTTD Source
20241121-master-g67a0fccfad
|
Different types to 'show' directions. More...
#include "core/enum_type.hpp"
Go to the source code of this file.
Enumerations | |
enum | Direction : uint8_t { DIR_BEGIN = 0 , DIR_N = 0 , DIR_NE = 1 , DIR_E = 2 , DIR_SE = 3 , DIR_S = 4 , DIR_SW = 5 , DIR_W = 6 , DIR_NW = 7 , DIR_END , INVALID_DIR = 0xFF } |
Defines the 8 directions on the map. More... | |
enum | DirDiff { DIRDIFF_SAME = 0 , DIRDIFF_45RIGHT = 1 , DIRDIFF_90RIGHT = 2 , DIRDIFF_REVERSE = 4 , DIRDIFF_90LEFT = 6 , DIRDIFF_45LEFT = 7 } |
Allow incrementing of Direction variables. More... | |
enum | DiagDirection : uint8_t { DIAGDIR_BEGIN = 0 , DIAGDIR_NE = 0 , DIAGDIR_SE = 1 , DIAGDIR_SW = 2 , DIAGDIR_NW = 3 , DIAGDIR_END , INVALID_DIAGDIR = 0xFF } |
Enumeration for diagonal directions. More... | |
enum | DiagDirDiff { DIAGDIRDIFF_BEGIN = 0 , DIAGDIRDIFF_SAME = 0 , DIAGDIRDIFF_90RIGHT = 1 , DIAGDIRDIFF_REVERSE = 2 , DIAGDIRDIFF_90LEFT = 3 , DIAGDIRDIFF_END } |
Enumeration for the difference between to DiagDirection. More... | |
enum | Axis : uint8_t { AXIS_X = 0 , AXIS_Y = 1 , AXIS_END , INVALID_AXIS = 0xFF } |
Allow incrementing of DiagDirDiff variables. More... | |
Different types to 'show' directions.
Definition in file direction_type.h.
enum Axis : uint8_t |
Allow incrementing of DiagDirDiff variables.
Enumeration for the two axis X and Y
This enumeration represents the two axis X and Y in the game. The X axis is the one which goes align the north-west edge (and south-east edge). The Y axis must be so the one which goes align the north-east edge (and south-west) edge.
Enumerator | |
---|---|
AXIS_X | The X axis. |
AXIS_Y | The y axis. |
AXIS_END | Used for iterations. |
INVALID_AXIS | Flag for an invalid Axis. |
Definition at line 116 of file direction_type.h.
enum DiagDirDiff |
Enumeration for the difference between to DiagDirection.
As the DiagDirection only contains 4 possible directions the difference between two of these directions can only be in 4 ways. As the DirDiff enumeration the values can be added together and you will get the resulting difference (use modulo DIAGDIR_END).
Definition at line 95 of file direction_type.h.
enum DiagDirection : uint8_t |
Enumeration for diagonal directions.
This enumeration is used for the 4 direction of the tile-edges.
Definition at line 73 of file direction_type.h.
enum DirDiff |
Allow incrementing of Direction variables.
Enumeration for the difference between two directions.
This enumeration is used to mark differences between two directions. If you get one direction you can align a second direction in 8 different ways. This enumeration only contains 6 of these 8 differences, but the remaining two can be calculated by adding to differences together. This also means you can add two differences together and get the difference you really want to get. The difference of 45 degrees left + the difference of 45 degrees right results in the difference of 0 degrees.
Definition at line 58 of file direction_type.h.
enum Direction : uint8_t |
Defines the 8 directions on the map.
This enum defines 8 possible directions which are used for the vehicles in the game. The directions are aligned straight to the viewport, not to the map. So north points to the top of your viewport and not rotated by 45 degrees left or right to get a "north" used in you games.
Definition at line 24 of file direction_type.h.