mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 16:32:13 -07:00
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:
11
puzzles.h
11
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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user