Stop calling face_text_pos() for faces that don't need to have text in
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 23 Apr 2011 11:44:41 +0000 (11:44 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 23 Apr 2011 11:44:41 +0000 (11:44 +0000)
them anyway. It's slow and pointless.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9155 cda61777-01e9-0310-a592-d414129be87e

loopy.c

diff --git a/loopy.c b/loopy.c
index 6d88e5d..05d66ab 100644 (file)
--- a/loopy.c
+++ b/loopy.c
@@ -3735,9 +3735,11 @@ static void game_redraw_in_rect(drawing *dr, game_drawstate *ds,
     draw_rect(dr, x, y, w, h, COL_BACKGROUND);
 
     for (i = 0; i < g->num_faces; i++) {
-        face_text_bbox(ds, g, &g->faces[i], &bx, &by, &bw, &bh);
-        if (boxes_intersect(x, y, w, h, bx, by, bw, bh))
-            game_redraw_clue(dr, ds, state, i);
+        if (state->clues[i] >= 0) {
+            face_text_bbox(ds, g, &g->faces[i], &bx, &by, &bw, &bh);
+            if (boxes_intersect(x, y, w, h, bx, by, bw, bh))
+                game_redraw_clue(dr, ds, state, i);
+        }
     }
     for (phase = 0; phase < NPHASES; phase++) {
         for (i = 0; i < g->num_edges; i++) {