~mdw
/
sgt
/
puzzles
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
efdb908
)
Fix redundant redrawing in Pegs. Apparently it has always redrawn
author
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Apr 2012 22:19:18 +0000
(22:19 +0000)
committer
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Apr 2012 22:19:18 +0000
(22:19 +0000)
every single peg and hole on the board, every time it did any kind of
redraw at all, because I forgot to update the array in the drawstate
indicating the last-drawn state of each position. And nobody's noticed
until now!
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9447
cda61777
-01e9-0310-a592-
d414129be87e
pegs.c
patch
|
blob
|
blame
|
history
diff --git
a/pegs.c
b/pegs.c
index
4daa55f
..
d77860c
100644
(file)
--- a/
pegs.c
+++ b/
pegs.c
@@
-1237,6
+1237,7
@@
static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
(bgcolour != ds->bgcolour || /* always redraw when flashing */
v != ds->grid[y*w+x])) {
draw_tile(dr, ds, COORD(x), COORD(y), v, bgcolour);
+ ds->grid[y*w+x] = v;
}
}