chiark / gitweb /
New rule: interpret_move() is passed a pointer to the game_drawstate
authorSimon Tatham <anakin@pobox.com>
Sun, 9 Sep 2012 18:40:12 +0000 (18:40 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 9 Sep 2012 18:40:12 +0000 (18:40 +0000)
commit3b250baa02a7332510685948bf17576c397b8ceb
treedb43c6ec326fee66d6612e363b83e021054ec87f
parent55748a60cbd964f697f84ed57c8fc5299406fcdf
New rule: interpret_move() is passed a pointer to the game_drawstate
basically just so that it can divide mouse coordinates by the tile
size, but is definitely not expected to _write_ to it, and it hadn't
previously occurred to me that anyone might try. Therefore,
interpret_move() now gets a pointer to a _const_ game_drawstate
instead of a writable one.

All existing puzzles cope fine with this API change (as long as the
new const qualifier is also added to a couple of subfunctions to which
interpret_move delegates work), except for the just-committed Undead,
which somehow had ds->ascii and ui->ascii the wrong way round but is
otherwise unproblematic.

[originally from svn r9657]
38 files changed:
blackbox.c
bridges.c
cube.c
devel.but
dominosa.c
fifteen.c
filling.c
flip.c
galaxies.c
guess.c
inertia.c
keen.c
lightup.c
loopy.c
magnets.c
map.c
mines.c
net.c
netslide.c
nullgame.c
pattern.c
pearl.c
pegs.c
puzzles.h
range.c
rect.c
samegame.c
signpost.c
singles.c
sixteen.c
slant.c
solo.c
tents.c
towers.c
twiddle.c
undead.c
unequal.c
untangle.c