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

bluegr bluegr at gmail.com
Tue Oct 8 00:53:08 CEST 2019


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:
b808b572cf SCI32: Make the Hoyle 5 poker card bitmask a bit more explicit


Commit: b808b572cfe119497e27ae04e4828549579dc4c4
    https://github.com/scummvm/scummvm/commit/b808b572cfe119497e27ae04e4828549579dc4c4
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2019-10-08T01:52:56+03:00

Commit Message:
SCI32: Make the Hoyle 5 poker card bitmask a bit more explicit

Changed paths:
    engines/sci/engine/hoyle5poker.cpp


diff --git a/engines/sci/engine/hoyle5poker.cpp b/engines/sci/engine/hoyle5poker.cpp
index c7742a2..90a2e2b 100644
--- a/engines/sci/engine/hoyle5poker.cpp
+++ b/engines/sci/engine/hoyle5poker.cpp
@@ -165,23 +165,23 @@ int checkHand(SciArray *data) {
 	}
 
 	if (pairs == 1)
-		return 1;	// one pair
+		return 1 << 0;	// 1, one pair
 	else if (pairs == 2)
-		return 2;	// two pairs
+		return 1 << 1;	// 2, two pairs
 	else if (sameRank == 3)
-		return 4;	// three of a kind
+		return 1 << 2;	// 4, three of a kind
 	else if (orderedCards == 5 && sameSuit < 5)
-		return 128;	// straight
+		return 1 << 7;	// 128, straight
 	else if (sameSuit == 5)
-		return 16;	// flush
+		return 1 << 4;	// 16, flush
 	else if (cards[0] == cards[1] && cards[1] == cards[2] && cards[3] == cards[4])
-		return 32;	// full house
+		return 1 << 5;	// 32, full house
 	else if (sameRank == 4)
-		return 64;	// four of a kind
+		return 1 << 6;	// 64, four of a kind
 	else if (orderedCards == 5 && sameSuit == 5)
 		return 0;	// straight flush	// TODO
 	else if (sameRank == 5)
-		return 256;	// five of a kind
+		return 1 << 8;	// 256, five of a kind
 
 	return 0;	// high card
 }





More information about the Scummvm-git-logs mailing list