X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/07dfb697bb30781c963b11eb00c4951bb5db6a7d..8d6149b6779c8c8c19eacde479d05712cd3209da:/nullgame.c diff --git a/nullgame.c b/nullgame.c index 3bcfe46..204f633 100644 --- a/nullgame.c +++ b/nullgame.c @@ -84,16 +84,11 @@ static char *validate_params(game_params *params) } static char *new_game_desc(game_params *params, random_state *rs, - game_aux_info **aux, int interactive) + char **aux, int interactive) { return dupstr("FIXME"); } -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; @@ -122,8 +117,8 @@ static void free_game(game_state *state) sfree(state); } -static game_state *solve_game(game_state *state, game_aux_info *aux, - char **error) +static char *solve_game(game_state *state, game_state *currstate, + char *aux, char **error) { return NULL; } @@ -142,13 +137,31 @@ static void free_ui(game_ui *ui) { } +static char *encode_ui(game_ui *ui) +{ + return NULL; +} + +static void decode_ui(game_ui *ui, char *encoding) +{ +} + static void game_changed_state(game_ui *ui, game_state *oldstate, game_state *newstate) { } -static game_state *make_move(game_state *from, game_ui *ui, game_drawstate *ds, - int x, int y, int button) +struct game_drawstate { + int FIXME; +}; + +static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds, + int x, int y, int button) +{ + return NULL; +} + +static game_state *execute_move(game_state *state, char *move) { return NULL; } @@ -157,11 +170,8 @@ static game_state *make_move(game_state *from, game_ui *ui, game_drawstate *ds, * Drawing routines. */ -struct game_drawstate { - int FIXME; -}; - -static void game_size(game_params *params, int *x, int *y) +static void game_size(game_params *params, game_drawstate *ds, + int *x, int *y, int expand) { *x = *y = 200; /* FIXME */ } @@ -240,7 +250,6 @@ const struct game thegame = { FALSE, game_configure, custom_params, validate_params, new_game_desc, - game_free_aux_info, validate_desc, new_game, dup_game, @@ -249,8 +258,11 @@ const struct game thegame = { FALSE, game_text_format, new_ui, free_ui, + encode_ui, + decode_ui, game_changed_state, - make_move, + interpret_move, + execute_move, game_size, game_colours, game_new_drawstate,