scummvm/scummvm — pull request #246 by lordhoto (2012-06-16 02:36:32+00:00)
Title: OSYSTEM: Use void buffers for screen/overlay/mouse buffers and proper pitch values for overlay code

As the titlte says this pull request changes copyRectToScreen, copyRectToOverlay, grabOverlay and setMouseCursor to accept an void buffers instead of byte resp. OverlayColor buffers. For the game screen and mouse this avoids needs of casts in frontend code which uses Graphics::Surface or uint16 buffers for their screen data. For the overlay this allows us to get rid of OverlayColor, which won't be a proper concept for a future SDL and OpenGL overlay implementation where the overlay might be 2Bpp or 4Bpp depending on the current game screen.

This also removes an old todo, which was about overlay related OSystem functions using a pixel "pitch" instead of a proper "pitch" value.

As always all backends except the default SDL and the OpenGL backend are adapted, but not even compile tested. SDL and OpenGL ones are working fine as far as a quick check with our launcher and a small launch of Kyra1 suggests.

Will be happy to hear what you guys think of this.