forked from mirror/OpenTTD
(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends
This commit is contained in:
@@ -34,12 +34,18 @@ static inline DiagDirection ReverseDiagDir(DiagDirection d)
|
||||
}
|
||||
|
||||
|
||||
static inline DiagDirection DirToDiagdir(Direction dir)
|
||||
static inline DiagDirection DirToDiagDir(Direction dir)
|
||||
{
|
||||
return (DiagDirection)(dir >> 1);
|
||||
}
|
||||
|
||||
|
||||
static inline Direction DiagDirToDir(DiagDirection dir)
|
||||
{
|
||||
return (Direction)(dir * 2 + 1);
|
||||
}
|
||||
|
||||
|
||||
/* the 2 axis */
|
||||
typedef enum Axis {
|
||||
AXIS_X = 0,
|
||||
|
Reference in New Issue
Block a user