src/bridge_gui.cpp
branchNewGRF_ports
changeset 6877 889301acc299
parent 6872 1c4a4a609f85
child 6878 7d1ff2f621c7
equal deleted inserted replaced
6876:2c40faeef7a5 6877:889301acc299
    14 #include "window_func.h"
    14 #include "window_func.h"
    15 #include "sound_func.h"
    15 #include "sound_func.h"
    16 #include "map_func.h"
    16 #include "map_func.h"
    17 #include "viewport_func.h"
    17 #include "viewport_func.h"
    18 #include "gfx_func.h"
    18 #include "gfx_func.h"
       
    19 #include "tunnelbridge.h"
    19 
    20 
    20 #include "table/strings.h"
    21 #include "table/strings.h"
    21 
    22 
    22 static struct BridgeData {
    23 static struct BridgeData {
    23 	uint8 last_size;
    24 	uint8 last_size;
   180 		errmsg = _error_message;
   181 		errmsg = _error_message;
   181 	} else {
   182 	} else {
   182 		/* check which bridges can be built
   183 		/* check which bridges can be built
   183 		 * get absolute bridge length
   184 		 * get absolute bridge length
   184 		 * length of the middle parts of the bridge */
   185 		 * length of the middle parts of the bridge */
   185 		const uint bridge_len = GetBridgeLength(start, end);
   186 		const uint bridge_len = GetTunnelBridgeLength(start, end);
   186 		/* total length of bridge */
   187 		/* total length of bridge */
   187 		const uint tot_bridgedata_len = CalcBridgeLenCostFactor(bridge_len + 2);
   188 		const uint tot_bridgedata_len = CalcBridgeLenCostFactor(bridge_len + 2);
   188 
   189 
   189 		/* loop for all bridgetypes */
   190 		/* loop for all bridgetypes */
   190 		for (bridge_type = 0; bridge_type != MAX_BRIDGES; bridge_type++) {
   191 		for (bridge_type = 0; bridge_type != MAX_BRIDGES; bridge_type++) {