186 const uint bridge_len = GetTunnelBridgeLength(start, end); |
186 const uint bridge_len = GetTunnelBridgeLength(start, end); |
187 /* total length of bridge */ |
187 /* total length of bridge */ |
188 const uint tot_bridgedata_len = CalcBridgeLenCostFactor(bridge_len + 2); |
188 const uint tot_bridgedata_len = CalcBridgeLenCostFactor(bridge_len + 2); |
189 |
189 |
190 /* loop for all bridgetypes */ |
190 /* loop for all bridgetypes */ |
191 for (bridge_type = 0; bridge_type != MAX_BRIDGES; bridge_type++) { |
191 for (BridgeType brd_type = 0; brd_type != MAX_BRIDGES; brd_type++) { |
192 if (CheckBridge_Stuff(bridge_type, bridge_len)) { |
192 if (CheckBridge_Stuff(brd_type, bridge_len)) { |
193 /* bridge is accepted, add to list */ |
193 /* bridge is accepted, add to list */ |
194 const Bridge *b = GetBridgeSpec(bridge_type); |
194 const Bridge *b = GetBridgeSpec(brd_type); |
195 /* Add to terraforming & bulldozing costs the cost of the |
195 /* Add to terraforming & bulldozing costs the cost of the |
196 * bridge itself (not computed with DC_QUERY_COST) */ |
196 * bridge itself (not computed with DC_QUERY_COST) */ |
197 _bridgedata.costs[j] = ret.GetCost() + (((int64)tot_bridgedata_len * _price.build_bridge * b->price) >> 8); |
197 _bridgedata.costs[j] = ret.GetCost() + (((int64)tot_bridgedata_len * _price.build_bridge * b->price) >> 8); |
198 _bridgedata.indexes[j] = bridge_type; |
198 _bridgedata.indexes[j] = brd_type; |
199 j++; |
199 j++; |
200 } |
200 } |
201 } |
201 } |
202 |
202 |
203 _bridgedata.count = j; |
203 _bridgedata.count = j; |