diff options
author | Eugene Sandulenko | 2016-02-14 14:41:11 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:13:24 +0100 |
commit | acdddf8ade68a4c899c20499ac4ffcc68e94e79d (patch) | |
tree | cec66cf4547d684131fb36e473cc46bc9b2ff11e | |
parent | 9d9fefb17a24c98681ae4bd660d98aa0e67209f9 (diff) | |
download | scummvm-rg350-acdddf8ade68a4c899c20499ac4ffcc68e94e79d.tar.gz scummvm-rg350-acdddf8ade68a4c899c20499ac4ffcc68e94e79d.tar.bz2 scummvm-rg350-acdddf8ade68a4c899c20499ac4ffcc68e94e79d.zip |
WAGE: Simplify bitmap reading code
-rw-r--r-- | engines/wage/design.cpp | 5 | ||||
-rw-r--r-- | engines/wage/design.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index 9178482c8e..44891f1637 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 94a620a098..baa99730fe 100644 --- a/engines/wage/design.h +++ b/engines/wage/design.h @@ -92,7 +92,7 @@ private: 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 { |