(svn r12107) -Codechange: Add and use the typedef BridgeType

This commit is contained in:
belugas
2008-02-11 04:12:30 +00:00
parent d8b3526840
commit 4f0e6ab0ea
4 changed files with 20 additions and 17 deletions

View File

@@ -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();