src/bridge_gui.cpp
changeset 9054 281e9ddd2dd0
parent 9053 13c47e8836eb
child 10433 cca9f7948fe5
equal deleted inserted replaced
9053:13c47e8836eb 9054:281e9ddd2dd0
   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 */