Additional Mahjongg Mapsets



<While others are doing real work like HIG or translations to new languages...>

The one thing I've missed in GNOME mahjongg is additional boards. Most of the millions of clones out there have many boards to play through, while GNOME's has 2. So, I put in 3 more boards I made up this morning [Pyramids, TicTacToe, and a boxed Cross]. Is anyone else interested in this stuff?

I've attached a patch against the 2.2.1 mahjongg.c, that puts in these extra boards, and gives the name of current board in the status window in the lower left.

If people are interested, I was thinking of making about a dozen total boards, and using the space that did have the status message box for an option box that selected the board. [It currently houses two messages, "Welcome to GNOME Mahjongg" (which gets truncated!), and "...Game Paused"]. I considered packing a Pause and a Continue button into the same box for the Pause button, and show/hide'ing them as needed to show the game Pause status.

I crave feedback [even negative!].

Cheers,
Rex

--- mahjongg.c	2004-01-10 18:11:28.000000000 -0700
+++ ../mahjongg_orig/mahjongg.c	2003-02-25 03:35:43.000000000 -0700
@@ -33,12 +33,12 @@
 #define APPNAME_LONG "Mahjongg"
 
 #define AREA_WIDTH 600
-#define AREA_HEIGHT 500
+#define AREA_HEIGHT 470
 #define TILE_WIDTH 40
 #define TILE_HEIGHT 56
 #define HALF_WIDTH 18
 #define HALF_HEIGHT 26
-#define THICKNESS 7
+#define THICKNESS 5
 
 /* #defines for the tile selection code. */
 #define SELECTED_FLAG   1
@@ -89,128 +89,6 @@
  {22, 0,  0}, {24, 0,  0}, {26, 7, 0}, {28, 7, 0} 
 };
 
