From e7a802700c3872215049d304fb6898549eef56f5 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Sat, 2 Jun 2012 13:48:26 +0200 Subject: WINTERMUTE: Add color-keying for BSurfaceSDL BMPs --- engines/wintermute/graphics/transparentSurface.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/wintermute/graphics') diff --git a/engines/wintermute/graphics/transparentSurface.cpp b/engines/wintermute/graphics/transparentSurface.cpp index d7f8719b6e..33f2043839 100644 --- a/engines/wintermute/graphics/transparentSurface.cpp +++ b/engines/wintermute/graphics/transparentSurface.cpp @@ -278,6 +278,7 @@ TransparentSurface *TransparentSurface::scale(int xSize, int ySize) const { * @param overwriteAlpha if true, all other alpha will be set fully opaque */ void TransparentSurface::applyColorKey(uint8 rKey, uint8 gKey, uint8 bKey, bool overwriteAlpha) { + assert(format.bytesPerPixel == 4); for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { uint32 pix = ((uint32 *)pixels)[i * w + j]; -- cgit v1.2.3