diff options
author | belugas <belugas@openttd.org> | 2008-02-11 04:12:30 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2008-02-11 04:12:30 +0000 |
commit | 4f0e6ab0ea905318de73f345ad8674c3866df404 (patch) | |
tree | 879853417b4a7923051e4d8ebc3db81a8302897a /src/bridge.h | |
parent | d8b35268405d4a76322c7c12ebc7f8c41fa582d7 (diff) | |
download | openttd-4f0e6ab0ea905318de73f345ad8674c3866df404.tar.xz |
(svn r12107) -Codechange: Add and use the typedef BridgeType
Diffstat (limited to 'src/bridge.h')
-rw-r--r-- | src/bridge.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bridge.h b/src/bridge.h index 29afd06b1..96526850d 100644 --- a/src/bridge.h +++ b/src/bridge.h @@ -13,6 +13,8 @@ enum { MAX_BRIDGES = 13 }; +typedef uint BridgeType; + /** Struct containing information about a single bridge type */ struct Bridge { @@ -35,7 +37,7 @@ extern Bridge _bridge[MAX_BRIDGES]; Foundation GetBridgeFoundation(Slope tileh, Axis axis); bool HasBridgeFlatRamp(Slope tileh, Axis axis); -static inline const Bridge *GetBridgeSpec(uint i) +static inline const Bridge *GetBridgeSpec(BridgeType i) { assert(i < lengthof(_bridge)); return &_bridge[i]; @@ -43,7 +45,7 @@ static inline const Bridge *GetBridgeSpec(uint i) void DrawBridgeMiddle(const TileInfo *ti); -bool CheckBridge_Stuff(byte bridge_type, uint bridge_len); +bool CheckBridge_Stuff(BridgeType bridge_type, uint bridge_len); int CalcBridgeLenCostFactor(int x); void ResetBridges(); |