aboutsummaryrefslogtreecommitdiff
path: root/twiddle.c
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 /twiddle.c
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 'twiddle.c')
-rw-r--r--twiddle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/twiddle.c b/twiddle.c
index f7bfd4a..273ce8c 100644
--- a/twiddle.c
+++ b/twiddle.c
@@ -618,8 +618,8 @@ static void free_ui(game_ui *ui)
{
}
-static game_state *make_move(game_state *from, game_ui *ui, int x, int y,
- int button)
+static game_state *make_move(game_state *from, game_ui *ui, game_drawstate *ds,
+ int x, int y, int button)
{
int w = from->w, h = from->h, n = from->n, wh = w*h;
game_state *ret;