diff options
author | Torbjörn Andersson | 2003-12-20 13:35:00 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-12-20 13:35:00 +0000 |
commit | 456f01b8fd8fe844b58c829d25d793adfbc33f3a (patch) | |
tree | 658903e761ba4290b0a1fa7eaff64b2638abb9cb | |
parent | 437489473379837090573fd7e66d3645bd243982 (diff) | |
download | scummvm-rg350-456f01b8fd8fe844b58c829d25d793adfbc33f3a.tar.gz scummvm-rg350-456f01b8fd8fe844b58c829d25d793adfbc33f3a.tar.bz2 scummvm-rg350-456f01b8fd8fe844b58c829d25d793adfbc33f3a.zip |
A comment in decompressRLE0() said that the images are vertically flipped,
but I'm not so sure. I've changed the code to assume that they're not, and
this fixes both the drawing of the worker in the background of the first
room, and of the fan at the police station.
svn-id: r11780
-rw-r--r-- | sword1/screen.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sword1/screen.cpp b/sword1/screen.cpp index 19543c1c6a..80b61dc5ce 100644 --- a/sword1/screen.cpp +++ b/sword1/screen.cpp @@ -609,27 +609,26 @@ void SwordScreen::decompressRLE7(uint8 *src, uint32 compSize, uint8 *dest) { } void SwordScreen::decompressRLE0(uint8 *src, uint32 compSize, uint8 *dest, uint16 width) { - // these are saved vertically flipped. *SIIIIIIIGH* uint8 *srcBufEnd = src + compSize; - uint16 destX = width-1; + uint16 destX = 0; while (src < srcBufEnd) { uint8 color = *src++; if (color) { dest[destX] = color; - if (destX == 0) { - destX = width-1; + if (destX == width-1) { + destX = 0; dest += width; } else - destX--; + destX++; } else { uint8 skip = *src++; for (uint16 cnt = 0; cnt < skip; cnt++) { dest[destX] = 0; - if (destX == 0) { - destX = width-1; + if (destX == width-1) { + destX = 0; dest += width; } else - destX--; + destX++; } } } |