sgt/puzzles
17 years agoBen Hutchings' patch to allow Gtk windows to be shrunk as well as grown
jacob [Sat, 3 Mar 2007 22:39:17 +0000 (22:39 +0000)]
Ben Hutchings' patch to allow Gtk windows to be shrunk as well as grown
(from Debian bug#379452).
Tested on Gtk 2. I've been unable to find a Gtk+-1.2 installation on which
Puzzles compiles, so not tested there.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7367 cda61777-01e9-0310-a592-d414129be87e

17 years agoRefactoring patch from Ben Hutchings: move all the Gtk resize code into one
jacob [Sat, 3 Mar 2007 22:05:05 +0000 (22:05 +0000)]
Refactoring patch from Ben Hutchings: move all the Gtk resize code into one
place. (From Debian bug#379452)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7366 cda61777-01e9-0310-a592-d414129be87e

17 years agoPatch from James H to provide resizability on Windows.
simon [Sat, 3 Mar 2007 17:36:44 +0000 (17:36 +0000)]
Patch from James H to provide resizability on Windows.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7364 cda61777-01e9-0310-a592-d414129be87e

17 years agoMinor cleanups (mostly \ns in diagnostic printfs) from James H.
simon [Sat, 3 Mar 2007 17:25:13 +0000 (17:25 +0000)]
Minor cleanups (mostly \ns in diagnostic printfs) from James H.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7363 cda61777-01e9-0310-a592-d414129be87e

17 years agoMy favourite kind of patch, from James H: one which decreases the
simon [Sat, 3 Mar 2007 17:15:25 +0000 (17:15 +0000)]
My favourite kind of patch, from James H: one which decreases the
amount of code. James has ripped out the solver's version of
check_complete(), in favour of using the one I wrote for the
game-playing UI. My one checks connectedness, which means that the
solver will now not believe non-solutions to puzzles where
connectedness becomes a difficult issue. Examples of game IDs which
are now solved correctly but were previously not are 5x3:ubb and
7x7:ajfzmfqgtdzgt.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7362 cda61777-01e9-0310-a592-d414129be87e

17 years agoAbout time I got round to documenting the new
simon [Sat, 3 Mar 2007 09:41:51 +0000 (09:41 +0000)]
About time I got round to documenting the new
REQUIRE_{RBUTTON,NUMPAD} flags.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7356 cda61777-01e9-0310-a592-d414129be87e

17 years agoFix problems with arrow UI with non-square grid.
jacob [Fri, 2 Mar 2007 20:14:15 +0000 (20:14 +0000)]
Fix problems with arrow UI with non-square grid.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7355 cda61777-01e9-0310-a592-d414129be87e

17 years agoSilliness! Here's a somewhat hacky patch which builds an additional
simon [Thu, 1 Mar 2007 18:57:36 +0000 (18:57 +0000)]
Silliness! Here's a somewhat hacky patch which builds an additional
binary from the Galaxies source file. The function of the new
`galaxiespicture' is to take a .xbm bitmap on standard input and
convert it into a Galaxies game ID using both black and white dots,
such that when solved the puzzle displays the input bitmap.

In the process of this I've implemented a post-processing pass after
the main game generation, to prevent clusters of adjacent
singletons. James H already solved that problem for unconstrained
game generation, but for some reason it came back when I did this.
However, the post-processing pass is still turned off for normal
usage, on the basis that (a) if it ain't broke don't fix it, and (b)
it's rather slow and best avoided if not necessary.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7354 cda61777-01e9-0310-a592-d414129be87e

17 years agoAmend README so that it makes reasonable sense no matter whether
simon [Thu, 1 Mar 2007 13:29:53 +0000 (13:29 +0000)]
Amend README so that it makes reasonable sense no matter whether
you've got your source code from a tarball (with makefiles) or from
svn (without makefiles). While I'm here, mention Makefile.wce.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7352 cda61777-01e9-0310-a592-d414129be87e

17 years agoCleanup patch from James H: disable the `s' key, which was only in
simon [Thu, 1 Mar 2007 07:41:11 +0000 (07:41 +0000)]
Cleanup patch from James H: disable the `s' key, which was only in
there by accident.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7351 cda61777-01e9-0310-a592-d414129be87e

17 years agoAdam D. Lopresto and Phil Bordelon independently point out a
simon [Thu, 1 Mar 2007 07:39:05 +0000 (07:39 +0000)]
Adam D. Lopresto and Phil Bordelon independently point out a
signedness mismatch.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7350 cda61777-01e9-0310-a592-d414129be87e

17 years agoBound edge thicknesses below so that they're always thicker than the
simon [Thu, 1 Mar 2007 07:32:35 +0000 (07:32 +0000)]
Bound edge thicknesses below so that they're always thicker than the
grid lines.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7349 cda61777-01e9-0310-a592-d414129be87e

17 years agoFix some border drawing issues.
jacob [Wed, 28 Feb 2007 22:22:30 +0000 (22:22 +0000)]
Fix some border drawing issues.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7347 cda61777-01e9-0310-a592-d414129be87e

17 years agoMinGW windres doesn't like an empty resource file, so invent a resource to
jacob [Wed, 28 Feb 2007 21:49:48 +0000 (21:49 +0000)]
MinGW windres doesn't like an empty resource file, so invent a resource to
keep it happy. (Hopefully this hack will be temporary.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7346 cda61777-01e9-0310-a592-d414129be87e

17 years agoGeneral cleanups patch from James H:
simon [Wed, 28 Feb 2007 21:19:15 +0000 (21:19 +0000)]
General cleanups patch from James H:
 - missing static in filling.c
 - better robustness in execute_move() in filling.c
 - remove side effects in assert statements
 - remove rogue diagnostic in galaxies.c
 - remove // comment in map.c
 - add more stylus-friendly UI to Pattern
 - bias Unequal towards generating inequality clues rather than numeric

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7344 cda61777-01e9-0310-a592-d414129be87e

17 years agoGary Wong points out a couple of minor errors in the setting of
simon [Wed, 28 Feb 2007 21:02:31 +0000 (21:02 +0000)]
Gary Wong points out a couple of minor errors in the setting of
`used_solve'.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7343 cda61777-01e9-0310-a592-d414129be87e

17 years agoProvide my old drag-based interface to Net as an ifdef-enabled
simon [Tue, 27 Feb 2007 21:03:06 +0000 (21:03 +0000)]
Provide my old drag-based interface to Net as an ifdef-enabled
option, and turn it on by default on stylus-based platforms (i.e.
currently PocketPC).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7341 cda61777-01e9-0310-a592-d414129be87e

17 years agoAnother thing to watch out for when adding new puzzles.
simon [Tue, 27 Feb 2007 20:52:03 +0000 (20:52 +0000)]
Another thing to watch out for when adding new puzzles.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7340 cda61777-01e9-0310-a592-d414129be87e

17 years agoCreate a blank .rc file to be used in the absence of icons/foo.rc.
simon [Tue, 27 Feb 2007 20:49:40 +0000 (20:49 +0000)]
Create a blank .rc file to be used in the absence of icons/foo.rc.
This means that puzzles.rc2 is always included in all Windows and
PocketPC builds, which in turn means that I should be able to start
filling it full of VERSIONINFO and have that reliably included as
well.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7339 cda61777-01e9-0310-a592-d414129be87e

17 years agoThis game requires the numpad.
simon [Tue, 27 Feb 2007 20:46:15 +0000 (20:46 +0000)]
This game requires the numpad.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7338 cda61777-01e9-0310-a592-d414129be87e

17 years agoDariusz Olszewski's changes to support compiling for PocketPC. This
simon [Mon, 26 Feb 2007 20:35:47 +0000 (20:35 +0000)]
Dariusz Olszewski's changes to support compiling for PocketPC. This
is mostly done with ifdefs in windows.c; so mkfiles.pl generates a
new makefile (Makefile.wce) and Recipe enables it, but it's hardly
any different from Makefile.vc apart from a few definitions at the
top of the files.

Currently the PocketPC build is not enabled in the build script, but
with any luck I'll be able to do so reasonably soon.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7337 cda61777-01e9-0310-a592-d414129be87e

17 years agoAfter it confused Verity, clarify in the Unequal docs that the
simon [Sun, 25 Feb 2007 23:30:14 +0000 (23:30 +0000)]
After it confused Verity, clarify in the Unequal docs that the
Trivial and Recursive difficulty levels are available for custom
selection even though no preset uses them.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7336 cda61777-01e9-0310-a592-d414129be87e

17 years agoHardwiring the grid line width to 1 is really bad for printing. Use
simon [Sun, 25 Feb 2007 15:57:35 +0000 (15:57 +0000)]
Hardwiring the grid line width to 1 is really bad for printing. Use
a slightly more conventional method of drawing the grid lines, and
thereby fix printing.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7335 cda61777-01e9-0310-a592-d414129be87e

17 years agoGalaxies doesn't print in colour.
simon [Sun, 25 Feb 2007 15:50:24 +0000 (15:50 +0000)]
Galaxies doesn't print in colour.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7334 cda61777-01e9-0310-a592-d414129be87e

17 years agoDon't create an undo-chain entry for a move with no effect.
simon [Sun, 25 Feb 2007 13:00:58 +0000 (13:00 +0000)]
Don't create an undo-chain entry for a move with no effect.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7333 cda61777-01e9-0310-a592-d414129be87e

17 years agoFix a UI glitch where dragging an existing arrow could change what it
jacob [Sun, 25 Feb 2007 12:54:46 +0000 (12:54 +0000)]
Fix a UI glitch where dragging an existing arrow could change what it
referred to.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7331 cda61777-01e9-0310-a592-d414129be87e

17 years agoTweak the cropping of the Filling icon very slightly.
simon [Sun, 25 Feb 2007 12:18:20 +0000 (12:18 +0000)]
Tweak the cropping of the Filling icon very slightly.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7330 cda61777-01e9-0310-a592-d414129be87e

17 years agoUpdate the checklist (yet again) to try to prevent a recurrence of
simon [Sun, 25 Feb 2007 12:12:35 +0000 (12:12 +0000)]
Update the checklist (yet again) to try to prevent a recurrence of
the error I corrected in r7328.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7329 cda61777-01e9-0310-a592-d414129be87e

17 years agoForgot to enable the Windows icon.
simon [Sun, 25 Feb 2007 12:11:47 +0000 (12:11 +0000)]
Forgot to enable the Windows icon.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7328 cda61777-01e9-0310-a592-d414129be87e

17 years agoMore updates to the new-puzzle checklist.
simon [Sun, 25 Feb 2007 12:04:42 +0000 (12:04 +0000)]
More updates to the new-puzzle checklist.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7327 cda61777-01e9-0310-a592-d414129be87e

17 years agoNew puzzle: `Filling', a Fillomino implementation by Jonas Koelker.
simon [Sun, 25 Feb 2007 11:37:05 +0000 (11:37 +0000)]
New puzzle: `Filling', a Fillomino implementation by Jonas Koelker.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7326 cda61777-01e9-0310-a592-d414129be87e

17 years agoMore ignores.
simon [Sun, 25 Feb 2007 11:03:29 +0000 (11:03 +0000)]
More ignores.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7325 cda61777-01e9-0310-a592-d414129be87e

17 years agoOops. Having built the installer, we need a redirect for it in
simon [Sun, 25 Feb 2007 10:10:51 +0000 (10:10 +0000)]
Oops. Having built the installer, we need a redirect for it in
.htaccess.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7324 cda61777-01e9-0310-a592-d414129be87e

17 years agoBuild an installer for Puzzles.
simon [Sat, 24 Feb 2007 19:33:38 +0000 (19:33 +0000)]
Build an installer for Puzzles.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7319 cda61777-01e9-0310-a592-d414129be87e

17 years agoSomehow I let a couple of // comments get past me when I accepted
simon [Sat, 24 Feb 2007 17:34:21 +0000 (17:34 +0000)]
Somehow I let a couple of // comments get past me when I accepted
this file. Remove them.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7318 cda61777-01e9-0310-a592-d414129be87e

17 years agoUpdate ignore property. (Again.)
simon [Fri, 23 Feb 2007 10:42:01 +0000 (10:42 +0000)]
Update ignore property. (Again.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7315 cda61777-01e9-0310-a592-d414129be87e

17 years agoPhil Bordelon points out that when I renamed `Recursive' I missed a
simon [Thu, 22 Feb 2007 23:18:51 +0000 (23:18 +0000)]
Phil Bordelon points out that when I renamed `Recursive' I missed a
bit.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7314 cda61777-01e9-0310-a592-d414129be87e

17 years agoRemove spurious semicolons from macros; their upset compilers that don't like
jacob [Thu, 22 Feb 2007 21:31:59 +0000 (21:31 +0000)]
Remove spurious semicolons from macros; their upset compilers that don't like
mixing declarations and code (I accidentally tried to compile it with one
such).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7313 cda61777-01e9-0310-a592-d414129be87e

17 years agoAnd fix the error _I_ made in r7311. I should stop coding now,
simon [Thu, 22 Feb 2007 19:05:10 +0000 (19:05 +0000)]
And fix the error _I_ made in r7311. I should stop coding now,
because I'm clearly too sleepy to get it right.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7312 cda61777-01e9-0310-a592-d414129be87e

17 years agoPart of r7310 completely changed the careful semantics of my
simon [Thu, 22 Feb 2007 18:59:15 +0000 (18:59 +0000)]
Part of r7310 completely changed the careful semantics of my
coordinate-rounding, causing picking up arrows from a dot anywhere
other than at the centre of a square to break.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7311 cda61777-01e9-0310-a592-d414129be87e

17 years agoPatch from James H to make the Palm compiler stop objecting to my
simon [Thu, 22 Feb 2007 18:13:12 +0000 (18:13 +0000)]
Patch from James H to make the Palm compiler stop objecting to my
(as far as I could tell) perfectly legal use of floats, and also
remove some VC warnings.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7310 cda61777-01e9-0310-a592-d414129be87e

17 years agoWe may reluctantly permit the returning of a too-easy puzzle if an
simon [Thu, 22 Feb 2007 18:09:51 +0000 (18:09 +0000)]
We may reluctantly permit the returning of a too-easy puzzle if an
adequately hard one couldn't be found, but we must never return a
puzzle harder than the user asked for, and we _certainly_ mustn't
return one that we aren't even sure has a unique solution.

However, when I attempted to implement this rule, it turned out that
an attempt to generate a 15x15 Easy puzzle didn't terminate before I
got bored and killed it. I'm therefore retiring the Easy difficulty
level on the grounds that it's not a wide enough band to be useful.
I've renamed Hard to Normal, and (while I was there) renamed
Recursive to Unreasonable in line with my normal practice.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7309 cda61777-01e9-0310-a592-d414129be87e

17 years agoJames H forgot to credit himself for Galaxies!
simon [Thu, 22 Feb 2007 10:06:59 +0000 (10:06 +0000)]
James H forgot to credit himself for Galaxies!

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7308 cda61777-01e9-0310-a592-d414129be87e

17 years agoUpdate the new-puzzle checklist for the post-bob world.
simon [Thu, 22 Feb 2007 09:54:52 +0000 (09:54 +0000)]
Update the new-puzzle checklist for the post-bob world.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7307 cda61777-01e9-0310-a592-d414129be87e

17 years agoMissing uses of \q{}.
simon [Thu, 22 Feb 2007 09:50:33 +0000 (09:50 +0000)]
Missing uses of \q{}.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7305 cda61777-01e9-0310-a592-d414129be87e

17 years agoAdd James Harvey's excellent new puzzle, `Galaxies'.
simon [Thu, 22 Feb 2007 09:31:43 +0000 (09:31 +0000)]
Add James Harvey's excellent new puzzle, `Galaxies'.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7304 cda61777-01e9-0310-a592-d414129be87e

17 years agoForgot to shuffle the num[] array! That was probably introducing
simon [Mon, 19 Feb 2007 19:38:00 +0000 (19:38 +0000)]
Forgot to shuffle the num[] array! That was probably introducing
some really subtle probabilistic bias in the generated latin squares.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7302 cda61777-01e9-0310-a592-d414129be87e

17 years agoReplicate r7285 from PuTTY: make keyboard input work in HTML Help.
jacob [Tue, 13 Feb 2007 23:01:50 +0000 (23:01 +0000)]
Replicate r7285 from PuTTY: make keyboard input work in HTML Help.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7286 cda61777-01e9-0310-a592-d414129be87e

17 years agoNow we have the new `module' command, use it.
simon [Mon, 5 Feb 2007 12:41:21 +0000 (12:41 +0000)]
Now we have the new `module' command, use it.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7224 cda61777-01e9-0310-a592-d414129be87e

17 years agoReinstate the icons in the Windows binaries.
simon [Sun, 4 Feb 2007 14:35:23 +0000 (14:35 +0000)]
Reinstate the icons in the Windows binaries.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7217 cda61777-01e9-0310-a592-d414129be87e

17 years agoForgot to tag the Mac and Windows binaries with the revision number.
simon [Sun, 4 Feb 2007 14:03:52 +0000 (14:03 +0000)]
Forgot to tag the Mac and Windows binaries with the revision number.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7215 cda61777-01e9-0310-a592-d414129be87e

17 years agoLooking for puzzles*.tar.gz in the right directory is liable to make
simon [Sun, 4 Feb 2007 13:44:38 +0000 (13:44 +0000)]
Looking for puzzles*.tar.gz in the right directory is liable to make
the .htaccess build work better :-)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7214 cda61777-01e9-0310-a592-d414129be87e

17 years agoBuild script for Puzzles using bob. I've also added a piece of extra
simon [Sun, 4 Feb 2007 11:44:10 +0000 (11:44 +0000)]
Build script for Puzzles using bob. I've also added a piece of extra
infrastructure to the mkfiles.pl framework for the convenience of
the build script: it generates `wingames.lst', a list of the Windows
binaries which are ship-worthy games as opposed to nullgame or
command-line auxiliary programs.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7206 cda61777-01e9-0310-a592-d414129be87e

17 years agoMisdirected cross-reference spotted by Jonas Koelker.
simon [Sat, 27 Jan 2007 10:25:20 +0000 (10:25 +0000)]
Misdirected cross-reference spotted by Jonas Koelker.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7172 cda61777-01e9-0310-a592-d414129be87e

17 years agoMarcin Wojdyr points out that the use of `>&' to redirect both
simon [Tue, 16 Jan 2007 12:54:24 +0000 (12:54 +0000)]
Marcin Wojdyr points out that the use of `>&' to redirect both
stdout and stderr is non-standard. Switch to a POSIX-blessed
alternative.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7116 cda61777-01e9-0310-a592-d414129be87e

17 years agoPhil Bordelon points out an off-by-one error: since Solo doesn't use
simon [Mon, 15 Jan 2007 23:30:44 +0000 (23:30 +0000)]
Phil Bordelon points out an off-by-one error: since Solo doesn't use
zero as a valid puzzle symbol, it can support at most 35 symbols,
not 36. (This is largely academic since IME anything above about 25
is impractical to generate, but there we go.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7115 cda61777-01e9-0310-a592-d414129be87e

17 years agoPatch from James H which shouldn't change the functionality of
simon [Mon, 15 Jan 2007 20:21:57 +0000 (20:21 +0000)]
Patch from James H which shouldn't change the functionality of
Loopy, but makes it build more sensibly on the Palm.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7114 cda61777-01e9-0310-a592-d414129be87e

17 years agoPatch from James H to fix the occasional generation of puzzles
simon [Mon, 15 Jan 2007 20:07:18 +0000 (20:07 +0000)]
Patch from James H to fix the occasional generation of puzzles
harder than requested.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7113 cda61777-01e9-0310-a592-d414129be87e

17 years agoPhil Bordelon points out that the Unequal difficulty settings
simon [Mon, 15 Jan 2007 20:04:11 +0000 (20:04 +0000)]
Phil Bordelon points out that the Unequal difficulty settings
documentation is a bit odd, and also offers a signedness fix in
latin.c.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7112 cda61777-01e9-0310-a592-d414129be87e

17 years agoGive all the intermediate files distinct file names, so that a
simon [Sun, 14 Jan 2007 10:13:29 +0000 (10:13 +0000)]
Give all the intermediate files distinct file names, so that a
multi-CPU machine can speed up the icon build using `make -j' and
not have it break.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7106 cda61777-01e9-0310-a592-d414129be87e

17 years agoFormatting tweaks / index terms in Unequal docs.
jacob [Sat, 13 Jan 2007 19:19:21 +0000 (19:19 +0000)]
Formatting tweaks / index terms in Unequal docs.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7105 cda61777-01e9-0310-a592-d414129be87e

17 years agoFirst time I've added a new puzzle since the icons-and-screenshots
simon [Sat, 13 Jan 2007 15:17:55 +0000 (15:17 +0000)]
First time I've added a new puzzle since the icons-and-screenshots
upheaval. Modify the checklist accordingly.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7103 cda61777-01e9-0310-a592-d414129be87e

17 years agoIcon for Unequal.
simon [Sat, 13 Jan 2007 14:59:15 +0000 (14:59 +0000)]
Icon for Unequal.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7101 cda61777-01e9-0310-a592-d414129be87e

17 years agoAdd James H's new puzzle, `Unequal' (otherwise known as the
simon [Sat, 13 Jan 2007 14:44:50 +0000 (14:44 +0000)]
Add James H's new puzzle, `Unequal' (otherwise known as the
Guardian's `Futoshiki').

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7100 cda61777-01e9-0310-a592-d414129be87e

17 years agoRemove a couple of rogue make targets for `osx.icns.o' and
simon [Sat, 13 Jan 2007 12:03:42 +0000 (12:03 +0000)]
Remove a couple of rogue make targets for `osx.icns.o' and
`osx-info.plist.o' which had crept into most of the Makefiles.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7099 cda61777-01e9-0310-a592-d414129be87e

17 years agoRather to my surprise given the amount of testing this code has had,
simon [Thu, 11 Jan 2007 09:26:09 +0000 (09:26 +0000)]
Rather to my surprise given the amount of testing this code has had,
Kevin Lyles spotted a tree234 bug! copytree234() segfaulted when
asked to copy a tree containing no elements, due to failing to allow
for the case that t->root might be NULL. Fixed, and added a
regression test.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7092 cda61777-01e9-0310-a592-d414129be87e

17 years agoIn Windows/Gtk front-ends, consistently use the ellipsis convention for naming
jacob [Thu, 4 Jan 2007 19:24:43 +0000 (19:24 +0000)]
In Windows/Gtk front-ends, consistently use the ellipsis convention for naming
menu items which bring up dialogs.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7058 cda61777-01e9-0310-a592-d414129be87e

17 years agoPhil Bordelon's patch yesterday should have initialised the GError
simon [Wed, 3 Jan 2007 09:51:42 +0000 (09:51 +0000)]
Phil Bordelon's patch yesterday should have initialised the GError
to NULL.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7052 cda61777-01e9-0310-a592-d414129be87e

17 years agoPhil Bordelon points out that my invocation of gdk_pixbuf_save()
simon [Tue, 2 Jan 2007 19:45:19 +0000 (19:45 +0000)]
Phil Bordelon points out that my invocation of gdk_pixbuf_save()
isn't quite right.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7050 cda61777-01e9-0310-a592-d414129be87e

17 years agoIt's a new year.
jacob [Mon, 1 Jan 2007 21:19:14 +0000 (21:19 +0000)]
It's a new year.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7048 cda61777-01e9-0310-a592-d414129be87e

17 years agoDocument the new --game and --load options on Unix.
jacob [Sat, 30 Dec 2006 00:50:29 +0000 (00:50 +0000)]
Document the new --game and --load options on Unix.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7040 cda61777-01e9-0310-a592-d414129be87e

17 years agoMake errors in option parsing actually _do_ something in interactive mode.
jacob [Sat, 30 Dec 2006 00:26:16 +0000 (00:26 +0000)]
Make errors in option parsing actually _do_ something in interactive mode.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7039 cda61777-01e9-0310-a592-d414129be87e

17 years agoBring .R files for nullgame and unfinished puzzles up to date with the rest of
jacob [Fri, 29 Dec 2006 22:43:47 +0000 (22:43 +0000)]
Bring .R files for nullgame and unfinished puzzles up to date with the rest of
the world (by adding icon support).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7038 cda61777-01e9-0310-a592-d414129be87e

17 years agoUpdate manual copyright to 2006.
jacob [Fri, 29 Dec 2006 16:42:02 +0000 (16:42 +0000)]
Update manual copyright to 2006.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7036 cda61777-01e9-0310-a592-d414129be87e

17 years agoAdd NO_HTMLHELP and turn it on by default in Makefile.cyg.
jacob [Thu, 28 Dec 2006 21:39:22 +0000 (21:39 +0000)]
Add NO_HTMLHELP and turn it on by default in Makefile.cyg.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7033 cda61777-01e9-0310-a592-d414129be87e

17 years agoEnhance icon.pl to be a fully general Windows icon builder: it now
simon [Thu, 28 Dec 2006 17:07:21 +0000 (17:07 +0000)]
Enhance icon.pl to be a fully general Windows icon builder: it now
supports monochrome icons, can deal with any size of image you're
mad enough to put in there, and will construct icons with whatever
combination of sizes and resolutions you feel like specifying. This
has involved a change in the command-line syntax, hence the
adjustment to Makefile.

(I don't imagine that the changes described here will be critical to
Puzzles any time soon, but I might reuse this script elsewhere and
then I won't want it to have arbitrary limitations.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7031 cda61777-01e9-0310-a592-d414129be87e

17 years ago`make all' targets are usually useful.
simon [Wed, 27 Dec 2006 16:49:39 +0000 (16:49 +0000)]
`make all' targets are usually useful.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7026 cda61777-01e9-0310-a592-d414129be87e

17 years agoEr, further makedist fixes. Helps if you test _before_ checkin.
simon [Wed, 27 Dec 2006 15:49:16 +0000 (15:49 +0000)]
Er, further makedist fixes. Helps if you test _before_ checkin.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7025 cda61777-01e9-0310-a592-d414129be87e

17 years agoAnd update makedist.sh to put all the new stuff into the source
simon [Wed, 27 Dec 2006 15:36:27 +0000 (15:36 +0000)]
And update makedist.sh to put all the new stuff into the source
tarball.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7024 cda61777-01e9-0310-a592-d414129be87e

17 years agoFix the Cygwin RCFLAGS in the light of recent changes.
simon [Wed, 27 Dec 2006 15:33:43 +0000 (15:33 +0000)]
Fix the Cygwin RCFLAGS in the light of recent changes.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7023 cda61777-01e9-0310-a592-d414129be87e

17 years agoAha, this seems to be a more sensible way of getting screenshots:
simon [Wed, 27 Dec 2006 15:21:55 +0000 (15:21 +0000)]
Aha, this seems to be a more sensible way of getting screenshots:
instead of having the puzzle binary export its window ID to a script
which then runs xwd, we can use the gdk-pixbuf library to have the
puzzle binary _itself_ read its own internal pixmap and save it
straight to a PNG. How handy. And faster, and less timing-sensitive.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7022 cda61777-01e9-0310-a592-d414129be87e

17 years agoSupport for run-time icons in the GTK puzzles. This involved another
simon [Wed, 27 Dec 2006 15:10:59 +0000 (15:10 +0000)]
Support for run-time icons in the GTK puzzles. This involved another
mkfiles.pl change (I don't seem to be planning ahead very well this
week), this time to provide a list of fallback options for an object
file. That way, I have a no-icon.c which quietly replaces
icons/foo-icon.c if the latter doesn't exist, and so again people
checking straight out from Subversion shouldn't have trouble.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7021 cda61777-01e9-0310-a592-d414129be87e

17 years agoActually introduce the ability to build the Windows icons into the
simon [Wed, 27 Dec 2006 11:05:20 +0000 (11:05 +0000)]
Actually introduce the ability to build the Windows icons into the
Windows puzzle binaries. This checkin involves several distinct
changes:
 - mkfiles.pl now has an extra feature: if an object file is listed
   in Recipe with a trailing question mark, it will be considered
   optional, and silently dropped from the makefile if its primary
   source file isn't present at the time mkfiles.pl runs. This means
   people who check out the puzzles from Subversion and just run
   mkfiles.pl shouldn't get build failures; they just won't get the
   icons.
 - all the .R files now use this feature to include an optional
   Windows resource file.
 - the .rc resource source files are built by icons/Makefile.
 - windows.c finds the icon if present and uses it in place of the
   standard Windows application icon.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7020 cda61777-01e9-0310-a592-d414129be87e

17 years agoImprove the icon images by cropping selected pieces out of most of
simon [Wed, 27 Dec 2006 10:26:13 +0000 (10:26 +0000)]
Improve the icon images by cropping selected pieces out of most of
the main screenshots. (A few, like Map, were perfect already.)

In the process I've vertically reflected the puzzle shown in the
Pattern save file, to bring a more interesting piece of it into the
top left corner :-)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7019 cda61777-01e9-0310-a592-d414129be87e

17 years agoCode to construct Windows icon files for the puzzles, by munging the
simon [Tue, 26 Dec 2006 22:00:11 +0000 (22:00 +0000)]
Code to construct Windows icon files for the puzzles, by munging the
screenshots into appropriate sizes and colour depths. This is all
done with a nasty Perl script, because ImageMagick does not output
correct .ICO format. Not sure why; it isn't _that_ hard.

I intend at some point to link the resulting icons into the actual
Windows puzzle binaries, but before then I have to make them
prettier: most of them would benefit from being derived from a
smaller crop of the puzzle screenshot instead of trying to fit the
whole thing in.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7017 cda61777-01e9-0310-a592-d414129be87e

17 years agoNew mechanism for automatic generation of the puzzle screenshots on
simon [Tue, 26 Dec 2006 16:47:28 +0000 (16:47 +0000)]
New mechanism for automatic generation of the puzzle screenshots on
the web, which I hope will also end up being extended to generate
both Windows and X icons for each individual puzzle. The mechanism
is: for each puzzle there's a save file in the `icons' subdirectory
showing a game state which I think is a decent illustration of the
puzzle, and then there's a nasty set of scripts which runs each
puzzle binary, loads that save file, grabs a screenshot using xwd,
and munges it into shape.

In order to support this I've added two new options (--redo and
--windowid) to all the GTK puzzles, which I don't expect ever to be
used outside the icons makefile. I've also added two more options
(--load and --id) which force a GTK puzzle to treat its command-line
option as a save file or as a game ID respectively (the previous
behaviour was always to guess, and sometimes it guessed wrong).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7014 cda61777-01e9-0310-a592-d414129be87e

17 years agoMinor const fix.
simon [Sun, 24 Dec 2006 16:30:45 +0000 (16:30 +0000)]
Minor const fix.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7013 cda61777-01e9-0310-a592-d414129be87e

17 years agoHTML Help support for Puzzles, with the same kind of automatic
simon [Sun, 24 Dec 2006 15:56:47 +0000 (15:56 +0000)]
HTML Help support for Puzzles, with the same kind of automatic
fallback behaviour as PuTTY's support.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7009 cda61777-01e9-0310-a592-d414129be87e

17 years agoAbility to build a .CHM for Puzzles. I haven't yet arranged for it
simon [Sat, 23 Dec 2006 08:44:51 +0000 (08:44 +0000)]
Ability to build a .CHM for Puzzles. I haven't yet arranged for it
to be used by the Windows binaries; that's the next step.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7006 cda61777-01e9-0310-a592-d414129be87e

17 years agoSmall printing fix from Gary Wong. Shows up when printing with
simon [Thu, 21 Dec 2006 17:11:56 +0000 (17:11 +0000)]
Small printing fix from Gary Wong. Shows up when printing with
solutions: the rightmost and lowermost lines of the grid never get
solution lines drawn on them.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7003 cda61777-01e9-0310-a592-d414129be87e

17 years agoFix a couple of rounding errors in Inertia's gem-drawing code which
simon [Fri, 24 Nov 2006 18:24:01 +0000 (18:24 +0000)]
Fix a couple of rounding errors in Inertia's gem-drawing code which
didn't happen to show up at the default resolution but made the gem
slightly skewed at larger sizes.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6919 cda61777-01e9-0310-a592-d414129be87e

17 years agoOptionally label the colours in Guess with letters of the alphabet.
simon [Thu, 23 Nov 2006 13:17:31 +0000 (13:17 +0000)]
Optionally label the colours in Guess with letters of the alphabet.
Labels are toggled on and off by pressing L (just like Map). Might
help colour-blind users, and might also make it easier to describe
game positions to other people because `abbc' has fewer syllables
than `red, yellow, yellow, green', and hugely fewer letters if
you're typing it.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6916 cda61777-01e9-0310-a592-d414129be87e

17 years agoPatch I've had lurking around for over a year and not remembered to
simon [Mon, 20 Nov 2006 10:20:46 +0000 (10:20 +0000)]
Patch I've had lurking around for over a year and not remembered to
commit: arrange that midend_set_timer(), hence game_timing_state(),
is called when the game_ui is changed. This allows timed games to
work by obscuring the initial layout until an initial click causes
it to be revealed, without requiring that they store that reveal
operation as a move in the undo chain. Not that any games actually
do this, but it's clearly a sensible thing to want to do: since
game_timing_state() _receives_ a game_ui as a parameter, obviously
it should be consulted when the game_ui changes.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6914 cda61777-01e9-0310-a592-d414129be87e

17 years agoJames H's Palm-compatibility updates to the latest Loopy changes,
simon [Wed, 1 Nov 2006 13:25:25 +0000 (13:25 +0000)]
James H's Palm-compatibility updates to the latest Loopy changes,
working around bugs in the Palm compiler and removing Palm-
incompatible diagnostics such as fprintf.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6889 cda61777-01e9-0310-a592-d414129be87e

17 years agoMike's changes to dsf.c alter the internal storage format of dsf
simon [Wed, 1 Nov 2006 11:31:20 +0000 (11:31 +0000)]
Mike's changes to dsf.c alter the internal storage format of dsf
structures, meaning that ad-hoc initialisation now doesn't work.
Hence, this checkin converts all ad-hoc dsf initialisations into
calls to dsf_init() or snew_dsf(). At least, I _hope_ I've caught
all of them.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6888 cda61777-01e9-0310-a592-d414129be87e

17 years agoMinimal (i.e., lame) update to Loopy documentation to match reality -- it's
jacob [Sun, 29 Oct 2006 17:40:45 +0000 (17:40 +0000)]
Minimal (i.e., lame) update to Loopy documentation to match reality -- it's
been wrong since r6299.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6884 cda61777-01e9-0310-a592-d414129be87e

17 years agoI'm sick and tired of having unfinished puzzle code lying around on
simon [Sun, 29 Oct 2006 09:41:02 +0000 (09:41 +0000)]
I'm sick and tired of having unfinished puzzle code lying around on
several different systems in strange directories. So I'm creating an
`unfinished' directory within source control, and centralising all
my half-finished, half-baked or otherwise half-arsed puzzle
implementations into it. Herewith Sokoban (playable but rubbish
generation), Pearl (Masyu - rubbish generation and nothing else),
Path (Number Link - rubbish generation and nothing else) and NumGame
(the Countdown numbers game - currently just a solver and not even a
generator yet).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6883 cda61777-01e9-0310-a592-d414129be87e

17 years agor6880 accidentally backed out r6780. That's what I get for accepting
simon [Sun, 29 Oct 2006 09:34:09 +0000 (09:34 +0000)]
r6880 accidentally backed out r6780. That's what I get for accepting
source files from Mike rather than patches, and not adequately
checking the result...

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6882 cda61777-01e9-0310-a592-d414129be87e

17 years agoAdd HTML documentation to the ignore list.
simon [Sun, 29 Oct 2006 09:17:07 +0000 (09:17 +0000)]
Add HTML documentation to the ignore list.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6881 cda61777-01e9-0310-a592-d414129be87e

17 years agoMike Pinna has done some major reworking of the Loopy solver, giving
simon [Sat, 28 Oct 2006 15:38:53 +0000 (15:38 +0000)]
Mike Pinna has done some major reworking of the Loopy solver, giving
rise to a new Hard difficulty level.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6880 cda61777-01e9-0310-a592-d414129be87e