MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / HasBridgeFlatRamp

Function HasBridgeFlatRamp

src/tunnelbridge_cmd.cpp:131–136  ·  view source on GitHub ↗

* Determines if the track on a bridge ramp is flat or goes up/down. * * @param tileh Slope of the tile under the bridge head * @param axis Orientation of bridge * @return true iff the track is flat. */

Source from the content-addressed store, hash-verified

129 * @return true iff the track is flat.
130 */
131bool HasBridgeFlatRamp(Slope tileh, Axis axis)
132{
133 ApplyFoundationToSlope(GetBridgeFoundation(tileh, axis), tileh);
134 /* If the foundation slope is flat the bridge has a non-flat ramp and vice versa. */
135 return (tileh != SLOPE_FLAT);
136}
137
138/**
139 * Test if bridge piece uses a custom sprite table.

Callers 2

DrawTile_TunnelBridgeFunction · 0.85
stSlopeCostMethod · 0.85

Calls 2

ApplyFoundationToSlopeFunction · 0.85
GetBridgeFoundationFunction · 0.85

Tested by

no test coverage detected