summaryrefslogtreecommitdiffstats
path: root/games/gnomegames2/files
diff options
context:
space:
mode:
authoradamw <adamw@df743ca5-7f9a-e211-a948-0013205c9059>2004-07-07 01:06:33 +0800
committeradamw <adamw@df743ca5-7f9a-e211-a948-0013205c9059>2004-07-07 01:06:33 +0800
commite2a19c03727277dc0c756d15e9bbd81896a97bfc (patch)
tree0c7a8c27b5811b5206ef9abbc91cc5071d172fca /games/gnomegames2/files
parent4c81710b229e8ba688a1a0efcbc6314badaf1a08 (diff)
downloadmarcuscom-ports-e2a19c03727277dc0c756d15e9bbd81896a97bfc.tar
marcuscom-ports-e2a19c03727277dc0c756d15e9bbd81896a97bfc.tar.gz
marcuscom-ports-e2a19c03727277dc0c756d15e9bbd81896a97bfc.tar.bz2
marcuscom-ports-e2a19c03727277dc0c756d15e9bbd81896a97bfc.tar.lz
marcuscom-ports-e2a19c03727277dc0c756d15e9bbd81896a97bfc.tar.xz
marcuscom-ports-e2a19c03727277dc0c756d15e9bbd81896a97bfc.tar.zst
marcuscom-ports-e2a19c03727277dc0c756d15e9bbd81896a97bfc.zip
Update to 2.7.4.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@2453 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'games/gnomegames2/files')
-rw-r--r--games/gnomegames2/files/patch-aisleriot::sol.c47
-rw-r--r--games/gnomegames2/files/patch-blackjack_src_player.cpp20
2 files changed, 10 insertions, 57 deletions
diff --git a/games/gnomegames2/files/patch-aisleriot::sol.c b/games/gnomegames2/files/patch-aisleriot::sol.c
deleted file mode 100644
index 9ebcb0e1b..000000000
--- a/games/gnomegames2/files/patch-aisleriot::sol.c
+++ /dev/null
@@ -1,47 +0,0 @@
---- aisleriot/sol.c.orig Sun Apr 25 03:03:33 2004
-+++ aisleriot/sol.c Mon May 31 17:25:15 2004
-@@ -90,6 +90,16 @@
- #define DEFAULT_VARIATION "klondike.scm"
- #define GNOME_SESSION_BUG
-
-+gchar* game_file_to_variation (const gchar* file);
-+gchar* game_file_to_variation (const gchar* file)
-+{
-+ char* p, *buf = g_path_get_basename(file);
-+
-+ if ((p = strrchr (buf, '.'))) *p = '\0';
-+
-+ return buf;
-+}
-+
- gchar* game_file_to_name (const gchar* file)
- {
- char* p, *buf = g_path_get_basename(file);
-@@ -472,7 +482,7 @@
- dir = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_DATADIR,
- GAMESDIR, FALSE, NULL);
-
-- records = scandir (dir, &game_dents, is_game, alphasort);
-+ records = scandir (dir, &game_dents, (gpointer)is_game, alphasort);
- g_free(dir);
-
- if (records >= 0)
-@@ -481,14 +491,14 @@
- n_games = 0;
-
- for (i = 0; i < n_games; i++) {
-- gchar *game_name = game_file_to_name (game_dents[i]->d_name);
-- if (!strcasecmp (variation, game_name)) {
-+ gchar *game_variation = game_file_to_variation (game_dents[i]->d_name);
-+ if (!strcasecmp (variation, game_variation)) {
- dont_save = TRUE;
- start_game = g_strdup ((gchar*) game_dents[i]->d_name);
-- g_free (game_name);
-+ g_free (game_variation);
- break;
- }
-- g_free (game_name);
-+ g_free (game_variation);
- }
-
- gh_enter(argc, argv, main_prog);
diff --git a/games/gnomegames2/files/patch-blackjack_src_player.cpp b/games/gnomegames2/files/patch-blackjack_src_player.cpp
index 7ee5d6f24..0a2d1ac3b 100644
--- a/games/gnomegames2/files/patch-blackjack_src_player.cpp
+++ b/games/gnomegames2/files/patch-blackjack_src_player.cpp
@@ -1,9 +1,9 @@
---- blackjack/src/player.cpp.orig Mon May 31 16:07:01 2004
-+++ blackjack/src/player.cpp Mon May 31 16:13:37 2004
+--- blackjack/src/player.cpp.orig Tue Jul 6 12:56:50 2004
++++ blackjack/src/player.cpp Tue Jul 6 12:59:29 2004
@@ -262,8 +262,8 @@
// Player can always stand.
- bestValue = value = getValueStand (*player, upCard);
+ bestValue = value = getValueStand (*lplayer, upCard);
- mark_list[num_options++] = g_strdup_printf (" %s %8.2lf%%\n",
- _("Stand"), value * 100);
+ mark_list[num_options++] = g_strdup_printf (" %s %8.2Lf%%\n",
@@ -13,7 +13,7 @@
@@ -271,8 +271,8 @@
if (bj_hand_can_be_hit ()) {
- value = getValueHit (*player, upCard);
+ value = getValueHit (*lplayer, upCard);
- mark_list[num_options++] = g_strdup_printf (" %s %8.2lf%%\n",
- _("Hit"), value * 100);
@@ -25,7 +25,7 @@
@@ -282,8 +282,8 @@
// Check if player can double down.
if (bj_hand_can_be_doubled ()) {
- value = getValueDoubleDown (*player, upCard);
+ value = getValueDoubleDown (*lplayer, upCard);
- mark_list[num_options++] = g_strdup_printf (" %s %8.2lf%%\n",
- _("Double"), value * 100);
+ mark_list[num_options++] = g_strdup_printf (" %s %8.2Lf%%\n",
@@ -36,7 +36,7 @@
@@ -296,8 +296,8 @@
if (bj_hand_can_be_split ()) {
- value = getValueSplit(player->cards[0].value (), upCard);
+ value = getValueSplit(lplayer->cards[0].value (), upCard);
- mark_list[num_options++] = g_strdup_printf (" %s %8.2lf%%\n",
- _("Split"), value * 100);
+ mark_list[num_options++] = g_strdup_printf (" %s %8.2Lf%%\n",
@@ -60,15 +60,15 @@
mark_list[0] = g_strdup_printf ("<b>%s</b>\n", _("Dealer hand probabilities"));
- mark_list[1] = g_strdup_printf (" %s %5.2lf%%\n", _("Bust"),
-- getProbabilityBust (upCard) * 100.0 / notBlackjack);
+- getProbabilityBust (lupCard) * 100.0 / notBlackjack);
+ mark_list[1] = g_strdup_printf (" %s %5.2Lf%%\n", _("Bust"),
-+ (long double)(getProbabilityBust (upCard) * 100.0 / notBlackjack));
++ (long double)(getProbabilityBust (lupCard) * 100.0 / notBlackjack));
for (int count = 17; count <= 21; count++) {
- mark_list[count-15] = g_strdup_printf (" %2d %5.2lf%%\n", count,
-- getProbabilityCount (count, upCard)
+- getProbabilityCount (count, lupCard)
- * 100.0 / notBlackjack);
+ mark_list[count-15] = g_strdup_printf (" %2d %5.2Lf%%\n", count,
-+ (long double)(getProbabilityCount (count, upCard)
++ (long double)(getProbabilityCount (count, lupCard)
+ * 100.0 / notBlackjack));
}