diff options
author | Einar Johan Trøan Sømåen | 2012-08-13 01:14:05 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-08-13 01:14:05 +0200 |
commit | c1b5626bca1e0e08316353f1ead00ed763cd5380 (patch) | |
tree | e7943d17ee0b1097734111feca2256c4c98625ce | |
parent | 30f35c4c3fce92cbdad38e5bfdeebc4e282d7b2e (diff) | |
download | scummvm-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.
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp | 6 |
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());
|