From 50ce3224a9be8fe29a6f26568d461c853d24b74a Mon Sep 17 00:00:00 2001 From: ysj1173886760 <1173886760@qq.com> Date: Fri, 26 Mar 2021 21:34:25 +0800 Subject: [PATCH] WAGE: change the offset and padding when drawing design --- engines/wage/design.cpp | 6 ++++-- engines/wage/entities.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index 90acc704df3..d74f99fa747 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -133,8 +133,10 @@ void Design::paint(Graphics::ManagedSurface *surface, Graphics::MacPatterns &pat render(patterns); if (_bounds->width() && _bounds->height()) { - const int padding = 3; - Common::Rect from(padding, padding, _bounds->width() - 2 * padding, _bounds->height() - 2 * padding); + const int padding = 20; +// Common::Rect from(padding, padding, _bounds->width() - 2 * padding, _bounds->height() - 2 * padding); + // in order to restore the design, we just cut the left and top part of that + Common::Rect from(padding, padding, _bounds->width(), _bounds->height()); Common::Rect to(from); to.moveTo(x, y); surface->transBlitFrom(*_surface, from, to, kColorGreen); diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp index 7d22cadbda2..e72e038f910 100644 --- a/engines/wage/entities.cpp +++ b/engines/wage/entities.cpp @@ -141,7 +141,7 @@ Scene::~Scene() { } void Scene::paint(Graphics::ManagedSurface *surface, int x, int y) { - Common::Rect r(x + 5, y + 5, _design->getBounds()->width() + x - 10, _design->getBounds()->height() + y - 10); + Common::Rect r(x, y, surface->w + x, surface->h + y); surface->fillRect(r, kColorWhite); _design->paint(surface, *((WageEngine *)g_engine)->_world->_patterns, x, y);