[Scummvm-cvs-logs] scummvm master -> eee040cd294b0be71b1f6688440c8f1e15a3a694

Strangerke Strangerke at scummvm.org
Fri Feb 21 08:09:17 CET 2014


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

Summary:
eee040cd29 VOYEUR: Fix some shadowed variables in GraphicsManager


Commit: eee040cd294b0be71b1f6688440c8f1e15a3a694
    https://github.com/scummvm/scummvm/commit/eee040cd294b0be71b1f6688440c8f1e15a3a694
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-20T23:05:56-08:00

Commit Message:
VOYEUR: Fix some shadowed variables in GraphicsManager

Changed paths:
    engines/voyeur/graphics.cpp



diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index 5590833..53404c9 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) {






More information about the Scummvm-git-logs mailing list