[Scummvm-git-logs] scummvm master -> 720c92e45144891c2079c9a75b87966f4063ebdf

bluegr bluegr at gmail.com
Thu Oct 28 14:03:24 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:
720c92e451 GROOVIE: More work on the wine rack puzzle


Commit: 720c92e45144891c2079c9a75b87966f4063ebdf
    https://github.com/scummvm/scummvm/commit/720c92e45144891c2079c9a75b87966f4063ebdf
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-10-28T17:03:14+03:00

Commit Message:
GROOVIE: More work on the wine rack puzzle

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


diff --git a/engines/groovie/logic/winerack.cpp b/engines/groovie/logic/winerack.cpp
index f2d35b0589..7f825676aa 100644
--- a/engines/groovie/logic/winerack.cpp
+++ b/engines/groovie/logic/winerack.cpp
@@ -36,22 +36,25 @@ WineRackGame::WineRackGame() : _random("WineRackGame"), _totalBottles(0) {
 
 void WineRackGame::run(byte *scriptVariables) {
 	char op = scriptVariables[3];
+	byte pos = 0;
 
 	switch (op) {
 	case 3:
 		initGrid(scriptVariables[4]);
 		break;
 	case 4:
-		placeBottle(calculateNextMove(2), 2);
-		scriptVariables[0] = op / 10;
-		scriptVariables[1] = op % 10;
+		pos = calculateNextMove(2);
+		placeBottle(pos, 2);
+		scriptVariables[0] = pos / 10;
+		scriptVariables[1] = pos % 10;
 		//scriptVariables[3] = (char)FUN_00412c90();
 		break;
 	case 5:
 		scriptVariables[3] = 0;
-		placeBottle(calculateNextMove(1), 1);
-		scriptVariables[0] = op / 10;
-		scriptVariables[1] = op % 10;
+		pos = calculateNextMove(1);
+		placeBottle(pos, 1);
+		scriptVariables[0] = pos / 10;
+		scriptVariables[1] = pos % 10;
 		//if ((char)FUN_00412cf0() != 0) {
 		//	scriptVariables[3] = 1;
 		//}
@@ -64,9 +67,10 @@ void WineRackGame::run(byte *scriptVariables) {
 		//	return;
 		//}
 
-		placeBottle(calculateNextMove(1), 1);
-		scriptVariables[0] = op / 10;
-		scriptVariables[1] = op % 10;
+		pos = calculateNextMove(1);
+		placeBottle(pos, 1);
+		scriptVariables[0] = pos / 10;
+		scriptVariables[1] = pos % 10;
 
 		//if ((char)FUN_00412cf0() != 0) {
 		//	scriptVariables[3] = 1;




More information about the Scummvm-git-logs mailing list