Stop the analysis pass in Loopy's redraw routine from being

conditionalised on !ds->started, so that we still do all the looping
over everything even if we know it's all going to be redrawn. This is
because deciding how much needs redrawing is not the only important
thing in those loops - they also set up arrays like ds->clue_error,
which tell the individual redraw functions _what_ to draw.

Fixes a bug in which, if you start a Loopy game and make moves causing
a clue to light up red for an error and then save your game, loading
the same save file at the start of a Loopy run would fail to highlight
the erroneous clue.

(This commit diff looks large, but actually it changes almost nothing
but whitespace.)

[originally from svn r9751]
This commit is contained in:
Simon Tatham
2013-01-19 18:56:07 +00:00
parent 8a7dad6d2d
commit e0f5e49265

View File

@ -3193,9 +3193,13 @@ static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
* what needs doing, and the second actually does it.
*/
if (!ds->started)
if (!ds->started) {
redraw_everything = TRUE;
else {
/*
* But we must still go through the upcoming loops, so that we
* set up stuff in ds correctly for the initial redraw.
*/
}
/* First, trundle through the faces. */
for (i = 0; i < g->num_faces; i++) {
@ -3247,7 +3251,6 @@ static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
edges[nedges++] = i;
}
}
}
/* Pass one is now done. Now we do the actual drawing. */
if (redraw_everything) {