aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/gfx
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-08-13 01:14:05 +0200
committerEinar Johan Trøan Sømåen2012-08-13 01:14:05 +0200
commitc1b5626bca1e0e08316353f1ead00ed763cd5380 (patch)
treee7943d17ee0b1097734111feca2256c4c98625ce /engines/wintermute/base/gfx
parent30f35c4c3fce92cbdad38e5bfdeebc4e282d7b2e (diff)
downloadscummvm-rg350-c1b5626bca1e0e08316353f1ead00ed763cd5380.tar.gz
scummvm-rg350-c1b5626bca1e0e08316353f1ead00ed763cd5380.tar.bz2
scummvm-rg350-c1b5626bca1e0e08316353f1ead00ed763cd5380.zip
WINTERMUTE: Apply color-key to RGB-images, and upconvert them to RGBA.
Diffstat (limited to 'engines/wintermute/base/gfx')
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
index 7845390871..400bb1de41 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
@@ -149,8 +149,12 @@ bool BaseSurfaceOSystem::finishLoad() {
_surface = image->getSurface()->convertTo(g_system->getScreenFormat(), image->getPalette());
TransparentSurface trans(*_surface);
trans.applyColorKey(_ckRed, _ckGreen, _ckBlue, true);
- } else if (image->getSurface()->format.bytesPerPixel == 4 && image->getSurface()->format != g_system->getScreenFormat()) {
+ } else if (image->getSurface()->format.bytesPerPixel >= 3 && image->getSurface()->format != g_system->getScreenFormat()) {
_surface = image->getSurface()->convertTo(g_system->getScreenFormat());
+ if (image->getSurface()->format.bytesPerPixel == 3) {
+ TransparentSurface trans(*_surface);
+ trans.applyColorKey(_ckRed, _ckGreen, _ckBlue, true);
+ }
} else {
_surface = new Graphics::Surface();
_surface->copyFrom(*image->getSurface());