aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/graphics
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-02 13:48:26 +0200
committerEinar Johan Trøan Sømåen2012-06-02 13:48:26 +0200
commite7a802700c3872215049d304fb6898549eef56f5 (patch)
tree8e96ebd61110e5c085f817808f57b7bd594d5ef0 /engines/wintermute/graphics
parent2db256605539b82ed4ace20d41c6046f50792706 (diff)
downloadscummvm-rg350-e7a802700c3872215049d304fb6898549eef56f5.tar.gz
scummvm-rg350-e7a802700c3872215049d304fb6898549eef56f5.tar.bz2
scummvm-rg350-e7a802700c3872215049d304fb6898549eef56f5.zip
WINTERMUTE: Add color-keying for BSurfaceSDL BMPs
Diffstat (limited to 'engines/wintermute/graphics')
-rw-r--r--engines/wintermute/graphics/transparentSurface.cpp1
1 files changed, 1 insertions, 0 deletions
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];