[Scummvm-cvs-logs] scummvm master -> 17e74e9a371e4d6636882a1660f007c06715ec6f

Strangerke Strangerke at scummvm.org
Fri Oct 10 20:50:12 CEST 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:
17e74e9a37 PRINCE: rename a couple of variables named "rand"


Commit: 17e74e9a371e4d6636882a1660f007c06715ec6f
    https://github.com/scummvm/scummvm/commit/17e74e9a371e4d6636882a1660f007c06715ec6f
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-10-10T20:47:37+02:00

Commit Message:
PRINCE: rename a couple of variables named "rand"

Changed paths:
    engines/prince/prince.cpp



diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 7c7334f..29c434e 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -1656,13 +1656,13 @@ void PrinceEngine::doZoomIn(int slot) {
 				src2 += x;
 				dst2 += x;
 				while (w > 0) {
-					int rand = _randomSource.getRandomNumber(zoomInStep - 1);
-					if (rand < w) {
-						*(dst2 + rand) = *(src2 + rand);
+					int randVal = _randomSource.getRandomNumber(zoomInStep - 1);
+					if (randVal < w) {
+						*(dst2 + randVal) = *(src2 + randVal);
 						src2 += zoomInStep;
 						dst2 += zoomInStep;
 					} else if (y + 1 != surfaceHeight) {
-						*(dst1 + orgSurface->pitch + rand - w) = *(src1 + orgSurface->pitch + rand - w);
+						*(dst1 + orgSurface->pitch + randVal - w) = *(src1 + orgSurface->pitch + randVal - w);
 					}
 					w -= zoomInStep;
 				}
@@ -1687,12 +1687,12 @@ void PrinceEngine::doZoomOut(int slot) {
 				int w = orgSurface->w - x;
 				dst2 += x;
 				while (w > 0) {
-					int rand = _randomSource.getRandomNumber(zoomInStep - 1);
-					if (rand < w) {
-						*(dst2 + rand) = 255;
+					int randVal = _randomSource.getRandomNumber(zoomInStep - 1);
+					if (randVal < w) {
+						*(dst2 + randVal) = 255;
 						dst2 += zoomInStep;
 					} else if (y + 1 != surfaceHeight) {
-						*(dst1 + orgSurface->pitch + rand - w) = 255;
+						*(dst1 + orgSurface->pitch + randVal - w) = 255;
 					}
 					w -= zoomInStep;
 				}






More information about the Scummvm-git-logs mailing list