diff options
author | Eugene Sandulenko | 2016-01-04 22:59:11 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-01-04 22:59:11 +0100 |
commit | e4002d3fee0ce59adc93983a6232cc51b606a7e7 (patch) | |
tree | c4f2230a94bd13e5a54021280fcbab5d9f7ba8e6 | |
parent | 3eeb240f95a18b0371b5c9c35bdcee56d23e54de (diff) | |
download | scummvm-rg350-e4002d3fee0ce59adc93983a6232cc51b606a7e7.tar.gz scummvm-rg350-e4002d3fee0ce59adc93983a6232cc51b606a7e7.tar.bz2 scummvm-rg350-e4002d3fee0ce59adc93983a6232cc51b606a7e7.zip |
WAGE: Fixed bitmap rendering
-rw-r--r-- | engines/wage/design.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index 82d8ba7fbb..6c8fa7fa3c 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -395,11 +395,11 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::ReadStream &in, bool numBytes -= 10; int x = 0, y = 0; - while (numBytes) { + while (numBytes > 0) { int n = in.readSByte(); int count; int b; - int state; + int state = 0; numBytes--; @@ -433,14 +433,23 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::ReadStream &in, bool y++; if (y == h) - return; + break; x = 0; break; } } + + if (y == h) + break; } + + if (y == h) + break; } + + while (numBytes--) + in.readByte(); } void Design::drawFilledRect(Graphics::Surface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType) { |