diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-01-17 13:48:57 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-01-17 13:48:57 +0000 |
| commit | cc545532268b04e05005bf65f53f0a1ba39335ba (patch) | |
| tree | 10b02ae3146652cc3e603baacbc6b28734dac889 /gtk.c | |
| parent | 46fa25240e2e1609c4431a639f6e9c4bb6f50b39 (diff) | |
| download | puzzles-cc545532268b04e05005bf65f53f0a1ba39335ba.zip puzzles-cc545532268b04e05005bf65f53f0a1ba39335ba.tar.gz puzzles-cc545532268b04e05005bf65f53f0a1ba39335ba.tar.bz2 puzzles-cc545532268b04e05005bf65f53f0a1ba39335ba.tar.xz | |
Rather than each game backend file exporting a whole load of
functions and a couple of variables, now each one exports a single
structure containing a load of function pointers and said variables.
This should make it easy to support platforms on which it's sensible
to compile all the puzzles into a single monolithic application. The
two existing platforms are still one-binary-per-game.
[originally from svn r5126]
Diffstat (limited to 'gtk.c')
| -rw-r--r-- | gtk.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -783,7 +783,7 @@ static frontend *new_window(char *game_id, char **error) fe = snew(frontend); - fe->me = midend_new(fe); + fe->me = midend_new(fe, &thegame); if (game_id) { *error = midend_game_id(fe->me, game_id, FALSE); if (*error) { @@ -795,7 +795,7 @@ static frontend *new_window(char *game_id, char **error) midend_new_game(fe->me); fe->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(fe->window), game_name); + gtk_window_set_title(GTK_WINDOW(fe->window), thegame.name); #if 0 gtk_window_set_resizable(GTK_WINDOW(fe->window), FALSE); #else @@ -827,7 +827,7 @@ static frontend *new_window(char *game_id, char **error) GTK_SIGNAL_FUNC(menu_config_event), fe); gtk_widget_show(menuitem); - if ((n = midend_num_presets(fe->me)) > 0 || game_can_configure) { + if ((n = midend_num_presets(fe->me)) > 0 || thegame.can_configure) { GtkWidget *submenu; int i; @@ -852,7 +852,7 @@ static frontend *new_window(char *game_id, char **error) gtk_widget_show(menuitem); } - if (game_can_configure) { + if (thegame.can_configure) { menuitem = gtk_menu_item_new_with_label("Custom..."); gtk_object_set_data(GTK_OBJECT(menuitem), "user-data", GPOINTER_TO_INT(CFG_SETTINGS)); |