-tilepos pyramid_map [MAX_TILES] = {
- {13, 14, 6}, {13, 8,  6},  {13, 2, 6}, {12, 14,  5},
- {14, 14,  5}, {12, 8,  5}, {14, 8,  5}, {12, 2,  5},
- {14, 2,  5}, {10, 14,  4}, {12, 14,  4}, {14, 14,  4},
- {16, 14,  4}, {2, 8,  4}, {11, 8,  4}, {13, 8,  4},
- {15, 8,  4}, {24, 8,  4}, {10, 2,  4}, {12, 2,  4},
- {14, 2,  4}, {16, 2,  4}, {8, 14,  3}, {10, 14,  3},
- {12, 14,  3}, {14, 14,  3}, {16, 14,  3}, {18, 14,  3},
- {2, 9,  3}, {24, 9, 3}, {10, 8,  3}, {12, 8,  3},	 
- {14, 8,  3}, {16, 8, 3}, {2, 7,  3}, {24, 7,  3},	 
- {8, 2,  3}, {10, 2,  3}, {12, 2,  3}, {14, 2,  3},
- {16, 2,  3}, {18, 2,  3}, {6, 14,  2}, {8, 14,  2},  
- {10, 14,  2}, {12, 14,  2}, {14, 14,  2}, {16, 14,  2},  
- {18, 14,  2}, {20, 14,  2}, {2, 10,  2}, {24, 10,  2},
- {2, 8,  2}, {9, 8,  2}, {11, 8,  2}, {13, 8,  2},
- {15, 8,  2}, {17, 8,  2}, {24, 8,  2}, {2, 6,  2},
- {24, 6,  2}, {6, 2,  2}, {8, 2,  2}, {10, 2,  2},
- {12, 2,  2}, {14, 2,  2}, {16, 2,  2}, {18, 2,  2},
- {20, 2,  2}, {4, 14,  1}, {6, 14,  1}, {8, 14,  1},  
- {10, 14,  1}, {12, 14,  1}, {14, 14,  1}, {16, 14,  1},  
- {18, 14,  1}, {20, 14,  1}, {22, 14,  1}, {2, 11,  1},
- {24, 11,  1}, {2, 9,  1}, {24, 9,  1}, {8, 8,  1},
- {10, 8,  1}, {12, 8,  1}, {14, 8,  1}, {16, 8,  1},  
- {18, 8,  1}, {2, 7,  1}, {24, 7,  1}, {2, 5,  1},
- {24, 5,  1}, {4, 2,  1}, {6, 2,  1}, {8, 2,  1},  
- {10, 2,  1}, {12, 2,  1}, {14, 2,  1}, {16, 2,  1},  
- {18, 2,  1}, {20, 2,  1}, {22, 2,  1}, {2, 14,  0},
- {4, 14,  0}, {6, 14,  0}, {8, 14,  0}, {10, 14,  0},
- {12, 14,  0}, {14, 14,  0}, {16, 14,  0}, {18, 14,  0},
- {20, 14,  0}, {22, 14,  0}, {24, 14,  0}, {2, 12,  0},
- {24, 12,  0}, {2, 10,  0}, {24, 10,  0}, {2, 8, 0},
- {7, 8,  0}, {9, 8,  0}, {11, 8,  0}, {13, 8,  0},
- {15, 8,  0}, {17, 8,  0}, {19, 8,  0}, {24, 8, 0},
- {2, 6,  0}, {24, 6,  0}, {2, 4,  0}, {24, 4,  0},
- {2, 2,  0}, {4, 2,  0}, {6, 2,  0}, {8, 2,  0},  
- {10, 2,  0}, {12, 2,  0}, {14, 2,  0}, {16, 2,  0},  
- {18, 2,  0}, {20, 2,  0}, {22, 2,  0}, {24, 2,  0}
-};
-
-tilepos cross_map [MAX_TILES] = {
- {13, 8, 5},	
- {13, 12,  4}, {13, 10,  4}, {9, 8,  4}, {11, 8,  4},
- {13, 8,  4}, {15, 8,  4}, {17, 8,  4}, {13, 6,  4},
- {13, 4,  4}, {5, 14,  3}, {21, 14,  3}, {13, 13,  3},
- {13, 11,  3}, {12, 9,  3}, {14, 9,  3}, {6, 8,  3},
- {8, 8, 3}, {10, 8,  3}, {12, 7,  3}, {14, 7,  3},
- {16, 8,  3}, {18, 8,  3}, {20, 8, 3}, {13, 5,  3},
- {13, 3,  3}, {5, 2,  3}, {21, 2,  3}, {5, 14,  2},
- {7, 14,  2}, {13, 14,  2}, {19, 14,  2}, {21, 14,  2},
- {5, 12,  2}, {13, 12,  2}, {21, 12,  2}, {13, 10, 2},	 
- {5, 8, 2}, {7, 8,  2}, {9, 8,  2}, {11, 8,  2},
- {13, 8,  2}, {15, 8,  2}, {17, 8,  2}, {19, 8,  2},
- {21, 8, 2}, {13, 6, 2}, {5, 4,  2}, {13, 4,  2},
- {21, 4,  2}, {5, 2,  2}, {7, 2,  2}, {13, 2,  2},
- {19, 2,  2}, {21, 2,  2}, {13, 15,  1}, {5, 14,  1},
- {7, 14,  1}, {9, 14,  1}, {17, 14,  1}, {19, 14,  1},
- {21, 14,  1}, {13, 13,  1}, {5, 12,  1}, {7, 12, 1},
- {19, 12, 1}, {21, 12,  1}, {13, 11,  1}, {5, 10,  1},
- {21, 10,  1}, {12, 9,  1},  {14, 9,  1},  {4, 8,  1},
- {6, 8,  1}, {8, 8,  1}, {10, 8,  1}, {12, 7,  1},
- {14, 7,  1},  {16, 8,  1}, {18, 8,  1}, {20, 8,  1},
- {22, 8,  1}, {5, 6,  1}, {21, 6,  1}, {13, 5,  1}, 
- {5, 4,  1}, {7, 4, 1}, {19, 4, 1}, {21, 4,  1},
- {13, 3,  1}, {5, 2,  1}, {7, 2,  1}, {9, 2,  1},
- {17, 2,  1},{19, 2,  1}, {21, 2,  1}, {13, 1,  1},  
- {13, 16,  0}, {5, 14,  0}, {7, 14,  0}, {9, 14,  0},
- {11, 14,  0}, {13, 14,  0}, {15, 14,  0}, {17, 14,  0},
- {19, 14,  0}, {21, 14,  0}, {5, 12,  0}, {7, 12, 0},
- {13, 12,  0}, {19, 12, 0}, {21, 12,  0}, {5, 10,  0},
- {13, 10,  0}, {21, 10,  0}, {3, 8, 0},{5, 8, 0},
- {7, 8,  0}, {9, 8,  0}, {11, 8,  0}, {13, 8,  0},
- {15, 8,  0}, {17, 8,  0}, {19, 8,  0}, {21, 8, 0},	 
- {23, 8,  0}, {5, 6,  0}, {13, 6,  0}, {21, 6,  0},
- {5, 4,  0}, {7, 4, 0}, {13, 4,  0}, {19, 4, 0},
- {21, 4,  0}, {5, 2,  0}, {7, 2,  0}, {9, 2,  0},
- {11, 2,  0}, {13, 2,  0}, {15, 2,  0}, {17, 2,  0},
- {19, 2,  0}, {21, 2,  0}, {13, 0, 0}
-};
-
-
-tilepos tictactoe_map [MAX_TILES] = {
- {6, 12,  4},{8, 12,  4}, {10, 12,  4}, {12, 12,  4}, {14, 12,  4}, {16, 12,  4},{18, 12,  4},
- {6, 10,  4}, {18, 10,  4},
- {6, 8,  4}, {18, 8,  4},
- {6, 6,  4}, {18, 6,  4},
- {6, 4,  4}, {8, 4,  4}, {10, 4,  4}, {12, 4,  4}, {14, 4,  4}, {16, 4,  4},{18, 4,  4},
-	 
- {6, 12,  3}, {8, 12,  3}, {10, 12,  3}, {12, 12,  3}, {14, 12,  3}, {16, 12,  3}, {18, 12,  3},
- {6, 10,  3}, {18, 10,  3},
- {6, 8,  3}, {18, 8,  3},
- {6, 6,  3}, {18, 6,  3},
- {6, 4,  3}, {8, 4,  3}, {10, 4,  3}, {12, 4,  3}, {14, 4,  3}, {16, 4,  3}, {18, 4,  3},
-
- {6, 14,  2}, {18, 14,  2},
- {4, 12,  2}, {6, 12,  2}, {8, 12,  2}, {10, 12,  2}, {12, 12,  2}, {14, 12,  2}, {16, 12,  2}, {18, 12,  2}, {20, 12,  2},
- {6, 10,  2}, {18, 10,  2},
- {6, 8,  2}, {18, 8,  2},
- {6, 6,  2}, {18, 6,  2},
- {4, 4,  2}, {6, 4,  2}, {8, 4,  2}, {10, 4,  2}, {12, 4,  2}, {14, 4,  2}, {16, 4,  2}, {18, 4,  2}, {20, 4,  2},
- {6, 2,  2}, {18, 2,  2},
-
- {6, 16,  1}, {18, 16,  1},
- {6, 14,  1}, {18, 14,  1},
- {2, 12,  1}, {4, 12,  1}, {6, 12,  1}, {8, 12,  1}, {10, 12,  1}, {12, 12,  1}, {14, 12,  1}, {16, 12,  1}, {18, 12,  1}, {20, 12,  1}, {22, 12,  1},
- {6, 10,  1}, {18, 10,  1},
- {6, 8,  1}, {18, 8,  1},
- {6, 6,  1}, {18, 6,  1},
- {2, 4,  1}, {4, 4,  1}, {6, 4,  1}, {8, 4,  1}, {10, 4,  1}, {12, 4,  1}, {14, 4,  1}, {16, 4,  1}, {18, 4,  1}, {20, 4,  1}, {22, 4,  1},
- {6, 2,  1}, {18, 2,  1},
- {6, 0,  1}, {18, 0,  1},
- 
- {6, 16,  0}, {18, 16,  0},
- {6, 14,  0}, {18, 14,  0},
- {0, 12, 0}, {2, 12,  0}, {4, 12,  0}, {6, 12,  0}, {8, 12,  0}, {10, 12,  0}, {12, 12,  0}, {14, 12,  0}, {16, 12,  0},{18, 12,  0}, {20, 12,  0},{22, 12, 0}, {24, 12, 0},
- {6, 10,  0}, {18, 10,  0},
- {6, 8,  0}, {18, 8,  0},
- {6, 6,  0}, {18, 6,  0},
- {0, 4, 0}, {2, 4,  0}, {4, 4,  0}, {6, 4,  0}, {8, 4,  0}, {10, 4,  0}, {12, 4,  0}, {14, 4,  0}, {16, 4,  0},{18, 4,  0}, {20, 4,  0},{22, 4,  0}, {24, 4, 0},
- {6, 2,  0}, {18, 2,  0},
- {6, 0,  0}, {18, 0,  0},
-};
-
 tilepos hard_map [MAX_TILES] = {
 	{ 10, 6,  6},
 	{ 9, 6,  5},
@@ -397,9 +275,6 @@
   tilepos *map ;
 } maps[] = {
 	{ "easy",      easy_map },
-	{ "ConfoundingCross",      cross_map },
-	{ "Pyramid's Walls",      pyramid_map },
-	{ "TicTacToe",      tictactoe_map },
 	{ "difficult", hard_map }
 };
 
