aboutsummaryrefslogtreecommitdiff
path: root/puzzles.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-05-03 08:51:31 +0000
committerSimon Tatham <anakin@pobox.com>2004-05-03 08:51:31 +0000
commit6e42ddd31b5ca71f48c6260b01fc49b2451d0a56 (patch)
treedce426839c0855f7726366e51034282538819ff7 /puzzles.h
parenteb88ee0973c9a19b14e2e0e1579ee17625d73e05 (diff)
downloadpuzzles-6e42ddd31b5ca71f48c6260b01fc49b2451d0a56.zip
puzzles-6e42ddd31b5ca71f48c6260b01fc49b2451d0a56.tar.gz
puzzles-6e42ddd31b5ca71f48c6260b01fc49b2451d0a56.tar.bz2
puzzles-6e42ddd31b5ca71f48c6260b01fc49b2451d0a56.tar.xz
Implement selection of game seeds, by reusing the config box
mechanism I've just invented (the midend handles the standard game selection configuration). Each game is now required to validate its own seed data before attempting to base a game on it and potentially confusing itself. [originally from svn r4186]
Diffstat (limited to 'puzzles.h')
-rw-r--r--puzzles.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/puzzles.h b/puzzles.h
index 78cecc6..10250a0 100644
--- a/puzzles.h
+++ b/puzzles.h
@@ -107,7 +107,7 @@ midend_data *midend_new(frontend *fe);
void midend_free(midend_data *me);
void midend_set_params(midend_data *me, game_params *params);
void midend_size(midend_data *me, int *x, int *y);
-void midend_new_game(midend_data *me, char *seed);
+void midend_new_game(midend_data *me);
void midend_restart_game(midend_data *me);
int midend_process_key(midend_data *me, int x, int y, int button);
void midend_redraw(midend_data *me);
@@ -117,8 +117,9 @@ int midend_num_presets(midend_data *me);
void midend_fetch_preset(midend_data *me, int n,
char **name, game_params **params);
int midend_wants_statusbar(midend_data *me);
-config_item *midend_get_config(midend_data *me);
-char *midend_set_config(midend_data *me, config_item *cfg);
+enum { CFG_SETTINGS, CFG_SEED };
+config_item *midend_get_config(midend_data *me, int which, char **wintitle);
+char *midend_set_config(midend_data *me, int which, config_item *cfg);
/*
* malloc.c
@@ -160,6 +161,7 @@ config_item *game_configure(game_params *params);
game_params *custom_params(config_item *cfg);
char *validate_params(game_params *params);
char *new_game_seed(game_params *params);
+char *validate_seed(game_params *params, char *seed);
game_state *new_game(game_params *params, char *seed);
game_state *dup_game(game_state *state);
void free_game(game_state *state);