chiark / gitweb /
Substantial infrastructure upheaval. I've separated the drawing API
authorSimon Tatham <anakin@pobox.com>
Thu, 18 Aug 2005 17:50:14 +0000 (17:50 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 18 Aug 2005 17:50:14 +0000 (17:50 +0000)
commitaf59dcf6858264103bbc621761feee3aed5aaf2a
treedcf5ac6c317548f4ee43b6db9d78c55f4c0da8db
parentca6950b0f7f7ccb3b8f86673a3626e1b4122bbb0
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.

[originally from svn r6190]
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