From 621649491dbc36285c3cfc0cd577ab04a2cbf5dc Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 24 Feb 2011 19:06:48 +0000 Subject: Retire the 'middle_face' field in 'struct grid', together with the overly complicated algorithm that uses it to home in on the grid edge closest to a mouse click. That algorithm is being stressed beyond its limit by the new grid type, and it's unnecessary anyway given that no sensibly sized puzzle grid is going to be big enough to make it prohibitively expensive just to do the trivial approach of iterating over all edges and finding the closest of the eligible ones. [originally from svn r9108] --- grid.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'grid.h') diff --git a/grid.h b/grid.h index 2fbe269..00bc7b4 100644 --- a/grid.h +++ b/grid.h @@ -57,11 +57,6 @@ typedef struct grid { int num_edges; grid_edge *edges; int num_dots; grid_dot *dots; - /* Should be a face roughly near the middle of the grid. - * Used to seed path-generation, and also for nearest-edge - * detection. */ - grid_face *middle_face; - /* Cache the bounding-box of the grid, so the drawing-code can quickly * figure out the proper scaling to draw onto a given area. */ int lowest_x, lowest_y, highest_x, highest_y; -- cgit v1.1