aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/design.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2015-12-19 22:43:11 +0100
committerEugene Sandulenko2015-12-27 15:40:56 +0100
commitefab4a1a5bbc2c80046ef955149a56fdc50010d8 (patch)
treee705c20d614390875cd21048c43a92abd0bc4c54 /engines/wage/design.cpp
parentcd84abb2f34b23a64ae67b3247d001462f58dd19 (diff)
downloadscummvm-rg350-efab4a1a5bbc2c80046ef955149a56fdc50010d8.tar.gz
scummvm-rg350-efab4a1a5bbc2c80046ef955149a56fdc50010d8.tar.bz2
scummvm-rg350-efab4a1a5bbc2c80046ef955149a56fdc50010d8.zip
WAGE: Simplify code
Diffstat (limited to 'engines/wage/design.cpp')
-rw-r--r--engines/wage/design.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp
index d914aa2fd3..d17b1319ab 100644
--- a/engines/wage/design.cpp
+++ b/engines/wage/design.cpp
@@ -55,11 +55,9 @@ struct plotData {
Graphics::Surface *surface;
Patterns *patterns;
int fillType;
- int x0;
- int y0;
- plotData(Graphics::Surface *s, Patterns *p, int f, int x, int y) :
- surface(s), patterns(p), fillType(f), x0(x), y0(y) {}
+ plotData(Graphics::Surface *s, Patterns *p, int f) :
+ surface(s), patterns(p), fillType(f) {}
};
Design::Design(Common::SeekableReadStream *data) {
@@ -147,7 +145,7 @@ void Design::drawRect(Graphics::Surface *surface, Common::ReadStream &in, bool m
int16 x2 = in.readSint16BE();
Common::Rect outer(x1, y1, x2, y2);
- plotData pd(surface, &patterns, borderFillType, x1, y1);
+ plotData pd(surface, &patterns, borderFillType);
if (mask) {
drawFilledRect(outer, kColorBlack, drawPixelPlain, &pd);
@@ -171,7 +169,7 @@ void Design::drawRoundRect(Graphics::Surface *surface, Common::ReadStream &in, b
int16 arc = in.readSint16BE();
Common::Rect outer(x1, y1, x2, y2);
- plotData pd(surface, &patterns, borderFillType, x1, y1);
+ plotData pd(surface, &patterns, borderFillType);
if (mask) {
drawFilledRoundRect(outer, arc, kColorBlack, drawPixelPlain, &pd);
@@ -242,7 +240,7 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, boo
ypoints[i] = ycoords[i];
}
- plotData pd(surface, &patterns, fillType, bx1, by1);
+ plotData pd(surface, &patterns, fillType);
if (mask) {
drawPolygonScan(xpoints, ypoints, npoints, bbox, kColorBlack, drawPixelPlain, &pd);
@@ -268,7 +266,7 @@ void Design::drawOval(Graphics::Surface *surface, Common::ReadStream &in, bool m
int16 y2 = in.readSint16BE();
int16 x2 = in.readSint16BE();
- plotData pd(surface, &patterns, borderFillType, x1, y1);
+ plotData pd(surface, &patterns, borderFillType);
if (mask) {
drawFilledEllipse(x1, y1, x2, y2, drawPixelPlain, &pd);