src/direction_type.h
author belugas
Tue, 04 Mar 2008 17:07:33 +0000
changeset 9168 a35d94d8501c
parent 8775 2b4b7efc41f6
permissions -rw-r--r--
(svn r12337) -Change: update some documentation.
3147
0a09ce6d651a (svn r3767) Move all direction related enums and functions to a separate header
tron
parents:
diff changeset
     1
/* $Id$ */
0a09ce6d651a (svn r3767) Move all direction related enums and functions to a separate header
tron
parents:
diff changeset
     2
8596
27646407e0bc (svn r11661) -Codechange: some header reworks in order to try to reduce the compile time of OpenTTD by reduce the amount of circular-ish dependencies.
rubidium
parents: 8137
diff changeset
     3
/** @file direction_type.h Different types to 'show' directions. */
6451
7baba06b4b85 (svn r8862) -Cleanup: doxygen changes, again. Mostly @files missing tags and a few comments style.
belugas
parents: 5838
diff changeset
     4
8596
27646407e0bc (svn r11661) -Codechange: some header reworks in order to try to reduce the compile time of OpenTTD by reduce the amount of circular-ish dependencies.
rubidium
parents: 8137
diff changeset
     5
#ifndef DIRECTION_TYPE_H
27646407e0bc (svn r11661) -Codechange: some header reworks in order to try to reduce the compile time of OpenTTD by reduce the amount of circular-ish dependencies.
rubidium
parents: 8137
diff changeset
     6
#define DIRECTION_TYPE_H
3147
0a09ce6d651a (svn r3767) Move all direction related enums and functions to a separate header
tron
parents:
diff changeset
     7
8596
27646407e0bc (svn r11661) -Codechange: some header reworks in order to try to reduce the compile time of OpenTTD by reduce the amount of circular-ish dependencies.
rubidium
parents: 8137
diff changeset
     8
#include "core/enum_type.hpp"
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
     9
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    10
/**
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    11
 * Defines the 8 directions on the map.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    12
 *
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    13
 * This enum defines 8 possible directions which are used for
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    14
 * the vehicles in the game. The directions are aligned straight
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    15
 * to the viewport, not to the map. So north points to the top of
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    16
 * your viewport and not rotated by 45 degrees left or right to get
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    17
 * a "north" used in you games.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    18
 */
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
    19
enum Direction {
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    20
	DIR_BEGIN = 0,          ///< Used to iterate
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    21
	DIR_N   = 0,            ///< North
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    22
	DIR_NE  = 1,            ///< Northeast
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    23
	DIR_E   = 2,            ///< East
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    24
	DIR_SE  = 3,            ///< Southeast
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    25
	DIR_S   = 4,            ///< South
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    26
	DIR_SW  = 5,            ///< Southwest
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    27
	DIR_W   = 6,            ///< West
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    28
	DIR_NW  = 7,            ///< Northwest
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    29
	DIR_END,                ///< Used to iterate
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    30
	INVALID_DIR = 0xFF,     ///< Flag for an invalid direction
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
    31
};
3147
0a09ce6d651a (svn r3767) Move all direction related enums and functions to a separate header
tron
parents:
diff changeset
    32
8775
2b4b7efc41f6 (svn r11843) -Fix: mark dirty canal tile even in diagonal direction from flooded tile
smatz
parents: 8596
diff changeset
    33
/** Allow incrementing of Direction variables */
2b4b7efc41f6 (svn r11843) -Fix: mark dirty canal tile even in diagonal direction from flooded tile
smatz
parents: 8596
diff changeset
    34
DECLARE_POSTFIX_INCREMENT(Direction);
2b4b7efc41f6 (svn r11843) -Fix: mark dirty canal tile even in diagonal direction from flooded tile
smatz
parents: 8596
diff changeset
    35
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    36
/** Define basic enum properties */
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    37
template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR> {};
6928
44797333bcbf (svn r9568) -Documentation: doxygen and comment changes: Root of src is finally done. Now, time to start clearing as much as possible
belugas
parents: 6574
diff changeset
    38
typedef TinyEnumT<Direction> DirectionByte; //typedefing-enumification of Direction
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    39
3147
0a09ce6d651a (svn r3767) Move all direction related enums and functions to a separate header
tron
parents:
diff changeset
    40
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    41
/**
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    42
 * Enumeration for the difference between two directions.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    43
 *
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    44
 * This enumeration is used to mark differences between
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    45
 * two directions. If you get one direction you can align
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    46
 * a second direction in 8 different ways. This enumeration
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    47
 * only contains 6 of these 8 differences, but the remaining
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    48
 * two can be calculated by adding to differences together.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    49
 * This also means you can add two differences together and
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    50
 * get the difference you really want to get. The difference
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    51
 * of 45 degrees left + the difference of 45 degrees right results in the
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    52
 * difference of 0 degrees.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    53
 *
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    54
 * @note To get this mentioned addition of direction you must use
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    55
 *       modulo DIR_END or use the #ChangeDirDiff(DirDiff, DirDiff) function.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    56
 * @see ChangeDirDiff(DirDiff, DirDiff)
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    57
 */
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
    58
