@@ -68,23 +68,23 @@ void ResetBridges()
/** Calculate the price factor for building a long bridge.
* Basically the cost delta is 1,1, 1, 2,2, 3,3,3, 4,4,4,4, 5,5,5,5,5, 6,6,6,6,6,6, 7,7,7,7,7,7,7, 8,8,8,8,8,8,8,8,
* @param length Length of the bridge.
* @return Price factor for the bridge.
*/
int CalcBridgeLenCostFactor(int x)
int CalcBridgeLenCostFactor(int length)
{
int n;
int r;
if (x < 2) return x;
x -= 2;
if (length < 2) return length;
length -= 2;
for (n = 0, r = 2;; n++) {
if (x <= n) return r + x * n;
if (length <= n) return r + length * n;
r += n * n;
x -= n;
length -= n;
}
Foundation GetBridgeFoundation(Slope tileh, Axis axis)
if (tileh == SLOPE_FLAT ||