mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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]
This commit is contained in:
2
loopy.c
2
loopy.c
@ -3735,10 +3735,12 @@ static void game_redraw_in_rect(drawing *dr, game_drawstate *ds,
|
|||||||
draw_rect(dr, x, y, w, h, COL_BACKGROUND);
|
draw_rect(dr, x, y, w, h, COL_BACKGROUND);
|
||||||
|
|
||||||
for (i = 0; i < g->num_faces; i++) {
|
for (i = 0; i < g->num_faces; i++) {
|
||||||
|
if (state->clues[i] >= 0) {
|
||||||
face_text_bbox(ds, g, &g->faces[i], &bx, &by, &bw, &bh);
|
face_text_bbox(ds, g, &g->faces[i], &bx, &by, &bw, &bh);
|
||||||
if (boxes_intersect(x, y, w, h, bx, by, bw, bh))
|
if (boxes_intersect(x, y, w, h, bx, by, bw, bh))
|
||||||
game_redraw_clue(dr, ds, state, i);
|
game_redraw_clue(dr, ds, state, i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (phase = 0; phase < NPHASES; phase++) {
|
for (phase = 0; phase < NPHASES; phase++) {
|
||||||
for (i = 0; i < g->num_edges; i++) {
|
for (i = 0; i < g->num_edges; i++) {
|
||||||
edge_bbox(ds, g, &g->edges[i], &bx, &by, &bw, &bh);
|
edge_bbox(ds, g, &g->edges[i], &bx, &by, &bw, &bh);
|
||||||
|
Reference in New Issue
Block a user