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]
This commit is contained in:
Simon Tatham
2005-05-31 11:43:51 +00:00
parent 4a3c26ff14
commit caee305b47
13 changed files with 94 additions and 33 deletions

View File

@ -450,9 +450,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 gx, gy, dx, dy, ux, uy, up, p;
game_state *ret;