diff options
author | Borja Lorente | 2016-06-21 11:10:37 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-14 18:31:19 +0200 |
commit | 1cee6caf13fdc44cacd50c7382bb7e967589f683 (patch) | |
tree | 1078f73055c59886efc7dfebc78d8e63f6e2f25b /engines/macventure | |
parent | ccc76f2119dcd3b802604294fc1f7bccad645374 (diff) | |
download | scummvm-rg350-1cee6caf13fdc44cacd50c7382bb7e967589f683.tar.gz scummvm-rg350-1cee6caf13fdc44cacd50c7382bb7e967589f683.tar.bz2 scummvm-rg350-1cee6caf13fdc44cacd50c7382bb7e967589f683.zip |
MACVENTURE: Test PPIC1 and 2 decoding
Diffstat (limited to 'engines/macventure')
-rw-r--r-- | engines/macventure/image.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/macventure/image.cpp b/engines/macventure/image.cpp index 33f8ce8848..c1fb7d0ef6 100644 --- a/engines/macventure/image.cpp +++ b/engines/macventure/image.cpp @@ -151,12 +151,13 @@ void ImageAsset::decodeHuffGraphic(const PPICHuff & huff, Common::BitStream & st } pos += blank; } - uint16 edge = _bitWidth & 3; - uint16 bits = 0; - uint16 val = 0; - uint16 v; + + uint16 edge = _bitWidth & 3; if (edge) { pos = _rowBytes - blank; + uint16 bits = 0; + uint16 val = 0; + uint16 v; for (uint y = 0; y < _bitHeight; y++) { if (flags & 1) { if (bits < edge) { @@ -182,6 +183,7 @@ void ImageAsset::decodeHuffGraphic(const PPICHuff & huff, Common::BitStream & st if (flags & 8) { pos = 0; for (uint y = 0; y < _bitHeight; y++) { + uint16 v = 0; if (flags & 2) { for (uint x = 0; x < _rowBytes; x++) { @@ -192,7 +194,7 @@ void ImageAsset::decodeHuffGraphic(const PPICHuff & huff, Common::BitStream & st } else { for (uint x = 0; x < _rowBytes; x++) { - val = _data[pos] ^ v; + uint16 val = _data[pos] ^ v; val ^= (val >> 4) & 0xf; _data[pos] = val; pos++; |