aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorBorja Lorente2016-07-29 11:05:35 +0200
committerBorja Lorente2016-07-31 14:05:15 +0200
commitb8d36443f36a6302f95ee7cc28f063b378810dcc (patch)
tree5cd4c16de2199693a3f223303fa1fef6c24762c9 /engines/wage
parent1f00d2a09995436551ac42df49df5ab0f710357e (diff)
downloadscummvm-rg350-b8d36443f36a6302f95ee7cc28f063b378810dcc.tar.gz
scummvm-rg350-b8d36443f36a6302f95ee7cc28f063b378810dcc.tar.bz2
scummvm-rg350-b8d36443f36a6302f95ee7cc28f063b378810dcc.zip
WAGE: Remove unnecessary border code
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/design.cpp39
1 files changed, 2 insertions, 37 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp
index f28d583d8f..ef50a28133 100644
--- a/engines/wage/design.cpp
+++ b/engines/wage/design.cpp
@@ -102,7 +102,7 @@ void Design::paint(Graphics::ManagedSurface *surface, Graphics::MacPatterns &pat
_surface->create(_bounds->width(), _bounds->height(), Graphics::PixelFormat::createFormatCLUT8());
_surface->clear(kColorGreen);
-
+
needRender = true;
}
@@ -263,36 +263,6 @@ void drawPixelPlain(int x, int y, int color, void *data) {
if (x >= 0 && x < p->surface->w && y >= 0 && y < p->surface->h)
*((byte *)p->surface->getBasePtr(x, y)) = (byte)color;
}
-/*
-void Design::drawRect(Graphics::ManagedSurface *surface, Common::ReadStream &in,
- Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
- int16 y1 = in.readSint16BE();
- int16 x1 = in.readSint16BE();
- int16 y2 = in.readSint16BE();
- int16 x2 = in.readSint16BE();
-
- if (x1 > x2)
- SWAP(x1, x2);
- if (y1 > y2)
- SWAP(y1, y2);
-
- Common::Rect r(x1, y1, x2, y2);
- PlotData pd(surface, &patterns, fillType, 1, this);
-
- if (fillType <= patterns.size())
- Graphics::drawFilledRect(r, kColorBlack, drawPixel, &pd);
-
- pd.fillType = borderFillType;
- pd.thickness = borderThickness;
-
- if (borderThickness > 0 && borderFillType <= patterns.size()) {
- Graphics::drawLine(x1, y1, x2, y1, kColorBlack, drawPixel, &pd);
- Graphics::drawLine(x2, y1, x2, y2, kColorBlack, drawPixel, &pd);
- Graphics::drawLine(x2, y2, x1, y2, kColorBlack, drawPixel, &pd);
- Graphics::drawLine(x1, y2, x1, y1, kColorBlack, drawPixel, &pd);
- }
-}
-*/
void Design::drawRect(Graphics::ManagedSurface *surface, Common::ReadStream &in,
Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
@@ -309,12 +279,7 @@ void Design::drawRect(Graphics::ManagedSurface *surface, Common::ReadStream &in,
Common::Rect r(x1, y1, x2, y2);
PlotData pd(surface, &patterns, fillType, 1, this);
- const Graphics::Surface s(*surface);
- Graphics::TransparentSurface *ts = new Graphics::TransparentSurface(*surface);
- Graphics::NinePatchBitmap bmp(ts, true);
- //bmp.blit(s, x1, y1, (x2 - x1), (y2 - y1));
-
- if (fillType <= patterns.size())
+ if (fillType <= patterns.size())
Graphics::drawFilledRect(r, kColorBlack, drawPixel, &pd);
pd.fillType = borderFillType;