aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorEugene Sandulenko2016-03-11 19:33:43 +0100
committerEugene Sandulenko2016-03-14 07:51:37 +0100
commitaaa858df0005ae0aefe5bb049fcd156eb1060522 (patch)
tree17474ab58080c3bde113cc664ee0c75ec764f358 /engines/wage
parent3f2469c33ed6017d3c385fbbfd01a4e690987fbc (diff)
downloadscummvm-rg350-aaa858df0005ae0aefe5bb049fcd156eb1060522.tar.gz
scummvm-rg350-aaa858df0005ae0aefe5bb049fcd156eb1060522.tar.bz2
scummvm-rg350-aaa858df0005ae0aefe5bb049fcd156eb1060522.zip
WAGE: Made bounds calulation less restrictive
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/design.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp
index 220acae05a..907a1ec435 100644
--- a/engines/wage/design.cpp
+++ b/engines/wage/design.cpp
@@ -87,16 +87,14 @@ void Design::paint(Graphics::Surface *surface, Patterns &patterns, int x, int y)
bool needRender = false;
if (_surface == NULL) {
- //_boundsCalculationMode = true;
+ _boundsCalculationMode = true;
_bounds->debugPrint(4, "Internal bounds:");
- //_bounds->left = _bounds->top = 10000;
- //_bounds->right =_bounds->bottom = -10000;
- //render(patterns);
+ render(patterns);
_boundsCalculationMode = false;
if (_bounds->right == -10000) {
_bounds->left = _bounds->top = _bounds->right = _bounds->bottom = 0;
}
- //_bounds->debugPrint(4, "Calculated bounds:");
+ _bounds->debugPrint(4, "Calculated bounds:");
_surface = new Graphics::Surface;
_surface->create(_bounds->width(), _bounds->height(), Graphics::PixelFormat::createFormatCLUT8());
@@ -201,9 +199,7 @@ bool Design::isPointOpaque(int x, int y) {
}
void Design::adjustBounds(int16 x, int16 y) {
- _bounds->left = MIN(x, _bounds->left);
_bounds->right = MAX(x, _bounds->right);
- _bounds->top = MIN(y, _bounds->top);
_bounds->bottom = MAX(y, _bounds->bottom);
}