aboutsummaryrefslogtreecommitdiff
path: root/puzzles.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-06-22 08:30:31 +0000
committerSimon Tatham <anakin@pobox.com>2005-06-22 08:30:31 +0000
commitb176767dfac722d85b3d3b4ab7969e5572189aa0 (patch)
tree100e6510f20f829d35a5fe66131d58afdb3f51f8 /puzzles.h
parent64fbdf60ee2eac039c469f867a3e9c0e1b9e119f (diff)
downloadpuzzles-b176767dfac722d85b3d3b4ab7969e5572189aa0.zip
puzzles-b176767dfac722d85b3d3b4ab7969e5572189aa0.tar.gz
puzzles-b176767dfac722d85b3d3b4ab7969e5572189aa0.tar.bz2
puzzles-b176767dfac722d85b3d3b4ab7969e5572189aa0.tar.xz
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]
Diffstat (limited to 'puzzles.h')
-rw-r--r--puzzles.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/puzzles.h b/puzzles.h
index 0dbc7f8..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
*/