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]
This commit is contained in:
Simon Tatham
2005-01-17 13:48:57 +00:00
parent 46fa25240e
commit cc54553226
12 changed files with 626 additions and 346 deletions

8
gtk.c
View File

@ -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));