X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/be8d5aa175777c6b6b5a90342afbd8f77c615911..522ed78193ce3bb0e5b88f96ac7d2ec4c6c6e2a5:/nullgame.c diff --git a/nullgame.c b/nullgame.c index 3d5270d..49173b6 100644 --- a/nullgame.c +++ b/nullgame.c @@ -59,16 +59,11 @@ static game_params *dup_params(game_params *params) return ret; } -static game_params *decode_params(char const *string) +static void decode_params(game_params *params, char const *string) { - game_params *ret = snew(game_params); - - ret->FIXME = 0; - - return ret; } -static char *encode_params(game_params *params) +static char *encode_params(game_params *params, int full) { return dupstr("FIXME"); } @@ -88,17 +83,23 @@ static char *validate_params(game_params *params) return NULL; } -static char *new_game_seed(game_params *params, random_state *rs) +static char *new_game_desc(game_params *params, random_state *rs, + game_aux_info **aux, int interactive) { return dupstr("FIXME"); } -static char *validate_seed(game_params *params, char *seed) +static void game_free_aux_info(game_aux_info *aux) +{ + assert(!"Shouldn't happen"); +} + +static char *validate_desc(game_params *params, char *desc) { return NULL; } -static game_state *new_game(game_params *params, char *seed) +static game_state *new_game(midend_data *me, game_params *params, char *desc) { game_state *state = snew(game_state); @@ -121,6 +122,17 @@ static void free_game(game_state *state) sfree(state); } +static game_state *solve_game(game_state *state, game_aux_info *aux, + char **error) +{ + return NULL; +} + +static char *game_text_format(game_state *state) +{ + return NULL; +} + static game_ui *new_ui(game_state *state) { return NULL; @@ -130,8 +142,8 @@ static void free_ui(game_ui *ui) { } -static game_state *make_move(game_state *from, game_ui *ui, int x, int y, - int button) +static game_state *make_move(game_state *from, game_ui *ui, game_drawstate *ds, + int x, int y, int button) { return NULL; } @@ -187,13 +199,13 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate, } static float game_anim_length(game_state *oldstate, game_state *newstate, - int dir) + int dir, game_ui *ui) { return 0.0F; } static float game_flash_length(game_state *oldstate, game_state *newstate, - int dir) + int dir, game_ui *ui) { return 0.0F; } @@ -203,26 +215,33 @@ static int game_wants_statusbar(void) return FALSE; } +static int game_timing_state(game_state *state) +{ + return TRUE; +} + #ifdef COMBINED #define thegame nullgame #endif const struct game thegame = { - "Null Game", NULL, FALSE, + "Null Game", NULL, default_params, game_fetch_preset, decode_params, encode_params, free_params, dup_params, - game_configure, - custom_params, + FALSE, game_configure, custom_params, validate_params, - new_game_seed, - validate_seed, + new_game_desc, + game_free_aux_info, + validate_desc, new_game, dup_game, free_game, + FALSE, solve_game, + FALSE, game_text_format, new_ui, free_ui, make_move, @@ -234,4 +253,6 @@ const struct game thegame = { game_anim_length, game_flash_length, game_wants_statusbar, + FALSE, game_timing_state, + 0, /* mouse_priorities */ };