(svn r8730) -Codechange: more replacements of magic numbers by enums and removal of some (by now) redundant comments.

This commit is contained in:
rubidium
2007-02-14 10:33:36 +00:00
parent 3789e314d9
commit 447b16930e
3 changed files with 38 additions and 44 deletions

View File

@@ -28,4 +28,16 @@ static inline RoadBits DiagDirToRoadBits(DiagDirection d)
return (RoadBits)(1U << (3 ^ d));
}
/** Checks whether the trackdir means that we are reversing */
static inline bool IsReversingRoadTrackdir(Trackdir dir)
{
return (dir & 0x07) >= 6;
}
/** Checks whether the given trackdir is a straight road */
static inline bool IsStraightRoadTrackdir(Trackdir dir)
{
return (dir & 0x06) == 0;
}
#endif /* ROAD_H */