aboutsummaryrefslogtreecommitdiff
path: root/grid.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2011-02-24 19:06:48 +0000
committerSimon Tatham <anakin@pobox.com>2011-02-24 19:06:48 +0000
commit621649491dbc36285c3cfc0cd577ab04a2cbf5dc (patch)
tree9613e70209ec47a0767d94ad78b88de947c9165c /grid.h
parent53f6e4c6cb0b342f37e75c2686c1b542212c5f3e (diff)
downloadpuzzles-621649491dbc36285c3cfc0cd577ab04a2cbf5dc.zip
puzzles-621649491dbc36285c3cfc0cd577ab04a2cbf5dc.tar.gz
puzzles-621649491dbc36285c3cfc0cd577ab04a2cbf5dc.tar.bz2
puzzles-621649491dbc36285c3cfc0cd577ab04a2cbf5dc.tar.xz
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]
Diffstat (limited to 'grid.h')
-rw-r--r--grid.h5
1 files changed, 0 insertions, 5 deletions
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;