diff options
author | skidd13 <skidd13@openttd.org> | 2008-03-25 18:59:25 +0000 |
---|---|---|
committer | skidd13 <skidd13@openttd.org> | 2008-03-25 18:59:25 +0000 |
commit | 82eebc20c02422cc5e3cb5ec9d7a5c7898208b79 (patch) | |
tree | 377797a9be04f0ebe6ef3ad5e94c983c1760396f /src/road_func.h | |
parent | 2023f5954122a7dbb66963cfaa54678719aae011 (diff) | |
download | openttd-82eebc20c02422cc5e3cb5ec9d7a5c7898208b79.tar.xz |
(svn r12419) -Cleanup: of the internal road-piece building and removing.
Diffstat (limited to 'src/road_func.h')
-rw-r--r-- | src/road_func.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ -101,6 +101,17 @@ static inline RoadBits RotateRoadBits(RoadBits r, DiagDirDiff rot) } /** + * 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 * * This function returns a RoadBits value which belongs to |