enum DirDiff {
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    59
	DIRDIFF_SAME    = 0,    ///< Both directions faces to the same direction
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    60
	DIRDIFF_45RIGHT = 1,    ///< Angle of 45 degrees right
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    61
	DIRDIFF_90RIGHT = 2,    ///< Angle of 90 degrees right
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    62
	DIRDIFF_REVERSE = 4,    ///< One direction is the opposit of the other one
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    63
	DIRDIFF_90LEFT  = 6,    ///< Angle of 90 degrees left
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    64
	DIRDIFF_45LEFT  = 7     ///< Angle of 45 degrees left
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
    65
};
3158
a821c8fec829 (svn r3784) Add a type and functions to handle direction changes
tron
parents: 3157
diff changeset
    66
a821c8fec829 (svn r3784) Add a type and functions to handle direction changes
tron
parents: 3157
diff changeset
    67
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    68
/**
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    69
 * Enumeration for diagonal directions.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    70
 *
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    71
 * This enumeration is used for the 4 direction of the tile-edges.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    72
 */
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
    73
enum DiagDirection {
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    74
	DIAGDIR_BEGIN = 0,      ///< Used for iterations
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    75
	DIAGDIR_NE  = 0,        ///< Northeast, upper right on your monitor
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    76
	DIAGDIR_SE  = 1,        ///< Southeast
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    77
	DIAGDIR_SW  = 2,        ///< Southwest
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    78
	DIAGDIR_NW  = 3,        ///< Northwest
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    79
	DIAGDIR_END,            ///< Used for iterations
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    80
	INVALID_DIAGDIR = 0xFF, ///< Flag for an invalid DiagDirection
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
    81
};
3147
0a09ce6d651a (svn r3767) Move all direction related enums and functions to a separate header
tron
parents:
diff changeset
    82
8775
2b4b7efc41f6 (svn r11843) -Fix: mark dirty canal tile even in diagonal direction from flooded tile
smatz
parents: 8596
diff changeset
    83
/** Allow incrementing of DiagDirection variables */
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    84
DECLARE_POSTFIX_INCREMENT(DiagDirection);
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    85
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    86
/** Define basic enum properties */
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    87
template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, byte, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR> {};
6928
44797333bcbf (svn r9568) -Documentation: doxygen and comment changes: Root of src is finally done. Now, time to start clearing as much as possible
belugas
parents: 6574
diff changeset
    88
typedef TinyEnumT<DiagDirection> DiagDirectionByte; //typedefing-enumification of DiagDirection
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    89
3147
0a09ce6d651a (svn r3767) Move all direction related enums and functions to a separate header
tron
parents:
diff changeset
    90
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    91
/**
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    92
 * Enumeration for the difference between to DiagDirection.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    93
 *
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    94
 * As the DiagDirection only contains 4 possible directions the
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    95
 * difference between two of these directions can only be in 4 ways.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    96
 * As the DirDiff enumeration the values can be added together and
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    97
 * you will get the resulting difference (use modulo DIAGDIR_END).
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    98
 *
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
    99
 * @see DirDiff
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   100
 */
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
   101
enum DiagDirDiff {
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   102
	DIAGDIRDIFF_SAME    = 0,        ///< Same directions
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   103
	DIAGDIRDIFF_90RIGHT = 1,        ///< 90 degrees right
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   104
	DIAGDIRDIFF_REVERSE = 2,        ///< Reverse directions
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   105
	DIAGDIRDIFF_90LEFT  = 3         ///< 90 degrees left
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
   106
};
3163
129a91e147b8 (svn r3789) Add an enum and function to handle DiagDirection changes
tron
parents: 3162
diff changeset
   107
8137
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents: 7890
diff changeset
   108
/** Allow incrementing of DiagDirDiff variables */
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents: 7890
diff changeset
   109
DECLARE_POSTFIX_INCREMENT(DiagDirDiff);
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents: 7890
diff changeset
   110
3153
301c1d71122b (svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends
tron
parents: 3148
diff changeset
   111
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   112
/**
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   113
 * Enumeration for the two axis X and Y
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   114
 *
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   115
 * This enumeration represente the two axis X and Y in the game.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   116
 * The X axis is the one which goes align the north-west edge
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   117
 * (and south-east edge). The Y axis must be so the one which goes
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   118
 * align the north-east edge (and south-west) edge.
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   119
 */
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
   120
enum Axis {
7890
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   121
	AXIS_X = 0,     ///< The X axis
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   122
	AXIS_Y = 1,     ///< The y axis
94c64bc6b1a6 (svn r10763) -Documentation [FS#1098]: document direction.h. Patch by Progman.
rubidium
parents: 6928
diff changeset
   123
	AXIS_END        ///< Used for iterations
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6451
diff changeset
   124
};
3147
0a09ce6d651a (svn r3767) Move all direction related enums and functions to a separate header
tron
parents:
diff changeset
   125
8596
27646407e0bc (svn r11661) -Codechange: some header reworks in order to try to reduce the compile time of OpenTTD by reduce the amount of circular-ish dependencies.
rubidium
parents: 8137
diff changeset
   126
#endif /* DIRECTION_TYPE_H */