New front end functions to save and restore a region of the puzzle

bitmap. Can be used to implement sprite-like animations: for
example, useful for games that wish to implement a user interface
which involves dragging an object around the playing area.

[originally from svn r5987]
This commit is contained in:
Simon Tatham
2005-06-22 08:30:31 +00:00
parent 64fbdf60ee
commit b176767dfa
4 changed files with 186 additions and 0 deletions

View File

@ -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
*/