aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWalter van Niftrik2009-04-24 23:05:08 +0000
committerWalter van Niftrik2009-04-24 23:05:08 +0000
commit204174180d6a29ae07f44e527d6044efc7f0915d (patch)
tree9f26c515883bbf5a4ef34b02d2077d063804c43f /engines
parent6ed9adab929ee6591d418b45acddfe94173b3f3f (diff)
downloadscummvm-rg350-204174180d6a29ae07f44e527d6044efc7f0915d.tar.gz
scummvm-rg350-204174180d6a29ae07f44e527d6044efc7f0915d.tar.bz2
scummvm-rg350-204174180d6a29ae07f44e527d6044efc7f0915d.zip
SCI: Initialize pixmap to transparency before decoding cel RLE data. This
fixes some of the views in KQ6. svn-id: r40132
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gfx/res_view1.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sci/gfx/res_view1.cpp b/engines/sci/gfx/res_view1.cpp
index 3bf10cb7de..eea8aa3259 100644
--- a/engines/sci/gfx/res_view1.cpp
+++ b/engines/sci/gfx/res_view1.cpp
@@ -68,6 +68,10 @@ static int decompress_sci_view(int id, int loop, int cel, byte *resource, byte *
int writepos = mirrored ? xl : 0;
int linebase = 0;
+ // For some cels the RLE data ends at the last non-transparent pixel,
+ // so we initialize the whole pixmap to transparency first
+ memset(dest, color_key, pixmap_size);
+
while ((mirrored ? linebase < pixmap_size : writepos < pixmap_size) && literal_pos < size && runlength_pos < size) {
int op = resource[runlength_pos];
int bytes;