summaryrefslogtreecommitdiff
path: root/src/bridge_gui.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-02-11 04:12:30 +0000
committerbelugas <belugas@openttd.org>2008-02-11 04:12:30 +0000
commit4f0e6ab0ea905318de73f345ad8674c3866df404 (patch)
tree879853417b4a7923051e4d8ebc3db81a8302897a /src/bridge_gui.cpp
parentd8b35268405d4a76322c7c12ebc7f8c41fa582d7 (diff)
downloadopenttd-4f0e6ab0ea905318de73f345ad8674c3866df404.tar.xz
(svn r12107) -Codechange: Add and use the typedef BridgeType
Diffstat (limited to 'src/bridge_gui.cpp')
-rw-r--r--src/bridge_gui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index 11d8ee074..38a576a7e 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -26,7 +26,7 @@ static struct BridgeData {
TileIndex start_tile;
TileIndex end_tile;
uint8 type;
- uint8 indexes[MAX_BRIDGES];
+ BridgeType indexes[MAX_BRIDGES];
Money costs[MAX_BRIDGES];
BridgeData()
@@ -188,14 +188,14 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte bridge_type)
const uint tot_bridgedata_len = CalcBridgeLenCostFactor(bridge_len + 2);
/* loop for all bridgetypes */
- for (bridge_type = 0; bridge_type != MAX_BRIDGES; bridge_type++) {
- if (CheckBridge_Stuff(bridge_type, bridge_len)) {
+ for (BridgeType brd_type = 0; brd_type != MAX_BRIDGES; brd_type++) {
+ if (CheckBridge_Stuff(brd_type, bridge_len)) {
/* bridge is accepted, add to list */
- const Bridge *b = GetBridgeSpec(bridge_type);
+ const Bridge *b = GetBridgeSpec(brd_type);
/* Add to terraforming & bulldozing costs the cost of the
* bridge itself (not computed with DC_QUERY_COST) */
_bridgedata.costs[j] = ret.GetCost() + (((int64)tot_bridgedata_len * _price.build_bridge * b->price) >> 8);
- _bridgedata.indexes[j] = bridge_type;
+ _bridgedata.indexes[j] = brd_type;
j++;
}
}