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

Function PlaceRoad_Bridge

src/road_gui.cpp:124–133  ·  view source on GitHub ↗

* Callback to start placing a bridge. * @param tile Start tile of the bridge. */

Source from the content-addressed store, hash-verified

122 * @param tile Start tile of the bridge.
123 */
124static void PlaceRoad_Bridge(TileIndex tile, Window *w)
125{
126 if (IsBridgeTile(tile)) {
127 TileIndex other_tile = GetOtherTunnelBridgeEnd(tile);
128 Point pt = {0, 0};
129 w->OnPlaceMouseUp(VPM_X_OR_Y, DDSP_BUILD_BRIDGE, pt, other_tile, tile);
130 } else {
131 VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE);
132 }
133}
134
135/**
136 * Callback executed after a build road tunnel command has been called.

Callers 1

OnPlaceObjectMethod · 0.85

Calls 4

IsBridgeTileFunction · 0.85
GetOtherTunnelBridgeEndFunction · 0.85
VpStartPlaceSizingFunction · 0.85
OnPlaceMouseUpMethod · 0.45

Tested by

no test coverage detected