(svn r11663) -Codechange: moving of the road related types and functions.

This commit is contained in:
rubidium
2007-12-18 20:38:16 +00:00
parent df0c6eb2b9
commit e4ef359f47
18 changed files with 253 additions and 232 deletions

View File

@@ -494,4 +494,24 @@ static inline bool TracksOverlap(TrackBits bits)
return bits != TRACK_BIT_HORZ && bits != TRACK_BIT_VERT;
}
/**
* Checks whether the trackdir means that we are reversing.
* @param dir the trackdir to check
* @return true if it is a reversing road trackdir
*/
static inline bool IsReversingRoadTrackdir(Trackdir dir)
{
return (dir & 0x07) >= 6;
}
/**
* Checks whether the given trackdir is a straight road
* @param dir the trackdir to check
* @return true if it is a straight road trackdir
*/
static inline bool IsStraightRoadTrackdir(Trackdir dir)
{
return (dir & 0x06) == 0;
}
#endif /* RAIL_H */