diff options
author | Filippos Karapetis | 2009-09-04 10:15:12 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-09-04 10:15:12 +0000 |
commit | c3a13a6ae634e4dbca81ab9623414a2bdf82ff26 (patch) | |
tree | ac909d5f63b49f321f2c706d2ca859ed9d84c77b /engines/sci/gfx/gfx_pixmap_scale.cpp | |
parent | 9381362277c6626f53d6ae8a706d7af76bb930e1 (diff) | |
download | scummvm-rg350-c3a13a6ae634e4dbca81ab9623414a2bdf82ff26.tar.gz scummvm-rg350-c3a13a6ae634e4dbca81ab9623414a2bdf82ff26.tar.bz2 scummvm-rg350-c3a13a6ae634e4dbca81ab9623414a2bdf82ff26.zip |
Removed the "reverse alpha" flag from the graphics driver code. Alpha values are now always 0 for transparent, up to 255 for opaque
svn-id: r43939
Diffstat (limited to 'engines/sci/gfx/gfx_pixmap_scale.cpp')
-rw-r--r-- | engines/sci/gfx/gfx_pixmap_scale.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/engines/sci/gfx/gfx_pixmap_scale.cpp b/engines/sci/gfx/gfx_pixmap_scale.cpp index 392f3bbf6b..865fcf3662 100644 --- a/engines/sci/gfx/gfx_pixmap_scale.cpp +++ b/engines/sci/gfx/gfx_pixmap_scale.cpp @@ -44,8 +44,8 @@ namespace Sci { template<int COPY_BYTES, typename SIZETYPE, int EXTRA_BYTE_OFFSET> void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) { SIZETYPE result_colors[GFX_PIC_COLORS]; - SIZETYPE alpha_color = 0xffffffff & 0; - SIZETYPE alpha_ormask = 0; + SIZETYPE alpha_color = 0; + SIZETYPE alpha_ormask = 0xffffffff & 0; int xfact = (scale) ? mode->xfact : 1; int yfact = (scale) ? mode->yfact : 1; int widthc, heightc; // Width duplication counter @@ -53,19 +53,14 @@ void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale int bytespp = mode->bytespp; int x, y; int i; - byte byte_transparent = (mode->flags & GFX_MODE_FLAG_REVERSE_ALPHA) ? 0 : 255; - byte byte_opaque = (mode->flags & GFX_MODE_FLAG_REVERSE_ALPHA) ? 255 : 0; + byte byte_transparent = 0; + byte byte_opaque = 255; byte *src = pxm->index_data; byte *dest = pxm->data; byte *alpha_dest = pxm->alpha_map; int using_alpha = pxm->color_key != GFX_PIXMAP_COLOR_KEY_NONE; int separate_alpha_map = using_alpha; - if (mode->flags & GFX_MODE_FLAG_REVERSE_ALPHA) { - alpha_ormask = alpha_color; - alpha_color = 0; - } - assert(bytespp == COPY_BYTES); if (separate_alpha_map && !alpha_dest) |