File diff r10498:bb2b452f76fe → r10499:570896340d7a
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -177,25 +177,25 @@ bool CheckBridge_Stuff(BridgeType bridge
 
	return b->min_length <= bridge_len && bridge_len <= max;
 
}
 

	
 
/** Build a Bridge
 
 * @param end_tile end tile
 
 * @param flags type of operation
 
 * @param p1 packed start tile coords (~ dx)
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit  0- 7) - bridge type (hi bh)
 
 * - p2 = (bit  8-14) - rail type or road types.
 
 * - p2 = (bit 15-16) - transport type.
 
 */
 
CommandCost CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2)
 
CommandCost CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	BridgeType bridge_type;
 
	RailType railtype = INVALID_RAILTYPE;
 
	RoadTypes roadtypes = ROADTYPES_NONE;
 
	uint x;
 
	uint y;
 
	uint sx;
 
	uint sy;
 
	TileIndex tile_start;
 
	TileIndex tile_end;
 
	Slope tileh_start;
 
	Slope tileh_end;
 
@@ -464,25 +464,25 @@ not_valid_below:;
 
	}
 

	
 
	return cost;
 
}
 

	
 

	
 
/** Build Tunnel.
 
 * @param start_tile start tile of tunnel
 
 * @param flags type of operation
 
 * @param p1 railtype or roadtypes. bit 9 set means road tunnel
 
 * @param p2 unused
 
 */
 
CommandCost CmdBuildTunnel(TileIndex start_tile, uint32 flags, uint32 p1, uint32 p2)
 
CommandCost CmdBuildTunnel(TileIndex start_tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	TileIndexDiff delta;
 
	TileIndex end_tile;
 
	DiagDirection direction;
 
	Slope start_tileh;
 
	Slope end_tileh;
 
	TransportType transport_type = (TransportType)GB(p1, 9, 1);
 
	uint start_z;
 
	uint end_z;
 
	CommandCost cost(EXPENSES_CONSTRUCTION);
 
	CommandCost ret;