diff options
author | Eugene Sandulenko | 2015-12-18 20:08:36 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-27 15:40:54 +0100 |
commit | 0d5c219885e1d04d61b7caf5e524c311eae19ce5 (patch) | |
tree | 53d3c1e3b429df938bdc6d1c4d740b9c8d51dae5 /engines | |
parent | 0c37ed2c56dc30722d877e02b3e5f755e2d7f458 (diff) | |
download | scummvm-rg350-0d5c219885e1d04d61b7caf5e524c311eae19ce5.tar.gz scummvm-rg350-0d5c219885e1d04d61b7caf5e524c311eae19ce5.tar.bz2 scummvm-rg350-0d5c219885e1d04d61b7caf5e524c311eae19ce5.zip |
WAGE: Cleanup, completed all routines
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/design.cpp | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index 0a864385e3..a3a9d14154 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -173,7 +173,6 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, boo int16 by2 = in.readSint16BE(); int16 bx2 = in.readSint16BE(); Common::Rect bbox(bx1, by1, bx2, by2); - warning("Bbox: %d, %d, %d, %d", bx1, by1, bx2, by2); numBytes -= 8; @@ -183,38 +182,29 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, boo Common::Array<int> xcoords; Common::Array<int> ycoords; - warning("Start point is (%d,%d)", x1, y1); numBytes -= 6; while (numBytes > 0) { int y2 = y1; int x2 = x1; int b = in.readSByte(); - //warning("YB = %x", b); if (b == (byte)0x80) { y2 = in.readSint16BE(); numBytes -= 3; } else { - //warning("Y"); y2 += b; numBytes -= 1; } b = in.readSByte(); - //warning("XB = %x", b); if (b == (byte) 0x80) { x2 = in.readSint16BE(); numBytes -= 3; } else { - //warning("X"); x2 += b; numBytes -= 1; } - //surface->setColor(colors[c++]); - //surface->setColor(Color.black); xcoords.push_back(x1); ycoords.push_back(y1); - debug(8, "%d %d %d %d", x1, y1, x2, y2); - //surface->drawLine(x1, y1, x2, y2); x1 = x2; y1 = y2; } @@ -228,35 +218,15 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, boo xpoints[i] = xcoords[i]; ypoints[i] = ycoords[i]; } - // warning(fillType); -/* + + plotData pd(surface, &patterns, fillType, bx1, by1); + if (mask) { - surface->fillPolygon(xpoints, ypoints, npoints); - if (borderThickness > 0) { - Stroke oldStroke = surface->getStroke(); - surface->setStroke(new BasicStroke(borderThickness - 0.5f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL)); - for (int i = 1; i < npoints; i++) - surface->drawLine(xpoints[i-1], ypoints[i-1], xpoints[i], ypoints[i]); - surface->setStroke(oldStroke); - } + drawPolygonScan(xpoints, ypoints, npoints, bbox, kColorBlack, drawPixelPlain, &pd); return; } - if (setPattern(g2d, patterns, fillType - 1)) { - surface->fillPolygon(xpoints, ypoints, npoints); - } - // warning(borderFillType); - //surface->setColor(Color.black); - //if (1==0) - if (borderThickness > 0 && setPattern(g2d, patterns, borderFillType - 1)) { - Stroke oldStroke = surface->getStroke(); - //if (borderThickness != 1) - surface->setStroke(new BasicStroke(borderThickness - 0.5f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL)); -*/ - plotData pd(surface, &patterns, fillType, bx1, by1); drawPolygonScan(xpoints, ypoints, npoints, bbox, kColorBlack, drawPixel, &pd); - // surface->setStroke(oldStroke); -// } pd.fillType = borderFillType; if (borderThickness > 0) { |