(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends

This commit is contained in:
tron
2006-03-06 20:28:28 +00:00
parent fc1e9c5a92
commit 2d3c28f2b3
10 changed files with 83 additions and 71 deletions

View File

@@ -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,