diff options
author | Strangerke | 2014-02-21 19:35:37 +0100 |
---|---|---|
committer | Strangerke | 2014-02-21 19:35:37 +0100 |
commit | 3a6e4b381ede711762694015cb5acdf415e4b30a (patch) | |
tree | f44bbb24efd1760655129d6943ed8afcb5749990 | |
parent | 0def54a60d8a5c6e63bb5db238bbadf388dede97 (diff) | |
download | scummvm-rg350-3a6e4b381ede711762694015cb5acdf415e4b30a.tar.gz scummvm-rg350-3a6e4b381ede711762694015cb5acdf415e4b30a.tar.bz2 scummvm-rg350-3a6e4b381ede711762694015cb5acdf415e4b30a.zip |
VOYEUR: Fix some more shadowed variables and functions
-rw-r--r-- | engines/voyeur/files.cpp | 20 | ||||
-rw-r--r-- | engines/voyeur/files.h | 4 | ||||
-rw-r--r-- | engines/voyeur/files_threads.cpp | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index 35e426bd66..78dc121223 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -1252,7 +1252,7 @@ ViewPortResource::~ViewPortResource() { delete _rectListPtr[i]; } -void ViewPortResource::setupViewPort(PictureResource *page, Common::Rect *clipRect, +void ViewPortResource::setupViewPort(PictureResource *page, Common::Rect *clippingRect, ViewPortSetupPtr setupFn, ViewPortAddPtr addFn, ViewPortRestorePtr restoreFn) { PictureResource *pic = _currentPic; Common::Rect r = _bounds; @@ -1284,24 +1284,24 @@ void ViewPortResource::setupViewPort(PictureResource *page, Common::Rect *clipRe r.setHeight(yDiff <= r.height() ? r.height() - yDiff : 0); } - if (clipRect) { + if (clippingRect) { // Clip based on the passed clip rectangles - xDiff = clipRect->left - r.left; - yDiff = clipRect->top - r.top; + xDiff = clippingRect->left - r.left; + yDiff = clippingRect->top - r.top; if (xDiff > 0) { int width = r.width(); - r.left = clipRect->left; + r.left = clippingRect->left; r.setWidth(xDiff <= width ? width - xDiff : 0); } if (yDiff > 0) { int height = r.height(); - r.top = clipRect->top; + r.top = clippingRect->top; r.setHeight(yDiff <= height ? height - yDiff : 0); } - xDiff = r.right - clipRect->right; - yDiff = r.bottom - clipRect->bottom; + xDiff = r.right - clippingRect->right; + yDiff = r.bottom - clippingRect->bottom; if (xDiff > 0) r.setWidth(xDiff <= r.width() ? r.width() - xDiff : 0); @@ -1325,8 +1325,8 @@ void ViewPortResource::setupViewPort() { &GraphicsManager::restoreMCGASaveRect); } -void ViewPortResource::setupViewPort(PictureResource *pic, Common::Rect *clipRect) { - setupViewPort(pic, clipRect, +void ViewPortResource::setupViewPort(PictureResource *pic, Common::Rect *clippingRect) { + setupViewPort(pic, clippingRect, &GraphicsManager::setupMCGASaveRect, &GraphicsManager::addRectOptSaveRect, &GraphicsManager::restoreMCGASaveRect); } diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h index ffc5937c63..c445afdbb6 100644 --- a/engines/voyeur/files.h +++ b/engines/voyeur/files.h @@ -317,7 +317,7 @@ class ViewPortResource: public DisplayResource { private: BoltFilesState &_state; private: - void setupViewPort(PictureResource *page, Common::Rect *clipRect, ViewPortSetupPtr setupFn, + void setupViewPort(PictureResource *page, Common::Rect *clippingRect, ViewPortSetupPtr setupFn, ViewPortAddPtr addFn, ViewPortRestorePtr restoreFn); public: ViewPortResource *_parent; @@ -346,7 +346,7 @@ public: virtual ~ViewPortResource(); void setupViewPort(); - void setupViewPort(PictureResource *pic, Common::Rect *clipRect = NULL); + void setupViewPort(PictureResource *pic, Common::Rect *clippingRect = NULL); void addSaveRect(int pageIndex, const Common::Rect &r); void fillPic(byte onOff = 0); void drawIfaceTime(); diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index 501e62b66b..ee626fd4c9 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -771,7 +771,7 @@ const byte *ThreadResource::cardPerform(const byte *card) { idx2 = *card++; int &v1 = _vm->_controlPtr->_state->_vals[idx1]; - int &v2 = _vm->_controlPtr->_state->_vals[idx2]; + v2 = _vm->_controlPtr->_state->_vals[idx2]; v1 /= v2; break; } |