diff options
author | Eugene Sandulenko | 2016-01-04 23:00:40 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-01-04 23:00:40 +0100 |
commit | 9d09466f505c95e23b2e7e508a2320e33fc596ea (patch) | |
tree | 2a26efb76b91ccc4243446049ee2a936f7b35260 /engines/wage/design.cpp | |
parent | e4002d3fee0ce59adc93983a6232cc51b606a7e7 (diff) | |
download | scummvm-rg350-9d09466f505c95e23b2e7e508a2320e33fc596ea.tar.gz scummvm-rg350-9d09466f505c95e23b2e7e508a2320e33fc596ea.tar.bz2 scummvm-rg350-9d09466f505c95e23b2e7e508a2320e33fc596ea.zip |
WAGE: Simplified bitmap code
Diffstat (limited to 'engines/wage/design.cpp')
-rw-r--r-- | engines/wage/design.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index 6c8fa7fa3c..a5d217b9bd 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -395,7 +395,7 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::ReadStream &in, bool numBytes -= 10; int x = 0, y = 0; - while (numBytes > 0) { + while (numBytes > 0 && y < h) { int n = in.readSByte(); int count; int b; @@ -415,7 +415,7 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::ReadStream &in, bool count = 0; } - for (int i = 0; i < count; i++) { + for (int i = 0; i < count && y < h; i++) { byte color; if (state == 1) { color = in.readByte(); @@ -439,13 +439,7 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::ReadStream &in, bool break; } } - - if (y == h) - break; } - - if (y == h) - break; } while (numBytes--) |