Someone implement this. I desperately need shading for air units and future buildings.. :|

1) UglPutTranslucency1 (target as long, startx as integer, starty as integer, source1 as long, source2 as long)

source2 is an 8bit DC.

For every color component of every pixel in source1, if the corresponding source2 pixel is 1, shade that pixel by reducing each color value by 1/2. (could be 2 if UGL supported it..)

2) UglPutTranslucency2 (target as long, startx as integer, starty as integer, source1 as long, source2 as long, shadevalue as integer)

source2 is an 8bit DC.

For every color component of every pixel in source1, if the corresponding source2 pixel is 1, shade that pixel by multiplying each color value by shadevalue/255 (shadevalue/255 is precalculated).

3) UglPutTranslucency3 (target as long, startx as integer, starty as integer, source1 as long, source2 as long)

source2 is an 8bit DC.

For every color component of every pixel in source1, multiply it by source2 and divide by 255.

-------------------------------

Note: 8 bit needs to only be divided by 2, as all colors are evenly distributed. (right? right?) If only there was 24bit! (stabs self)