diff options
| author | Simon Tatham <anakin@pobox.com> | 2011-04-23 11:44:41 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2011-04-23 11:44:41 +0000 |
| commit | 079e0d13288e3fce5b26c9de35e9a01880367097 (patch) | |
| tree | 24cbdc65858cce10c351ba28bf6769b736866e1f /loopy.c | |
| parent | 8713e2fa8138242df69af501ae8c9c4dc0358d74 (diff) | |
| download | puzzles-079e0d13288e3fce5b26c9de35e9a01880367097.zip puzzles-079e0d13288e3fce5b26c9de35e9a01880367097.tar.gz puzzles-079e0d13288e3fce5b26c9de35e9a01880367097.tar.bz2 puzzles-079e0d13288e3fce5b26c9de35e9a01880367097.tar.xz | |
Stop calling face_text_pos() for faces that don't need to have text in
them anyway. It's slow and pointless.
[originally from svn r9155]
Diffstat (limited to 'loopy.c')
| -rw-r--r-- | loopy.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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++) { |