X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/4cd257601be04d875f89c206bd413d0554b49ac6..e2cbd23a0f724f7ec8da5112e184152586a87d36:/puzzles.h diff --git a/puzzles.h b/puzzles.h index f3aee1a..987bd9b 100644 --- a/puzzles.h +++ b/puzzles.h @@ -74,6 +74,7 @@ typedef struct game_aux_info game_aux_info; typedef struct game_ui game_ui; typedef struct game_drawstate game_drawstate; typedef struct game game; +typedef struct blitter blitter; #define ALIGN_VNORMAL 0x000 #define ALIGN_VCENTRE 0x100 @@ -146,6 +147,16 @@ void activate_timer(frontend *fe); void status_bar(frontend *fe, char *text); void get_random_seed(void **randseed, int *randseedsize); +blitter *blitter_new(int w, int h); +void blitter_free(blitter *bl); +/* save puts the portion of the current display with top-left corner + * (x,y) to the blitter. load puts it back again to the specified + * coords, or else wherever it was saved from + * (if x = y = BLITTER_FROMSAVED). */ +void blitter_save(frontend *fe, blitter *bl, int x, int y); +#define BLITTER_FROMSAVED (-1) +void blitter_load(frontend *fe, blitter *bl, int x, int y); + /* * midend.c */ @@ -248,7 +259,8 @@ struct game { game_state *(*dup_game)(game_state *state); void (*free_game)(game_state *state); int can_solve; - game_state *(*solve)(game_state *state, game_aux_info *aux, char **error); + game_state *(*solve)(game_state *orig, game_state *curr, + game_aux_info *aux, char **error); int can_format_as_text; char *(*text_format)(game_state *state); game_ui *(*new_ui)(game_state *state);