From 3d8e7585b7a9d215e4b40d9f83f7fa5a0fd79b43 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 28 Apr 2004 12:07:15 +0000 Subject: Add a menu bar, in both Windows and GTK. In particular, game modules are now expected to provide a list of `presets' (game_params plus a name) which are selectable from the menu. This means I can play both Octahedron and Cube without recompiling in between :-) While I'm here, also enabled a Cygwin makefile, which Just Worked. [originally from svn r4158] --- puzzles.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'puzzles.h') diff --git a/puzzles.h b/puzzles.h index 6300e74..86c2cc1 100644 --- a/puzzles.h +++ b/puzzles.h @@ -61,6 +61,9 @@ int midend_process_key(midend_data *me, int x, int y, int button); void midend_redraw(midend_data *me); float *midend_colours(midend_data *me, int *ncolours); void midend_timer(midend_data *me, float tplus); +int midend_num_presets(midend_data *me); +void midend_fetch_preset(midend_data *me, int n, + char **name, game_params **params); /* * malloc.c @@ -87,7 +90,9 @@ void random_free(random_state *state); * Game-specific routines */ game_params *default_params(void); +int game_fetch_preset(int i, char **name, game_params **params); void free_params(game_params *params); +game_params *dup_params(game_params *params); char *new_game_seed(game_params *params); game_state *new_game(game_params *params, char *seed); game_state *dup_game(game_state *state); -- cgit v1.1