equal
deleted
inserted
replaced
145 |
145 |
146 void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transport_type, byte bridge_type) |
146 void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transport_type, byte bridge_type) |
147 { |
147 { |
148 DeleteWindowById(WC_BUILD_BRIDGE, 0); |
148 DeleteWindowById(WC_BUILD_BRIDGE, 0); |
149 |
149 |
150 _bridgedata.type = ((transport_type << 7) | bridge_type) << 8; //prepare the parameter for use only once |
150 _bridgedata.type = (transport_type << 15) | (bridge_type << 8); //prepare the parameter for use only once |
151 _bridgedata.start_tile = start; |
151 _bridgedata.start_tile = start; |
152 _bridgedata.end_tile = end; |
152 _bridgedata.end_tile = end; |
153 |
153 |
154 /* only query bridge building possibility once, result is the same for all bridges! |
154 /* only query bridge building possibility once, result is the same for all bridges! |
155 * returns CMD_ERROR on failure, and price on success */ |
155 * returns CMD_ERROR on failure, and price on success */ |