aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/gfx/osystem
diff options
context:
space:
mode:
authorEugene Sandulenko2013-09-12 10:54:37 -0700
committerEugene Sandulenko2013-09-12 10:54:37 -0700
commitbc1a21f210d12ec1338d1e20c8d93413163cfd94 (patch)
treee4bd78b62f2791c71752ca7d981892156e2dd827 /engines/wintermute/base/gfx/osystem
parent1e9fb123647c43e3895eacf2beca7ee09be2ae57 (diff)
parent4fec6dd36179e4e1b1b624b6a242b693647da73e (diff)
downloadscummvm-rg350-bc1a21f210d12ec1338d1e20c8d93413163cfd94.tar.gz
scummvm-rg350-bc1a21f210d12ec1338d1e20c8d93413163cfd94.tar.bz2
scummvm-rg350-bc1a21f210d12ec1338d1e20c8d93413163cfd94.zip
Merge pull request #387 from tobiatesan/trim_arguments
WINTERMUTE: Remove useless Rect extra argument from fadeToColor.
Diffstat (limited to 'engines/wintermute/base/gfx/osystem')
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp22
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.h2
2 files changed, 9 insertions, 15 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index e6d769c653..e4c19fde8b 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -243,22 +243,16 @@ void BaseRenderOSystem::fade(uint16 alpha) {
}
//////////////////////////////////////////////////////////////////////////
-void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect) {
+void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a) {
Common::Rect fillRect;
- if (rect) {
- fillRect.left = rect->left;
- fillRect.top = rect->top;
- fillRect.setWidth(rect->width());
- fillRect.setHeight(rect->height());
- } else {
- Rect32 rc;
- _gameRef->getCurrentViewportRect(&rc);
- fillRect.left = (int16)rc.left;
- fillRect.top = (int16)rc.top;
- fillRect.setWidth((int16)(rc.right - rc.left));
- fillRect.setHeight((int16)(rc.bottom - rc.top));
- }
+ Rect32 rc;
+ _gameRef->getCurrentViewportRect(&rc);
+ fillRect.left = (int16)rc.left;
+ fillRect.top = (int16)rc.top;
+ fillRect.setWidth((int16)(rc.right - rc.left));
+ fillRect.setHeight((int16)(rc.bottom - rc.top));
+
modTargetRect(&fillRect);
//TODO: This is only here until I'm sure about the final pixelformat
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
index 928a52d4fc..306563af3b 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
@@ -70,7 +70,7 @@ public:
bool fill(byte r, byte g, byte b, Common::Rect *rect = nullptr) override;
Graphics::PixelFormat getPixelFormat() const override;
void fade(uint16 alpha) override;
- void fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect = nullptr) override;
+ void fadeToColor(byte r, byte g, byte b, byte a) override;
bool drawLine(int x1, int y1, int x2, int y2, uint32 color) override;