From efab4a1a5bbc2c80046ef955149a56fdc50010d8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 19 Dec 2015 22:43:11 +0100 Subject: WAGE: Simplify code --- engines/wage/design.cpp | 14 ++++++-------- engines/wage/wage.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'engines/wage') diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index d914aa2fd3..d17b1319ab 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -55,11 +55,9 @@ struct plotData { Graphics::Surface *surface; Patterns *patterns; int fillType; - int x0; - int y0; - plotData(Graphics::Surface *s, Patterns *p, int f, int x, int y) : - surface(s), patterns(p), fillType(f), x0(x), y0(y) {} + plotData(Graphics::Surface *s, Patterns *p, int f) : + surface(s), patterns(p), fillType(f) {} }; Design::Design(Common::SeekableReadStream *data) { @@ -147,7 +145,7 @@ void Design::drawRect(Graphics::Surface *surface, Common::ReadStream &in, bool m int16 x2 = in.readSint16BE(); Common::Rect outer(x1, y1, x2, y2); - plotData pd(surface, &patterns, borderFillType, x1, y1); + plotData pd(surface, &patterns, borderFillType); if (mask) { drawFilledRect(outer, kColorBlack, drawPixelPlain, &pd); @@ -171,7 +169,7 @@ void Design::drawRoundRect(Graphics::Surface *surface, Common::ReadStream &in, b int16 arc = in.readSint16BE(); Common::Rect outer(x1, y1, x2, y2); - plotData pd(surface, &patterns, borderFillType, x1, y1); + plotData pd(surface, &patterns, borderFillType); if (mask) { drawFilledRoundRect(outer, arc, kColorBlack, drawPixelPlain, &pd); @@ -242,7 +240,7 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, boo ypoints[i] = ycoords[i]; } - plotData pd(surface, &patterns, fillType, bx1, by1); + plotData pd(surface, &patterns, fillType); if (mask) { drawPolygonScan(xpoints, ypoints, npoints, bbox, kColorBlack, drawPixelPlain, &pd); @@ -268,7 +266,7 @@ void Design::drawOval(Graphics::Surface *surface, Common::ReadStream &in, bool m int16 y2 = in.readSint16BE(); int16 x2 = in.readSint16BE(); - plotData pd(surface, &patterns, borderFillType, x1, y1); + plotData pd(surface, &patterns, borderFillType); if (mask) { drawFilledEllipse(x1, y1, x2, y2, drawPixelPlain, &pd); diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index 0503168449..52a5f5c600 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -110,10 +110,10 @@ Common::Error WageEngine::run() { Common::Rect r(0, 0, screen.w, screen.h); //_world->_objs["frank.1"]->_design->setBounds(&r); //_world->_objs["frank.1"]->_design->paint(&screen, _world->_patterns, false); - //_world->_scenes["temple of the holy mackeral"]->_design->setBounds(&r); - //_world->_scenes["temple of the holy mackeral"]->_design->paint(&screen, _world->_patterns, false); - _world->_scenes["tower level 3"]->_design->setBounds(&r); - _world->_scenes["tower level 3"]->_design->paint(&screen, _world->_patterns, false); + _world->_scenes["temple of the holy mackeral"]->_design->setBounds(&r); + _world->_scenes["temple of the holy mackeral"]->_design->paint(&screen, _world->_patterns, false); + //_world->_scenes["tower level 3"]->_design->setBounds(&r); + //_world->_scenes["tower level 3"]->_design->paint(&screen, _world->_patterns, false); return Common::kNoError; } -- cgit v1.2.3