[Scummvm-cvs-logs] scummvm master -> 691ac84f3676e5ce92ef8bc2727ccbcacc29c5cd

Strangerke Strangerke at scummvm.org
Thu Feb 20 23:36:53 CET 2014


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
36a4cda68e VOYEUR: Fix comment related to iForcedDeath
691ac84f36 VOYEUR: Fix some shadowed variables and functions in file handlers


Commit: 36a4cda68eda54296d84c647be73863722d6f26a
    https://github.com/scummvm/scummvm/commit/36a4cda68eda54296d84c647be73863722d6f26a
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-20T14:34:56-08:00

Commit Message:
VOYEUR: Fix comment related to iForcedDeath

Changed paths:
    engines/voyeur/voyeur.cpp



diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 3f9e74d..7bfb4a7 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -73,8 +73,7 @@ Common::Error VoyeurEngine::run() {
 	globalInitBolt();
 
 	// The original allows the victim to be explicitly specified via the command line.
-	// We don't currently support this in ScummVM, but I'm leaving the code below
-	// in case we ever want to make use of it.
+	// This is possible in ScummVM by using a boot parameter.
 	if (_iForceDeath >= 1 && _iForceDeath <= 4)
 		_voy._eventFlags |= EVTFLAG_VICTIM_PRESET;
 


Commit: 691ac84f3676e5ce92ef8bc2727ccbcacc29c5cd
    https://github.com/scummvm/scummvm/commit/691ac84f3676e5ce92ef8bc2727ccbcacc29c5cd
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-20T14:35:20-08:00

Commit Message:
VOYEUR: Fix some shadowed variables and functions in file handlers

Changed paths:
    engines/voyeur/files.cpp
    engines/voyeur/files_threads.cpp



diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index 00219d5..35e426b 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -711,10 +711,10 @@ RectResource::RectResource(const byte *src, int size, bool isExtendedRects) {
 	}
 
 	for (int i = 0; i < count; ++i, src += 8) {
-		int arrIndex = 0, count = 0;
+		int arrIndex = 0, rectCount = 0;
 		if (isExtendedRects) {
 			arrIndex = READ_LE_UINT16(src);
-			count = READ_LE_UINT16(src + 2);
+			rectCount = READ_LE_UINT16(src + 2);
 			src += 4;
 		}
 
@@ -723,7 +723,7 @@ RectResource::RectResource(const byte *src, int size, bool isExtendedRects) {
 		int x2 = READ_LE_UINT16(src + 4); 
 		int y2 = READ_LE_UINT16(src + 6);
 
-		_entries.push_back(RectEntry(x1, y1, x2, y2, arrIndex, count));
+		_entries.push_back(RectEntry(x1, y1, x2, y2, arrIndex, rectCount));
 	}
 
 	left = _entries[0].left;
@@ -766,36 +766,36 @@ void DisplayResource::sFillBox(int width, int height) {
 }
 
 bool DisplayResource::clipRect(Common::Rect &rect) {
-	Common::Rect clipRect;
+	Common::Rect clippingRect;
 	if (_vm->_graphicsManager._clipPtr) {
-		clipRect = *_vm->_graphicsManager._clipPtr;
+		clippingRect = *_vm->_graphicsManager._clipPtr;
 	} else if (_flags & DISPFLAG_VIEWPORT) {
-		clipRect = ((ViewPortResource *)this)->_clipRect;
+		clippingRect = ((ViewPortResource *)this)->_clipRect;
 	} else {
-		clipRect = ((PictureResource *)this)->_bounds;
+		clippingRect = ((PictureResource *)this)->_bounds;
 	}
 
 	Common::Rect r = rect;
-	if (r.left < clipRect.left) {
-		if (r.right <= clipRect.left)
+	if (r.left < clippingRect.left) {
+		if (r.right <= clippingRect.left)
 			return false;
-		r.setWidth(r.right - clipRect.left);
+		r.setWidth(r.right - clippingRect.left);
 	}
-	if (r.right >= clipRect.right) {
-		if (r.left >= clipRect.left)
+	if (r.right >= clippingRect.right) {
+		if (r.left >= clippingRect.left)
 			return false;
-		r.setWidth(clipRect.right - r.left);
+		r.setWidth(clippingRect.right - r.left);
 	}
 
-	if (r.top < clipRect.top) {
-		if (r.bottom <= clipRect.top)
+	if (r.top < clippingRect.top) {
+		if (r.bottom <= clippingRect.top)
 			return false;
-		r.setHeight(r.bottom - clipRect.top);
+		r.setHeight(r.bottom - clippingRect.top);
 	}
-	if (r.bottom >= clipRect.bottom) {
-		if (r.top >= clipRect.top)
+	if (r.bottom >= clippingRect.bottom) {
+		if (r.top >= clippingRect.top)
 			return false;
-		r.setWidth(clipRect.bottom - r.top);
+		r.setWidth(clippingRect.bottom - r.top);
 	}
 
 	rect = r;
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 42446f7..501e62b 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -751,7 +751,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;
 	}






More information about the Scummvm-git-logs mailing list