equal
deleted
inserted
replaced
42 |
42 |
43 uint GetBridgeHeight(TileIndex t) |
43 uint GetBridgeHeight(TileIndex t) |
44 { |
44 { |
45 uint h; |
45 uint h; |
46 Slope tileh = GetTileSlope(t, &h); |
46 Slope tileh = GetTileSlope(t, &h); |
47 uint f = GetBridgeFoundation(tileh, DiagDirToAxis(GetBridgeRampDirection(t))); |
47 Foundation f = GetBridgeFoundation(tileh, DiagDirToAxis(GetBridgeRampDirection(t))); |
48 |
48 |
49 /* one height level extra if the ramp is on a flat foundation */ |
49 /* one height level extra if the ramp is on a flat foundation */ |
50 return |
50 return |
51 h + TILE_HEIGHT + |
51 h + TILE_HEIGHT + |
52 (IS_INT_INSIDE(f, 1, 15) ? TILE_HEIGHT : 0) + |
52 (IsLeveledFoundation(f) ? TILE_HEIGHT : 0) + |
53 (IsSteepSlope(tileh) ? TILE_HEIGHT : 0); |
53 (IsSteepSlope(tileh) ? TILE_HEIGHT : 0); |
54 } |
54 } |