mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -07:00
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]
This commit is contained in:
5
grid.h
5
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;
|
||||
|
Reference in New Issue
Block a user