Skip to content

Commit

Permalink
WAGE: Simplify bitmap reading code
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 14, 2016
1 parent 9d9fefb commit acdddf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions engines/wage/design.cpp
Expand Up @@ -363,7 +363,7 @@ void Design::drawOval(Graphics::Surface *surface, Common::ReadStream &in,
Graphics::drawEllipse(x1, y1, x2-1, y2-1, kColorBlack, false, drawPixel, &pd);
}

void Design::drawBitmap(Graphics::Surface *surface, Common::ReadStream &in) {
void Design::drawBitmap(Graphics::Surface *surface, Common::SeekableReadStream &in) {
int numBytes = in.readSint16BE();
int y1 = in.readSint16BE();
int x1 = in.readSint16BE();
Expand Down Expand Up @@ -419,8 +419,7 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::ReadStream &in) {
}
}

while (numBytes--)
in.readByte();
in.skip(numBytes);

FloodFill ff(&tmp, kColorWhite, kColorGreen);
for (int yy = 0; yy < h; yy++) {
Expand Down
2 changes: 1 addition & 1 deletion engines/wage/design.h
Expand Up @@ -92,7 +92,7 @@ class Design {
Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
void drawOval(Graphics::Surface *surface, Common::ReadStream &in,
Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
void drawBitmap(Graphics::Surface *surface, Common::ReadStream &in);
void drawBitmap(Graphics::Surface *surface, Common::SeekableReadStream &in);
};

class FloodFill {
Expand Down

0 comments on commit acdddf8

Please sign in to comment.