From eee040cd294b0be71b1f6688440c8f1e15a3a694 Mon Sep 17 00:00:00 2001
From: Strangerke <strangerke@scummvm.org>
Date: Fri, 21 Feb 2014 08:05:09 +0100
Subject: [PATCH] VOYEUR: Fix some shadowed variables in GraphicsManager

---
 engines/voyeur/graphics.cpp | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index 55908334f66..53404c9ef80 100644
--- a/engines/voyeur/graphics.cpp
+++ b/engines/voyeur/graphics.cpp
@@ -469,16 +469,16 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
 						} else {
 							// loc_26543
 							for (int yp = 0; yp < height1; ++yp) {
-								int runLength = 0;
-								for (int xp = 0; xp < width2; ++xp, --runLength) {
-									if (runLength <= 0) {
+								int runLen = 0;
+								for (int xp = 0; xp < width2; ++xp, --runLen) {
+									if (runLen <= 0) {
 										// Start of run length, so get pixel and repeat length
 										pixel = *srcP++;
 										if (pixel & 0x80) {
 											pixel &= 0x7f;
-											runLength = *srcP++;
-											if (runLength == 0)
-												runLength = width2;
+											runLen = *srcP++;
+											if (runLen == 0)
+												runLen = width2;
 										}
 									}
 
@@ -552,7 +552,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
 
 			if (!(srcFlags & PICFLAG_PIC_OFFSET)) {
 				srcP = srcImgData += srcOffset;
-				int pixel = 0;
+				pixel = 0;
 
 				if (destFlags & PICFLAG_PIC_OFFSET) {
 					destP = destImgData + screenOffset;
@@ -569,15 +569,15 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
 								height1 = tmpHeight + height1;
 
 								for (int yp = 0; yp < height1; ++yp) {
-									int runLength = 0;
-									for (int xp = 0; xp < width2; ++xp, --runLength) {
-										if (runLength <= 0) {
+									int runLen = 0;
+									for (int xp = 0; xp < width2; ++xp, --runLen) {
+										if (runLen <= 0) {
 											pixel = *srcP++;
 											if (pixel & 0x80) {
 												pixel &= 0x7F;
-												runLength = *srcP++;
-												if (!runLength)
-													runLength = width2;
+												runLen = *srcP++;
+												if (!runLen)
+													runLen = width2;
 											}
 										}
 
@@ -596,7 +596,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
 								destP = (byte *)_screenSurface.getPixels() + screenOffset;
 
 								for (int yp = 0; yp < height1; ++yp) {
-									for (int xp = 0; xp < width2; ++xp, ++destP) {
+									for (int xi = 0; xi < width2; ++xi, ++destP) {
 										byteVal2 = 0;
 										for (int xp = 0; xp < width2; ++xp, ++destP, --byteVal2) {
 											if (!byteVal2) {