[Scummvm-git-logs] scummvm master -> d93b9fc1f4695039ef76eaf01f40e4f01828ec46

sev- sev at scummvm.org
Wed Oct 27 16:53:24 UTC 2021


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

Summary:
a5a30277de GROOVIE: Fix the comparison
08b473b264 GROOVIE: Fix more copy/paste errors
d93b9fc1f4 GROOVIE: Clarify logical expression precedence


Commit: a5a30277de1dd9316cf58bdac757e3a01928b678
    https://github.com/scummvm/scummvm/commit/a5a30277de1dd9316cf58bdac757e3a01928b678
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-10-27T19:47:48+03:00

Commit Message:
GROOVIE: Fix the comparison

Changed paths:
    engines/groovie/logic/mousetrap.cpp


diff --git a/engines/groovie/logic/mousetrap.cpp b/engines/groovie/logic/mousetrap.cpp
index 4ae7bc4775..bfdbd30403 100644
--- a/engines/groovie/logic/mousetrap.cpp
+++ b/engines/groovie/logic/mousetrap.cpp
@@ -335,7 +335,7 @@ void MouseTrapGame::sub09(byte *scriptVariables) {
 void MouseTrapGame::copyRoute(int8 x, int8 y) {
 	int i;
 
-	for (i = 0; i < _mouseTrapCounter > i; i++) {
+	for (i = 0; i < _mouseTrapCounter; i++) {
 		if (_mouseTrapRoute[3 * i] == x && _mouseTrapRoute[3 * i + 1] == y)
 			break;
 	}


Commit: 08b473b2645a4b2653ea592848f57c35ac189773
    https://github.com/scummvm/scummvm/commit/08b473b2645a4b2653ea592848f57c35ac189773
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-10-27T19:52:24+03:00

Commit Message:
GROOVIE: Fix more copy/paste errors

Changed paths:
    engines/groovie/logic/mousetrap.cpp


diff --git a/engines/groovie/logic/mousetrap.cpp b/engines/groovie/logic/mousetrap.cpp
index bfdbd30403..700d78a159 100644
--- a/engines/groovie/logic/mousetrap.cpp
+++ b/engines/groovie/logic/mousetrap.cpp
@@ -576,7 +576,7 @@ void MouseTrapGame::findMinPointInRoute(int8 *x, int8 *y) {
 	int8 maxVal = 0;
 	int8 x1 = _mouseTrapPosX;
 	int8 y1 = _mouseTrapPosY;
-	for (int i = 0; i < _mouseTrapCounter > i; i++) {
+	for (int i = 0; i < _mouseTrapCounter; i++) {
 		if (8 - _mouseTrapRoute[3 * i + 1] - _mouseTrapRoute[3 * i] > maxVal) {
 			maxVal = 8 - _mouseTrapRoute[3 * i + 1] - _mouseTrapRoute[3 * i];
 			x1 = _mouseTrapRoute[3 * i];
@@ -594,7 +594,7 @@ int8 MouseTrapGame::calcDistanceToExit() {
 	if (havePosInRoute(4, 4))
 		return 0;
 
-	for (int i = 0; i < _mouseTrapCounter > i; i++) {
+	for (int i = 0; i < _mouseTrapCounter; i++) {
 		if (8 - _mouseTrapRoute[3 * i + 1] - _mouseTrapRoute[3 * i] > maxDist)
 			maxDist = 8 - _mouseTrapRoute[3 * i + 1] - _mouseTrapRoute[3 * i];
 	}


Commit: d93b9fc1f4695039ef76eaf01f40e4f01828ec46
    https://github.com/scummvm/scummvm/commit/d93b9fc1f4695039ef76eaf01f40e4f01828ec46
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-10-27T19:53:01+03:00

Commit Message:
GROOVIE: Clarify logical expression precedence

Changed paths:
    engines/groovie/logic/beehive.cpp


diff --git a/engines/groovie/logic/beehive.cpp b/engines/groovie/logic/beehive.cpp
index 8774f438be..40a8993741 100644
--- a/engines/groovie/logic/beehive.cpp
+++ b/engines/groovie/logic/beehive.cpp
@@ -740,7 +740,7 @@ void BeehiveGame::testGame(Common::Array<int> moves, bool playerWin) {
 		op = 6;
 		run(vars);
 
-		if (i + 2 == moves.size() && (hexDifference > 2) || (hexDifference<-2) )
+		if ((i + 2 == moves.size()) && (hexDifference > 2) || (hexDifference < -2) )
 			error("%u: early end", i);
 		else if (hexDifference > 2)
 			break;




More information about the Scummvm-git-logs mailing list