src/bridge_gui.cpp
changeset 8558 2f50ad3af2a9
parent 8557 d5fb341fc220
child 9115 47ae980bace3
equal deleted inserted replaced
8557:d5fb341fc220 8558:2f50ad3af2a9
   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 */