diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index 9178482c8eb1..44891f16377a 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -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(); @@ -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++) { diff --git a/engines/wage/design.h b/engines/wage/design.h index 94a620a0988f..baa99730fea1 100644 --- a/engines/wage/design.h +++ b/engines/wage/design.h @@ -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 {