diff options
author | Willem Jan Palenstijn | 2009-05-25 19:48:52 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-05-25 19:48:52 +0000 |
commit | 183c9e56ed10eacef4131c0f40cc110b67d6c5fd (patch) | |
tree | 0f2f919782c526421644b8e7c4a8cd7f729bdb54 | |
parent | b9b3f126674301e94d01c4a6a8e0e9d6dccb9f4a (diff) | |
download | scummvm-rg350-183c9e56ed10eacef4131c0f40cc110b67d6c5fd.tar.gz scummvm-rg350-183c9e56ed10eacef4131c0f40cc110b67d6c5fd.tar.bz2 scummvm-rg350-183c9e56ed10eacef4131c0f40cc110b67d6c5fd.zip |
SCI: Only let gfxop_set_color use priority/control if mask has their bits set.
This fixes a regression from r39089 where text in the KQ5(floppy) intro
was displayed behind trees.
svn-id: r40893
-rw-r--r-- | engines/sci/gfx/operations.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp index c7bdd61dfc..e2c33b54c7 100644 --- a/engines/sci/gfx/operations.cpp +++ b/engines/sci/gfx/operations.cpp @@ -596,12 +596,13 @@ int gfxop_set_color(GfxState *state, gfx_color_t *color, int r, int g, int b, in // Wrapper for gfxop_set_color int gfxop_set_color(GfxState *state, gfx_color_t *colorOut, gfx_color_t &colorIn) { - if (colorIn.mask & GFX_MASK_VISUAL) - return gfxop_set_color(state, colorOut, colorIn.visual.r, colorIn.visual.g, colorIn.visual.b, - colorIn.alpha, colorIn.priority, colorIn.control); - else - return gfxop_set_color(state, colorOut, -1, -1, -1, colorIn.alpha, - colorIn.priority, colorIn.control); + return gfxop_set_color(state, colorOut, + (colorIn.mask & GFX_MASK_VISUAL) ? colorIn.visual.r : -1, + (colorIn.mask & GFX_MASK_VISUAL) ? colorIn.visual.g : -1, + (colorIn.mask & GFX_MASK_VISUAL) ? colorIn.visual.b : -1, + (colorIn.mask & GFX_MASK_VISUAL) ? colorIn.alpha : -1, + (colorIn.mask & GFX_MASK_PRIORITY) ? colorIn.priority : -1, + (colorIn.mask & GFX_MASK_CONTROL) ? colorIn.control : -1); } int gfxop_set_system_color(GfxState *state, unsigned int index, gfx_color_t *color) { |