simon-svn: puzzles: simon

tartarus-commits at tartarus-commits at
Fri Sep 23 13:50:53 BST 2005

SVN root:       svn://
Changes by:     simon
Revision:       6340
Date:           2005-09-23 13:50:51 +0100 (Fri, 23 Sep 2005)

Log message (14 lines):
Use game_set_size() to set up the temporary drawstate in
game_print(), wherever feasible. This fixes a specific bug in Loopy
(James H's new field ds->linewidth wasn't being set up, leading to
corrupted print output), but I've made the change in all affected
files because it also seems like a generally good idea to encourage
it for future games, to prevent other problems of this type.

There is one slight snag, which is that Map _can't_ do this because
its game_set_size() also initialises a blitter. I could fix this by
abstracting the common parts of Map's game_set_size() out into a
subfunction called by game_set_size() and also called directly by
game_print(); alternatively, I could introduce a means of
determining whether a `drawing *' was for screen or printing use.
Not sure which yet.

Modified files:
U   puzzles/dominosa.c
U   puzzles/lightup.c
U   puzzles/loopy.c
U   puzzles/map.c
U   puzzles/net.c
U   puzzles/pattern.c
U   puzzles/rect.c
U   puzzles/slant.c
U   puzzles/solo.c


More information about the tartarus-commits mailing list