scummvm/scummvm — pull request #242 by somaen (2012-05-31 18:43:35+00:00)
Title: GRAPHICS: Add transparentSurface for blitting bitmaps with alpha.

I need alpha blending for bitmaps for the current Wintermute-work, so I refactored the blitting code from the SWORD25-engine, refactored to make the code available for other engines as well.

This should work for atleast a few variations of 4bpp pixelformats (originally it was 16,8,0,24 RGBA-shift, but it should work just as fine for 24,16,8,0 now).

A few notes:
I haven't tested this on a Big-endian machine yet.
applyColorKey hasn't been tested beyond being compilable at all at this point.