From 97c17ed199c22fefc33cf12286867a2390af47f3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 30 Dec 2015 01:46:51 +0100 Subject: [PATCH] WAGE; Fix border drawing --- engines/wage/design.cpp | 2 +- engines/wage/entities.cpp | 2 +- engines/wage/gui.cpp | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index c75d1f7758d2..bfe35fb73589 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -159,7 +159,7 @@ void Design::paint(Graphics::Surface *surface, Patterns &patterns, bool mask, in for (int i = 0; i < _bounds->height(); i++) { const byte *src = (const byte *)_surface->getBasePtr(0, i); - byte *dst = (byte *)surface->getBasePtr(0, i); + byte *dst = (byte *)surface->getBasePtr(x, y+i); for (int j = 0; j < _bounds->width(); j++) { if (*src != kColorGreen) *dst = *src; diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp index 96d6855b10d9..bb3cff865651 100644 --- a/engines/wage/entities.cpp +++ b/engines/wage/entities.cpp @@ -110,7 +110,7 @@ Scene::~Scene() { } void Scene::paint(Graphics::Surface *surface, int x, int y) { - Common::Rect r(0, 0, _design->getBounds()->width(), _design->getBounds()->height()); + Common::Rect r(x + 5, y + 5, _design->getBounds()->width() + x - 10, _design->getBounds()->height() + y - 10); surface->fillRect(r, kColorWhite); _design->paint(surface, ((WageEngine *)g_engine)->_world->_patterns, false, x, y); diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 4f0532801b5e..3d3c58b9c70a 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -103,7 +103,7 @@ void Gui::drawBox(Graphics::Surface *g, int x, int y, int w, int h) { } void Gui::fillRect(Graphics::Surface *g, int x, int y, int w, int h) { - Common::Rect r(x, y, x + w + 1, y + h + 1); + Common::Rect r(x, y, x + w, y + h); g->fillRect(r, kColorBlack); } @@ -143,9 +143,9 @@ void Gui::paintBorder(Graphics::Surface *g, int x, int y, int width, int height, for (int yy = 0; yy < ARROW_H; yy++) { for (int xx = 0; xx < ARROW_W; xx++) { if (arrowPixels[yy][xx] != 0) { - g->hLine(x1+xx, y1+yy, x1+xx+1, kColorBlack); + g->hLine(x1+xx, y1+yy, x1+xx, kColorBlack); } else { - g->hLine(x1+xx, y1+yy, x1+xx+1, kColorWhite); + g->hLine(x1+xx, y1+yy, x1+xx, kColorWhite); } } } @@ -154,9 +154,9 @@ void Gui::paintBorder(Graphics::Surface *g, int x, int y, int width, int height, for (int yy = 0; yy < ARROW_H; yy++) { for (int xx = 0; xx < ARROW_W; xx++) { if (arrowPixels[ARROW_H-yy-1][xx] != 0) { - g->hLine(x1+xx, y1+yy, x1+xx+1, kColorBlack); + g->hLine(x1+xx, y1+yy, x1+xx, kColorBlack); } else { - g->hLine(x1+xx, y1+yy, x1+xx+1, kColorWhite); + g->hLine(x1+xx, y1+yy, x1+xx, kColorWhite); } } }