aboutsummaryrefslogtreecommitdiff
path: root/puzzles.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-05-31 11:43:51 +0000
committerSimon Tatham <anakin@pobox.com>2005-05-31 11:43:51 +0000
commitcaee305b47bd93eda98ba40d98de7aa180a470c7 (patch)
treec66977b1c6c1a145330fb5caeee010ac48788cab /puzzles.h
parent4a3c26ff14bcfff841f1a014059a357b3263983a (diff)
downloadpuzzles-caee305b47bd93eda98ba40d98de7aa180a470c7.zip
puzzles-caee305b47bd93eda98ba40d98de7aa180a470c7.tar.gz
puzzles-caee305b47bd93eda98ba40d98de7aa180a470c7.tar.bz2
puzzles-caee305b47bd93eda98ba40d98de7aa180a470c7.tar.xz
Mouse-based interface for Cube: you left-click anywhere on the grid
and it moves the polyhedron in the general direction of the mouse pointer. (I had this in my initial throwaway Python implementation of this game, but never reimplemented it in this version. It's harder with triangles, but not too much harder.) Since the logical-to-physical coordinate mapping in Cube is dynamically computed, this has involved an interface change which touches all puzzles: make_move() is now passed a pointer to the game_drawstate, which it may of course completely ignore if it wishes. [originally from svn r5877]
Diffstat (limited to 'puzzles.h')
-rw-r--r--puzzles.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/puzzles.h b/puzzles.h
index bf441c6..de0f819 100644
--- a/puzzles.h
+++ b/puzzles.h
@@ -227,8 +227,8 @@ struct game {
char *(*text_format)(game_state *state);
game_ui *(*new_ui)(game_state *state);
void (*free_ui)(game_ui *ui);
- game_state *(*make_move)(game_state *from, game_ui *ui, int x, int y,
- int button);
+ game_state *(*make_move)(game_state *from, game_ui *ui, game_drawstate *ds,
+ int x, int y, int button);
void (*size)(game_params *params, int *x, int *y);
float *(*colours)(frontend *fe, game_state *state, int *ncolours);
game_drawstate *(*new_drawstate)(game_state *state);