scummvm/scummvm — pull request #391 by tobiatesan (2013-09-12 11:30:58+00:00)
Title: Blending

Blending functionality.
Probably still room for optimization, but doesn't break games and looks pretty much the same as the original for a few custom test cases encompassing the various types of blending with & without colormod and alpha in the PNG..

There are a few barely noticeable cases where really really dark grey turns into total black which are due to the - preexisting - * 255 >> 8 approximation, so that's a feature, not a bug; also the 16bpp renderer tends to clip those a bit.

Also, it suffers, of course, from the bug in the PNG decoder that forces an a channel for RGB PNGs, but I can't do anything in here about that.