diff options
author | rubidium <rubidium@openttd.org> | 2008-01-09 21:05:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-01-09 21:05:03 +0000 |
commit | 998d7644f6a1b58de0b06d539c0436808b1f1e95 (patch) | |
tree | 6b9fc11a0135e1ccdb74151dd8962e4fd5264843 /src/road_func.h | |
parent | 82fe2885abb359c813908b0c844533bfec2c2b22 (diff) | |
download | openttd-998d7644f6a1b58de0b06d539c0436808b1f1e95.tar.xz |
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
Diffstat (limited to 'src/road_func.h')
-rw-r--r-- | src/road_func.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/road_func.h b/src/road_func.h index 4bec22415..59de2d0a5 100644 --- a/src/road_func.h +++ b/src/road_func.h @@ -113,4 +113,26 @@ static inline RoadBits DiagDirToRoadBits(DiagDirection d) return (RoadBits)(ROAD_NW << (3 ^ d)); } +/** + * Finds out, whether given player has all given RoadTypes available + * @param PlayerID ID of player + * @param rts RoadTypes to test + * @return true if player has all requested RoadTypes available + */ +bool HasRoadTypesAvail(const PlayerID p, const RoadTypes rts); + +/** + * Validate functions for rail building. + * @param rt road type to check. + * @return true if the current player may build the road. + */ +bool ValParamRoadType(const RoadType rt); + +/** + * Get the road types the given player can build. + * @param p the player to get the roadtypes for. + * @return the road types. + */ +RoadTypes GetPlayerRoadtypes(const PlayerID p); + #endif /* ROAD_FUNC_H */ |