Skip to content

Commit

Permalink
WAGE: Simplified bitmap code
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 4, 2016
1 parent e4002d3 commit 9d09466
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions engines/wage/design.cpp
Expand Up @@ -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;
Expand All @@ -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();
Expand All @@ -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--)
Expand Down

0 comments on commit 9d09466

Please sign in to comment.