From caee305b47bd93eda98ba40d98de7aa180a470c7 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 31 May 2005 11:43:51 +0000 Subject: 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] --- rect.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'rect.c') diff --git a/rect.c b/rect.c index c1eaa2c..9e4204d 100644 --- a/rect.c +++ b/rect.c @@ -2178,9 +2178,8 @@ static void ui_draw_rect(game_state *state, 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 xc, yc; int startdrag = FALSE, enddrag = FALSE, active = FALSE; game_state *ret; -- cgit v1.1