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

sev- sev at scummvm.org
Fri Oct 29 12:58:29 UTC 2021


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:
f510259c3a GROOVIE: Unstubbed another WineRack puzzle function


Commit: f510259c3a7caa6d3d7d948c927e8a1f8a0765a6
    https://github.com/scummvm/scummvm/commit/f510259c3a7caa6d3d7d948c927e8a1f8a0765a6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-10-29T15:58:24+03:00

Commit Message:
GROOVIE: Unstubbed another WineRack puzzle function

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


diff --git a/engines/groovie/logic/winerack.cpp b/engines/groovie/logic/winerack.cpp
index 575145cceb..6b42ac61b4 100644
--- a/engines/groovie/logic/winerack.cpp
+++ b/engines/groovie/logic/winerack.cpp
@@ -177,7 +177,23 @@ void WineRackGame::sub05(int8 player, int8 *moves) {
 }
 
 int8 WineRackGame::sub06(int8 *moves1, int8 *moves2) {
-	return 0;
+	for (int i = 0; i < moves1[2]; i++) {
+
+		int8 result = moves1[i + 3];
+
+		if (!_wineRackGrid[result]) {
+			for (int j = 0; j < moves2[2]; j++)
+				if (moves2[j + 3] == result)
+					return result;
+		}
+	}
+
+	for (int i = 0; i < moves1[2]; i++) {
+		if (_wineRackGrid[moves1[i + 3]])
+			return moves1[i + 3];
+	}
+
+	return -1;
 }
 
 uint32 WineRackGame::sub09() {




More information about the Scummvm-git-logs mailing list