X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/5928817c732d591bd446b6b048702a98f5ec1804..c87ce51a9ebefaed64048dcd86aed546b930779d:/nullgame.c diff --git a/nullgame.c b/nullgame.c index bc0c386..e704de9 100644 --- a/nullgame.c +++ b/nullgame.c @@ -15,11 +15,13 @@ #include #include #include +#include #include #include "puzzles.h" const char *const game_name = "Null Game"; +const char *const game_winhelp_topic = NULL; const int game_can_configure = FALSE; enum { @@ -61,6 +63,20 @@ game_params *dup_params(game_params *params) return ret; } +game_params *decode_params(char const *string) +{ + game_params *ret = snew(game_params); + + ret->FIXME = 0; + + return ret; +} + +char *encode_params(game_params *params) +{ + return dupstr("FIXME"); +} + config_item *game_configure(game_params *params) { return NULL; @@ -76,7 +92,7 @@ char *validate_params(game_params *params) return NULL; } -char *new_game_seed(game_params *params) +char *new_game_seed(game_params *params, random_state *rs) { return dupstr("FIXME"); } @@ -109,7 +125,16 @@ void free_game(game_state *state) sfree(state); } -game_state *make_move(game_state *from, int x, int y, int button) +game_ui *new_ui(game_state *state) +{ + return NULL; +} + +void free_ui(game_ui *ui) +{ +} + +game_state *make_move(game_state *from, game_ui *ui, int x, int y, int button) { return NULL; } @@ -152,16 +177,24 @@ void game_free_drawstate(game_drawstate *ds) } void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate, - game_state *state, float animtime, float flashtime) + game_state *state, int dir, game_ui *ui, + float animtime, float flashtime) { + /* + * The initial contents of the window are not guaranteed and + * can vary with front ends. To be on the safe side, all games + * should start by drawing a big background-colour rectangle + * covering the whole window. + */ + draw_rect(fe, 0, 0, 200, 200, COL_BACKGROUND); } -float game_anim_length(game_state *oldstate, game_state *newstate) +float game_anim_length(game_state *oldstate, game_state *newstate, int dir) { return 0.0F; } -float game_flash_length(game_state *oldstate, game_state *newstate) +float game_flash_length(game_state *oldstate, game_state *newstate, int dir) { return 0.0F; }