Substantial infrastructure upheaval. I've separated the drawing API
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 18 Aug 2005 17:50:14 +0000 (17:50 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 18 Aug 2005 17:50:14 +0000 (17:50 +0000)
commitdafd6cf6826f9bbd27ddd780fab48221d4706556
treedcf5ac6c317548f4ee43b6db9d78c55f4c0da8db
parent7f34e0edcaf2134e534b8a5527da828234bda714
Substantial infrastructure upheaval. I've separated the drawing API
as seen by the back ends from the one implemented by the front end,
and shoved a piece of middleware (drawing.c) in between to permit
interchange of multiple kinds of the latter. I've also added a
number of functions to the drawing API to permit printing as well as
on-screen drawing, and retired print.py in favour of integrated
printing done by means of that API.

The immediate visible change is that print.py is dead, and each
puzzle now does its own printing: where you would previously have
typed `print.py solo 2x3', you now type `solo --print 2x3' and it
should work in much the same way.

Advantages of the new mechanism available right now:
 - Map is now printable, because the new print function can make use
   of the output from the existing game ID decoder rather than me
   having to replicate all those fiddly algorithms in Python.
 - the new print functions can cope with non-initial game states,
   which means each puzzle supporting --print also supports
   --with-solutions.
 - there's also a --scale option permitting users to adjust the size
   of the printed puzzles.

Advantages which will be available at some point:
 - the new API should permit me to implement native printing
   mechanisms on Windows and OS X.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6190 cda61777-01e9-0310-a592-d414129be87e
34 files changed:
CHECKLST.txt
Recipe
blackbox.c
cube.c
devel.but
dominosa.c
drawing.c [new file with mode: 0644]
fifteen.c
flip.c
gtk.c
guess.c
lightup.c
map.c
midend.c
mines.c
misc.c
net.c
netslide.c
nullgame.c
osx.m
pattern.c
pegs.c
print.py [deleted file]
printing.c [new file with mode: 0644]
ps.c [new file with mode: 0644]
puzzles.h
rect.c
samegame.c
sixteen.c
slant.c
solo.c
twiddle.c
untangle.c
windows.c