From 82eebc20c02422cc5e3cb5ec9d7a5c7898208b79 Mon Sep 17 00:00:00 2001 From: skidd13 Date: Tue, 25 Mar 2008 18:59:25 +0000 Subject: (svn r12419) -Cleanup: of the internal road-piece building and removing. --- src/road_func.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/road_func.h') diff --git a/src/road_func.h b/src/road_func.h index 46269f29d..c0baeee3f 100644 --- a/src/road_func.h +++ b/src/road_func.h @@ -100,6 +100,17 @@ static inline RoadBits RotateRoadBits(RoadBits r, DiagDirDiff rot) return r; } +/** + * Check if we've got a straight road + * + * @param r The given RoadBits + * @return true if we've got a straight road + */ +static inline bool IsStraightRoad(RoadBits r) +{ + return (r == ROAD_X || r == ROAD_Y); +} + /** * Create the road-part which belongs to the given DiagDirection * -- cgit v1.2.3-54-g00ecf