Skip to content

Commit

Permalink
WAGE; Fix border drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Dec 30, 2015
1 parent 0dde7a9 commit 97c17ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion engines/wage/design.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion engines/wage/entities.cpp
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions engines/wage/gui.cpp
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
}
}
Expand All @@ -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);
}
}
}
Expand Down

0 comments on commit 97c17ed

Please sign in to comment.