diff options
author | rubidium <rubidium@openttd.org> | 2011-11-04 10:20:24 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-04 10:20:24 +0000 |
commit | a36551dbb4a6aa8a10e99df8331ac4ecb8586270 (patch) | |
tree | f63714ceff46343e77309a9084758de39ca52b9b /src/bridge_map.cpp | |
parent | 7757a2ed406996be35c7179185f2e4e7cba37e12 (diff) | |
download | openttd-a36551dbb4a6aa8a10e99df8331ac4ecb8586270.tar.xz |
(svn r23092) -Codechange: create a non-pixel version of some of the Get*PixelZ functions, and let Get*PixelZ wrap around the new function (multiplying the Z by TILE_HEIGHT) just like TileHeight and TilePixelHeight
Diffstat (limited to 'src/bridge_map.cpp')
-rw-r--r-- | src/bridge_map.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bridge_map.cpp b/src/bridge_map.cpp index 37f4166c3..5bfd7e97f 100644 --- a/src/bridge_map.cpp +++ b/src/bridge_map.cpp @@ -63,16 +63,16 @@ TileIndex GetOtherBridgeEnd(TileIndex tile) } /** - * Get the height ('z') of a bridge in pixels. + * Get the height ('z') of a bridge. * @param tile the bridge ramp tile to get the bridge height from - * @return the height of the bridge in pixels + * @return the height of the bridge. */ -uint GetBridgePixelHeight(TileIndex t) +uint GetBridgeHeight(TileIndex t) { uint h; - Slope tileh = GetTilePixelSlope(t, &h); + Slope tileh = GetTileSlope(t, &h); Foundation f = GetBridgeFoundation(tileh, DiagDirToAxis(GetTunnelBridgeDirection(t))); /* one height level extra for the ramp */ - return h + TILE_HEIGHT + ApplyPixelFoundationToSlope(f, &tileh); + return h + 1 + ApplyFoundationToSlope(f, &tileh); } |