@@ -548,7 +423,7 @@
            the definition of PAUSE_BUTTON below */
         {GNOME_APP_UI_TOGGLEITEM, N_("Pause"), N_("Pause game"),
 		pause_callback, NULL, NULL,
-		GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_TIMER_STOP, 0, 0, NULL},
+		GNOME_APP_PIXMAP_STOCK, GTK_STOCK_STOP, 0, 0, NULL},
 
 #ifdef SOUND_SUPPORT_FINISHED
         {GNOME_APP_UI_TOGGLEITEM, N_("Sound"), N_("Toggle sound"),
@@ -1535,7 +1410,7 @@
                 for (i = 0; i < MAX_TILES; i++)
                         if (tiles[i].visible)
                                 gnome_canvas_item_show (tiles[i].image_item);
-                message (mapset);
+                message ("");
                 games_clock_start (GAMES_CLOCK(chrono));
         }
 }
@@ -1549,7 +1424,7 @@
                 for (i = 0; i < MAX_TILES; i++)
                         if (tiles[i].visible)
                                 gnome_canvas_item_show (tiles[i].image_item);
-                message(mapset);
+                message("");
         }
         paused = FALSE;
 }
@@ -1829,8 +1704,6 @@
 
 			generate_dependancies() ;
 		}
-
-	
 }
 
 gint
@@ -2051,7 +1924,6 @@
 new_game (gboolean re_seed)
 {
 	gint i;
-	gchar *mapname ;
 	
 	if (re_seed)
 		new_seed ();
@@ -2065,15 +1937,11 @@
 
 	init_game ();
 	
-	mapname = strdup(mapset) ;
-	message(mapname);
-	
 	if (score_current_mapset != NULL)
 		g_free (score_current_mapset);
 
 	score_current_mapset = strdup (mapset);
 	update_score_state ();
-	g_free(mapname) ;
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]