That code is quite Delphi specific, no wonder you don’t understand it.
The coverage factors are nothing but layer opacities for the detail texture layers. How you calculate them depends on the result you want to achieve. For total control, you can just paint them in a paint program, or alternatively you can generate them procedurally using vertex height and slope.
What this code does, is that if you have specified an explicit coverage map, it just reads it to the coverage factors. The coverages are encoded in an image with different coverages being in different color components.
If the coverage map isn’t there, the values are calculated procedurally. For this, there’s a look-up table (another image) which has, in a way, height as x-axis and slope as y. So when you get the color at point (height, slope), you get the appropriate coverage values. For slope, you can use the y-component of the vertex normal.
-Ilkka