chiark / gitweb /
sgt-puzzles.git
13 years agoPatch from Mark Wooding to add documentation of the new
Simon Tatham [Sat, 29 May 2010 15:43:52 +0000 (15:43 +0000)]
Patch from Mark Wooding to add documentation of the new
draw_thick_line function, and also add some general thoughts on how
to draw puzzles' windows in an antialiasing-friendly way.

[originally from svn r8965]

13 years agoPatch from Mark Wooding to add antialiasing-safety in repeated
Simon Tatham [Sat, 29 May 2010 15:43:50 +0000 (15:43 +0000)]
Patch from Mark Wooding to add antialiasing-safety in repeated
redrawing of inequality signs in Unequal (which are redrawn when
they change colour).

[originally from svn r8964]

13 years agoPatch from Mark Wooding to reorganise Loopy's redraw function to be
Simon Tatham [Sat, 29 May 2010 15:43:48 +0000 (15:43 +0000)]
Patch from Mark Wooding to reorganise Loopy's redraw function to be
properly antialiasing-safe: all redraws are now done by clearing a
rectangle of the image, clipping to that rectangle, and redrawing
everything in it exactly once.

[originally from svn r8963]

13 years agoPatch from Mark Wooding to introduce a draw_thick_line() function in
Simon Tatham [Sat, 29 May 2010 15:43:46 +0000 (15:43 +0000)]
Patch from Mark Wooding to introduce a draw_thick_line() function in
the drawing API, for use by Loopy. It's optional: drawing.c will
construct an acceptable alternative using a filled polygon if the
front end doesn't provide it.

Net and Netslide previously had static functions called
draw_thick_line(), whose claim to the name is less justified and so
they've been renamed.

[originally from svn r8962]

13 years agoPatch from Mark Wooding to (optionally at compile time) use the
Simon Tatham [Sat, 29 May 2010 15:43:42 +0000 (15:43 +0000)]
Patch from Mark Wooding to (optionally at compile time) use the
Cairo rendering library in place of GDK, which provides pretty
antialiased graphics much like we get on MacOS. Inertia and Untangle
are perhaps the two games most obviously improved by this.

[originally from svn r8961]

13 years agoPatch from Mark Wooding to disable GTK's internal double buffering,
Simon Tatham [Sat, 29 May 2010 15:43:41 +0000 (15:43 +0000)]
Patch from Mark Wooding to disable GTK's internal double buffering,
which I didn't know about, but which is clearly a waste of effort
since we keep our own backing pixmap for the puzzle window.

[originally from svn r8960]

13 years agoPatch from Mark Wooding to use GTK stock items for standard 'OK',
Simon Tatham [Sat, 29 May 2010 15:43:40 +0000 (15:43 +0000)]
Patch from Mark Wooding to use GTK stock items for standard 'OK',
'Yes' and 'No' buttons, which means they get the standard icons that
go on those button types. Also reorders yes/no boxes so that they're
the GNOME standard way round.

[originally from svn r8959]

13 years agoMake mkfiles.pl clean under 'perl -w'. Fixes one minor bug in the
Simon Tatham [Sat, 29 May 2010 13:44:12 +0000 (13:44 +0000)]
Make mkfiles.pl clean under 'perl -w'. Fixes one minor bug in the
output (a comment from Recipe mistakenly got into the Unix
makefile); more importantly, lets mkfiles.pl run in up-to-date Perls
(where implicit split to @_ is now obsolete).

[originally from svn r8957]

14 years agoPatch from Ben Hutchings to fix an error-checking goof: Keen
Simon Tatham [Sun, 16 May 2010 06:58:09 +0000 (06:58 +0000)]
Patch from Ben Hutchings to fix an error-checking goof: Keen
division clues were failing to light up as erroneous if the quotient
of the numbers in them came out right under rounded-down C integer
division (e.g. 2 and 5 would be accepted for a 2/ clue). Apparently
I copied the code that invents clues in the generator straight into
the solution checker, without remembering that the generator was
allowed to do it that way because exact divisibility had been
checked elsewhere.

[originally from svn r8951]

14 years agoA user points out that Signpost doesn't in fact use the numeric
Simon Tatham [Sun, 9 May 2010 07:22:16 +0000 (07:22 +0000)]
A user points out that Signpost doesn't in fact use the numeric
keypad, so it shouldn't have the REQUIRE_NUMPAD flag.

[originally from svn r8939]

14 years agoFix a build-breaking bug I introduced to the OS X makefile in r8931.
Simon Tatham [Mon, 26 Apr 2010 17:26:38 +0000 (17:26 +0000)]
Fix a build-breaking bug I introduced to the OS X makefile in r8931.
(Missed off the explicit -o from the compile lines constructing
version.{i386,ppc}.o, causing both to be compiled as version.o and
dependent build steps to fail.)

[originally from svn r8933]
[r8931 == 36cee4e2796c23da15d3276e88416ad1ce035c4a]

14 years agoModification of a patch from Debian: eliminate the endless rebuilds
Simon Tatham [Sun, 25 Apr 2010 14:57:21 +0000 (14:57 +0000)]
Modification of a patch from Debian: eliminate the endless rebuilds
of basically unchanged binaries due to the compulsory rebuild of
version.o. version.o now depends normally on version2.def, which is
constructed using much the same if statements that version.o used to
use, except that it's not overwritten at all if its contents don't
need to change.

[originally from svn r8931]

14 years agoPatch idea from Debian, but modified considerably in implementation:
Simon Tatham [Sun, 25 Apr 2010 14:57:20 +0000 (14:57 +0000)]
Patch idea from Debian, but modified considerably in implementation:
introduce a new colour in Slant (COL_FILLEDSQUARE) which is used for
the background of any grid square that has a diagonal line in it.
This makes it easier to spot the one square on a giant board you
forgot to fill in, but on the other hand I found it to look very
strange and disconcerting. So I've set the colour to be identical to
COL_BACKGROUND by default, and users who like the idea can enable it
by environment variable or by local patch.

[originally from svn r8930]

14 years agoPatch from Debian, to bring the use of the X selection/clipboard in
Simon Tatham [Sun, 25 Apr 2010 14:57:19 +0000 (14:57 +0000)]
Patch from Debian, to bring the use of the X selection/clipboard in
line with freedesktop.org. (This is relatively simple for Puzzles,
since it only writes to the clipboard and never reads it, so the
question of which selection to use when is most easily dealt with by
always writing to both.)

[originally from svn r8929]

14 years agoWording tweaks inspired by (but not the same as) some in a Debian
Simon Tatham [Sun, 18 Apr 2010 15:07:54 +0000 (15:07 +0000)]
Wording tweaks inspired by (but not the same as) some in a Debian
downstream patch.

[originally from svn r8924]

14 years agoPatch from Ben Hutchings: explicitly initialise something which some
Simon Tatham [Sun, 18 Apr 2010 15:07:52 +0000 (15:07 +0000)]
Patch from Ben Hutchings: explicitly initialise something which some
gccs complained about.

[originally from svn r8923]

14 years agoFix incorrect uses of ctype.h (passing it uncast chars, or other
Simon Tatham [Sat, 17 Apr 2010 13:27:15 +0000 (13:27 +0000)]
Fix incorrect uses of ctype.h (passing it uncast chars, or other
things potentially not in the range 0..255).

[originally from svn r8922]

14 years agoFix from James H for an assertion failure during Signpost
Simon Tatham [Sat, 17 Apr 2010 13:27:12 +0000 (13:27 +0000)]
Fix from James H for an assertion failure during Signpost
generation. To reproduce, try 'signpost --generate 1 7x7#12345-162'.

[originally from svn r8921]

14 years agoAdd '-v' option to patternsolver, to make it show its working.
Simon Tatham [Fri, 2 Apr 2010 10:20:58 +0000 (10:20 +0000)]
Add '-v' option to patternsolver, to make it show its working.

[originally from svn r8914]

14 years agoDylan O'Donnell reports that Signpost hangs on trying to generate a
Simon Tatham [Fri, 2 Apr 2010 07:21:34 +0000 (07:21 +0000)]
Dylan O'Donnell reports that Signpost hangs on trying to generate a
2x2 puzzle. Rule it out in validate_params().

[originally from svn r8913]

14 years agoChris Boyle reports an off-by-two error ('a Qui-Gon Jinx' :-) in
Simon Tatham [Sun, 21 Mar 2010 14:30:49 +0000 (14:30 +0000)]
Chris Boyle reports an off-by-two error ('a Qui-Gon Jinx' :-) in
difficulty selection in Unequal's solver. I suspect I missed this
when I refactored latin.c and its callers.

[originally from svn r8906]

14 years agoError highlighting bug in Bridges: when counting the number of extra
Simon Tatham [Sun, 21 Mar 2010 08:48:29 +0000 (08:48 +0000)]
Error highlighting bug in Bridges: when counting the number of extra
bridges that could go to an island, the game was not correctly
accounting for existing bridges in all circumstances.

(E.g. in 7x7m2:2a6a2a1g4a6c4i1a1h23c2b, connect the top right 1 to
the 2 left of it, and the 6 left of that correctly lights up red.
But now connect the 6 to the 6 below it, and it wrongly unlights
again.)

[originally from svn r8905]

14 years agoAnother w/h transposition typo.
Simon Tatham [Wed, 24 Feb 2010 19:30:03 +0000 (19:30 +0000)]
Another w/h transposition typo.

[originally from svn r8887]

14 years agoTypo affecting gameplay on grids wider than they are tall. (Clicking
Simon Tatham [Wed, 24 Feb 2010 18:06:59 +0000 (18:06 +0000)]
Typo affecting gameplay on grids wider than they are tall. (Clicking
in columns with x > h was being erroneously rejected.)

[originally from svn r8886]

14 years agoFixes from James H to the numbering of squares, in particular:
Simon Tatham [Mon, 22 Feb 2010 23:14:46 +0000 (23:14 +0000)]
Fixes from James H to the numbering of squares, in particular:
 - sometimes two regions would get the same letter
 - immutable numbers could sometimes be modified
 - immutable numbers are now not flagged as errors when they clash
   (same as Solo's policy)

[originally from svn r8882]

14 years agoFix build failure on MacOS by initialising a variable which was
Simon Tatham [Thu, 18 Feb 2010 18:12:12 +0000 (18:12 +0000)]
Fix build failure on MacOS by initialising a variable which was
reported as potentially-unused. (In fact, as far as I can tell, it's
only ever uninitialised in assertion-failing code paths, so not a
real bug.)

[originally from svn r8873]

14 years agoA proper fix from James H for the negative number issue: the
Simon Tatham [Wed, 17 Feb 2010 19:15:04 +0000 (19:15 +0000)]
A proper fix from James H for the negative number issue: the
assertion I crudely commented out has now been replaced with code
that clearly shows what you did wrong in the failing situation.

[originally from svn r8872]

14 years agoTypo fix (from Debian).
Jacob Nevins [Wed, 17 Feb 2010 02:37:40 +0000 (02:37 +0000)]
Typo fix (from Debian).

[originally from svn r8869]

14 years agoCapitalisation glitch.
Simon Tatham [Tue, 16 Feb 2010 21:49:17 +0000 (21:49 +0000)]
Capitalisation glitch.

[originally from svn r8868]

14 years ago'Fix' an assertion failure during play: accidentally connecting a
Simon Tatham [Tue, 16 Feb 2010 15:13:28 +0000 (15:13 +0000)]
'Fix' an assertion failure during play: accidentally connecting a
long chain to a square numbered so low that the start of the chain
would have to go into negative numbers should not crash the game,
particularly when it happens as a momentary in-passing illustration.

I've fixed it for the moment just by removing the assertion. There's
probably a better fix which causes something less strange to happen
to the display as a result.

[originally from svn r8867]

14 years agoDocs and comments fixes from James H.
Simon Tatham [Tue, 16 Feb 2010 10:48:25 +0000 (10:48 +0000)]
Docs and comments fixes from James H.

[originally from svn r8866]

14 years agoUpdates to the new-puzzle checklist, since the world has moved on.
Simon Tatham [Mon, 15 Feb 2010 21:31:58 +0000 (21:31 +0000)]
Updates to the new-puzzle checklist, since the world has moved on.

[originally from svn r8865]

14 years agoNew puzzle! Setting what might be a record for how long we've sat on
Simon Tatham [Mon, 15 Feb 2010 21:09:09 +0000 (21:09 +0000)]
New puzzle! Setting what might be a record for how long we've sat on
a puzzle before it was ready to commit, here is 'Signpost': a clone
of janko.at's "Arrow Path", by James Harvey.

[originally from svn r8861]

14 years agoPatch inspired by one from James H: remove spurious references to
Simon Tatham [Tue, 19 Jan 2010 00:56:37 +0000 (00:56 +0000)]
Patch inspired by one from James H: remove spurious references to
$mw (it should only ever have been used in the Cygwin makefile), and
move the libraries to the end of the link line in the Unix makefile
for better portability.

[originally from svn r8853]

14 years agoFix from James H: the shared code between drawing and printing
Simon Tatham [Mon, 18 Jan 2010 21:23:27 +0000 (21:23 +0000)]
Fix from James H: the shared code between drawing and printing
should use state->adjacent rather than ds->adjacent, because the
latter won't be initialised in printing mode.

[originally from svn r8852]

14 years agoFix from James H: in printing mode, the shared code between drawing
Simon Tatham [Mon, 18 Jan 2010 21:23:26 +0000 (21:23 +0000)]
Fix from James H: in printing mode, the shared code between drawing
and printing must avoid referring to stuff in the game_drawstate,
since the game_drawstate isn't a real one.

[originally from svn r8851]

14 years agoMemory leak fix from James H.
Simon Tatham [Mon, 18 Jan 2010 21:23:25 +0000 (21:23 +0000)]
Memory leak fix from James H.

[originally from svn r8850]

14 years agoPatch from James H to fix a bug in which ambiguous puzzles would
Simon Tatham [Sun, 17 Jan 2010 01:05:55 +0000 (01:05 +0000)]
Patch from James H to fix a bug in which ambiguous puzzles would
occasionally be generated, e.g. by 8x8de#417341658689473 .

[originally from svn r8845]

14 years agoTypo/formatting fixes for Magnets documentation.
Jacob Nevins [Sat, 16 Jan 2010 13:03:36 +0000 (13:03 +0000)]
Typo/formatting fixes for Magnets documentation.

[originally from svn r8844]

14 years agoHighlight the sides as well as the top of a tower when it's
Simon Tatham [Sat, 16 Jan 2010 12:38:15 +0000 (12:38 +0000)]
Highlight the sides as well as the top of a tower when it's
selected. I think this is a more or less aesthetically neutral
change for the actual selection, but the selection code is reused to
draw the victory flash and that's greatly improved by not having the
tower sides remain unflashed.

[originally from svn r8843]

14 years agoDon't use payload strings directly as the format for printf.
Simon Tatham [Wed, 13 Jan 2010 19:25:57 +0000 (19:25 +0000)]
Don't use payload strings directly as the format for printf.

[originally from svn r8839]

14 years agoPlacate optimiser.
Simon Tatham [Wed, 13 Jan 2010 19:25:56 +0000 (19:25 +0000)]
Placate optimiser.

[originally from svn r8838]

14 years agoNew puzzle from James H: 'Magnets'.
Simon Tatham [Wed, 13 Jan 2010 19:12:32 +0000 (19:12 +0000)]
New puzzle from James H: 'Magnets'.

[originally from svn r8836]

14 years agoCouple of small changes to Singles from James H which missed my main
Simon Tatham [Tue, 12 Jan 2010 23:32:23 +0000 (23:32 +0000)]
Couple of small changes to Singles from James H which missed my main
commit: tweak the grid generation a bit, and fix the use of the
Solve function on a grid containing errors.

[originally from svn r8835]

14 years agoPatch from James H: make the Windows debugging output conditional on
Simon Tatham [Tue, 12 Jan 2010 23:32:22 +0000 (23:32 +0000)]
Patch from James H: make the Windows debugging output conditional on
an enabling environment variable.

[originally from svn r8834]

14 years agoAdd a couple more checks to the 3d collision detection, without
Simon Tatham [Tue, 12 Jan 2010 18:34:06 +0000 (18:34 +0000)]
Add a couple more checks to the 3d collision detection, without
which a click miles above the invisible RH surface of a tower would
sometimes select that tower.

[originally from svn r8833]

14 years agoCorrections to Singles documentation, plus index terms.
Jacob Nevins [Mon, 11 Jan 2010 22:46:02 +0000 (22:46 +0000)]
Corrections to Singles documentation, plus index terms.

[originally from svn r8832]

14 years agoMisspelled keyword.
Simon Tatham [Mon, 11 Jan 2010 21:27:37 +0000 (21:27 +0000)]
Misspelled keyword.

[originally from svn r8830]

14 years agoNew puzzle from James Harvey: 'Singles', an implementation of
Simon Tatham [Mon, 11 Jan 2010 21:21:07 +0000 (21:21 +0000)]
New puzzle from James Harvey: 'Singles', an implementation of
Hitori. One infrastructure change in the process: latin.c has
acquired a utility function to generate a latin rectangle rather
than a full square.

[originally from svn r8828]

14 years agoRetire the YTRANS and YUNTRANS macros in latin.[ch]. They were
Simon Tatham [Mon, 11 Jan 2010 20:32:55 +0000 (20:32 +0000)]
Retire the YTRANS and YUNTRANS macros in latin.[ch]. They were
introduced to mimic similar macros in solo.c, in case Solo ever
moved over to being based on the latin.c solver framework; but even
Solo has long since lost those macros, so latin.c has no need to
keep them.

[originally from svn r8827]

14 years agoThe 3-D graphics in Towers need a corresponding change on the input
Simon Tatham [Mon, 11 Jan 2010 18:41:29 +0000 (18:41 +0000)]
The 3-D graphics in Towers need a corresponding change on the input
side: instead of locating a mouse click in whichever base grid
square contained the click location, we should check to see if a
tower protrudes on to that location from a neighbouring square. That
way, a click should reliably activate the tower that was actually
drawn under the mouse pointer.

[originally from svn r8826]

14 years agoOops! Remove evidence of blatant clone-and-hack from Keen. :-)
Simon Tatham [Mon, 11 Jan 2010 18:41:28 +0000 (18:41 +0000)]
Oops! Remove evidence of blatant clone-and-hack from Keen. :-)

[originally from svn r8825]

14 years agoOops. Uncomment the difficulty exceptions! (Also add another
Simon Tatham [Sat, 9 Jan 2010 17:21:36 +0000 (17:21 +0000)]
Oops. Uncomment the difficulty exceptions! (Also add another
constraint in validate_params.)

[originally from svn r8824]

14 years agoNew year, new puzzle.
Jacob Nevins [Fri, 8 Jan 2010 12:25:44 +0000 (12:25 +0000)]
New year, new puzzle.

[originally from svn r8823]

14 years agoFix formatting.
Jacob Nevins [Thu, 7 Jan 2010 20:50:49 +0000 (20:50 +0000)]
Fix formatting.

[originally from svn r8822]

14 years agoCrop the Towers icon more sensibly (i.e. at all).
Simon Tatham [Thu, 7 Jan 2010 19:09:58 +0000 (19:09 +0000)]
Crop the Towers icon more sensibly (i.e. at all).

[originally from svn r8821]

14 years agoUpgrade the graphics in Towers to include a thematically appropriate
Simon Tatham [Thu, 7 Jan 2010 18:42:01 +0000 (18:42 +0000)]
Upgrade the graphics in Towers to include a thematically appropriate
3D effect. (I only committed it without so that I could preserve a
record of how the code looked before I added it.) The 3D effect can
be disabled by setting TOWERS_2D in the environment, should anybody
seriously dislike it.

[originally from svn r8817]

14 years agoNew puzzle, again using the revised latin.c: 'Towers', a clone of a
Simon Tatham [Thu, 7 Jan 2010 18:42:00 +0000 (18:42 +0000)]
New puzzle, again using the revised latin.c: 'Towers', a clone of a
latin-square puzzle which I've seen described by several names but
the most common is 'Skyscrapers'.

[originally from svn r8816]

14 years agoMemory leak fix from James H.
Simon Tatham [Thu, 7 Jan 2010 18:15:09 +0000 (18:15 +0000)]
Memory leak fix from James H.

[originally from svn r8815]

14 years agoProof that check_errors() is sufficient.
Simon Tatham [Tue, 5 Jan 2010 23:40:42 +0000 (23:40 +0000)]
Proof that check_errors() is sufficient.

[originally from svn r8813]

14 years agoRefer to group elements by letters instead of numbers, in keeping
Simon Tatham [Tue, 5 Jan 2010 23:40:41 +0000 (23:40 +0000)]
Refer to group elements by letters instead of numbers, in keeping
with usual abstract group notation. In puzzles with a clear
identity, it's called e.

[originally from svn r8812]

14 years agoAdd a facility in the latin.c solver diagnostics to allow a puzzle
Simon Tatham [Tue, 5 Jan 2010 23:40:40 +0000 (23:40 +0000)]
Add a facility in the latin.c solver diagnostics to allow a puzzle
to call the digit values by custom names.

[originally from svn r8811]

14 years agoAdd an even more evil (!) game mode, in which it's not made
Simon Tatham [Tue, 5 Jan 2010 19:52:52 +0000 (19:52 +0000)]
Add an even more evil (!) game mode, in which it's not made
immediately obvious which element of the group is the identity - at
least two elements including the identity have their rows and
columns completely blanked.

[originally from svn r8810]

14 years agoYikes! Fix a misaimed 'sizeof' which I only got away with because
Simon Tatham [Tue, 5 Jan 2010 18:51:42 +0000 (18:51 +0000)]
Yikes! Fix a misaimed 'sizeof' which I only got away with because
ints and pointers are usually the same size.

[originally from svn r8809]

14 years agoA user asked for the < signs in Unequal to be bolder.
Simon Tatham [Tue, 5 Jan 2010 18:26:55 +0000 (18:26 +0000)]
A user asked for the < signs in Unequal to be bolder.

[originally from svn r8808]

14 years agoMissing piece of code I should have cribbed from Solo: we have to
Simon Tatham [Tue, 5 Jan 2010 18:26:44 +0000 (18:26 +0000)]
Missing piece of code I should have cribbed from Solo: we have to
lay out large numbers of pencil marks differently in a square
containing a clue.

[originally from svn r8807]

14 years agoAnother 16-bit-cleanliness fix (and for once I spotted it before James!)
Simon Tatham [Tue, 5 Jan 2010 18:26:42 +0000 (18:26 +0000)]
Another 16-bit-cleanliness fix (and for once I spotted it before James!)

[originally from svn r8806]

14 years agoMemory leak fix from Tiago Dionizio: whenever we free the midend's
Simon Tatham [Mon, 4 Jan 2010 19:14:35 +0000 (19:14 +0000)]
Memory leak fix from Tiago Dionizio: whenever we free the midend's
collection of game states, we should also free the move strings from
which they were constructed.

[originally from svn r8805]

14 years ago16-bit cleanliness patch from James H.
Simon Tatham [Mon, 4 Jan 2010 18:55:56 +0000 (18:55 +0000)]
16-bit cleanliness patch from James H.

[originally from svn r8803]

14 years agoFor my own use in local Windows builds of the 'unfinished' puzzles,
Simon Tatham [Fri, 1 Jan 2010 20:06:34 +0000 (20:06 +0000)]
For my own use in local Windows builds of the 'unfinished' puzzles,
add an include directory to the Windows makefile so that source
files in subdirectories can find the main headers.

[originally from svn r8802]

14 years agoCouple of missing 'static's.
Simon Tatham [Fri, 1 Jan 2010 19:41:59 +0000 (19:41 +0000)]
Couple of missing 'static's.

[originally from svn r8801]

14 years agoNew puzzle in 'unfinished'. Essentially, Sudoku for group theorists:
Simon Tatham [Wed, 30 Dec 2009 16:53:36 +0000 (16:53 +0000)]
New puzzle in 'unfinished'. Essentially, Sudoku for group theorists:
you are given a partially specified Cayley table of a small finite
group, and must fill in all the missing entries using both Sudoku-
style deductions (minus the square block constraint) and the group
axioms. I've just thrown it together in about five hours by cloning-
and-hacking from Keen, as much as anything else to demonstrate that
the new latin.c interface really does make it extremely easy to
write new Latin square puzzles.

It's not really _unfinished_, as such, but it is just too esoteric
(not to mention difficult) for me to feel entirely comfortable with
adding it to the main puzzle collection. I can't bring myself to
throw it away, though, and who knows - perhaps a university maths
department might find it a useful teaching tool :-)

[originally from svn r8800]

14 years agoFix bug causing array overrun. Only seemed to be showing a symptom
Simon Tatham [Sun, 27 Dec 2009 19:18:22 +0000 (19:18 +0000)]
Fix bug causing array overrun. Only seemed to be showing a symptom
on Windows, presumably because the data after the array was harmless
elsewhere.

[originally from svn r8798]

14 years agoNew puzzle! 'Keen', a clone of KenKen.
Simon Tatham [Sun, 27 Dec 2009 10:01:23 +0000 (10:01 +0000)]
New puzzle! 'Keen', a clone of KenKen.

[originally from svn r8796]

14 years agoNormalise Unequal (and latin.c) so that solver diagnostics start
Simon Tatham [Sun, 27 Dec 2009 10:01:20 +0000 (10:01 +0000)]
Normalise Unequal (and latin.c) so that solver diagnostics start
their coordinate from 1 rather than 0, for consistency with Solo.
(My geek instincts would rather work from 0, but I've generally
found that puzzle users sending me email tend to prefer 1.)

[originally from svn r8795]

14 years agoI've never trusted common variables. Take those bare ints out of
Simon Tatham [Sun, 27 Dec 2009 10:01:18 +0000 (10:01 +0000)]
I've never trusted common variables. Take those bare ints out of
latin.h and put them in latin.c with 'extern' declarations in the
header.

[originally from svn r8794]

14 years agoIntroduce, and implement as usefully as I can in all front ends, a
Simon Tatham [Sun, 27 Dec 2009 10:01:16 +0000 (10:01 +0000)]
Introduce, and implement as usefully as I can in all front ends, a
new function in the drawing API which permits the display of text
from outside basic ASCII. A fallback mechanism is provided so that
puzzles can give a list of strings they'd like to display in order
of preference and the system will return the best one it can manage;
puzzles are required to cope with ASCII-only front ends.

[originally from svn r8793]

14 years agoTweak the semantics of dsf_merge() so that the canonical element of
Simon Tatham [Sun, 27 Dec 2009 10:01:11 +0000 (10:01 +0000)]
Tweak the semantics of dsf_merge() so that the canonical element of
any equivalence class is always the element with the smallest index.
This is slower (the previous behaviour, suggested by Jonas Koelker,
was to choose the new root element to maximise performance), but
still more than acceptably fast and more useful.

[originally from svn r8792]

14 years agoRefactor latin.c to make it easier to reuse. Instead of client
Simon Tatham [Sun, 27 Dec 2009 10:01:10 +0000 (10:01 +0000)]
Refactor latin.c to make it easier to reuse. Instead of client
programs having to clone the latin_solver() function and insert
their own extra deduction routines, they can now just _call_
latin_solver with enough parameters to let it fit its own deductions
into their difficulty framework and call a set of provided function
pointers to do user deductions. Modified Unequal to work in the new
world, of course.

[originally from svn r8791]

14 years agoNew mode for Unequal, from James H. In this mode, called 'Adjacent',
Simon Tatham [Sun, 27 Dec 2009 10:01:09 +0000 (10:01 +0000)]
New mode for Unequal, from James H. In this mode, called 'Adjacent',
the < and > clues are replaced by bars separating every pair of
squares whose contents differ by exactly 1. Unlike standard Unequal,
which presents only a subset of the available clues, in Adjacent the
clues are _all_ present, so you can deduce from the absence of a bar
that the two numbers it would separate are _not_ consecutive.

[originally from svn r8790]

14 years agolatin_generate_quick is long gone, so remove it from the header file.
Simon Tatham [Wed, 23 Dec 2009 11:34:25 +0000 (11:34 +0000)]
latin_generate_quick is long gone, so remove it from the header file.

[originally from svn r8789]

14 years agoKeyboard control for Dominosa (patch largely due to James H, though
Simon Tatham [Tue, 22 Dec 2009 16:47:42 +0000 (16:47 +0000)]
Keyboard control for Dominosa (patch largely due to James H, though
with considerable meddling from me).

[originally from svn r8788]

14 years agoJonas Koelker points out that the backspace key didn't work in GTK
Simon Tatham [Sun, 20 Dec 2009 10:01:57 +0000 (10:01 +0000)]
Jonas Koelker points out that the backspace key didn't work in GTK
Guess, because Guess expected ^H whereas GTK generated ^?. Other
puzzles that use Backspace do it by being prepared to see either,
which seems wasteful. Now the midend normalises both into ^H, so
front ends can generate whichever they like while puzzles can
safely just look for ^H.

[originally from svn r8786]

14 years agoMinor bug fixes from James Harvey.
Simon Tatham [Thu, 17 Dec 2009 18:20:32 +0000 (18:20 +0000)]
Minor bug fixes from James Harvey.

[originally from svn r8785]

14 years agoPatches from Frode Austvik to modify the effects of the mouse
Simon Tatham [Thu, 17 Dec 2009 18:16:42 +0000 (18:16 +0000)]
Patches from Frode Austvik to modify the effects of the mouse
buttons in several games if STYLUS_BASED is defined: in games where
you can set a puzzle element to 'on', 'off' or 'not yet set', when
it's hard to mimic a second mouse button, it's better to have the
one 'button' cycle between all three states rather than from 'on'
back to 'unset'.

[originally from svn r8784]

14 years agoPatch from Frode Austvik to tinker with the GTK interface if
Simon Tatham [Thu, 17 Dec 2009 18:12:18 +0000 (18:12 +0000)]
Patch from Frode Austvik to tinker with the GTK interface if
compiling gtk.c with STYLUS_BASED defined: most notably, it provides
a row of numeric 'keys' made of GTK button widgets for puzzles that
want a numeric keypad.

[originally from svn r8783]

14 years agoPatch from Frode Austvik to permit passing CFLAGS in to the Unix
Simon Tatham [Thu, 17 Dec 2009 17:55:42 +0000 (17:55 +0000)]
Patch from Frode Austvik to permit passing CFLAGS in to the Unix
makefile.

[originally from svn r8782]

14 years agoAnother wording tweak from Helge Kreutzmann.
Jacob Nevins [Sun, 13 Dec 2009 12:47:10 +0000 (12:47 +0000)]
Another wording tweak from Helge Kreutzmann.

[originally from svn r8780]

14 years agoFix for the grid generation in the presence of particularly strange
Simon Tatham [Mon, 16 Nov 2009 21:21:00 +0000 (21:21 +0000)]
Fix for the grid generation in the presence of particularly strange
grid types.

[originally from svn r8750]

14 years agoAdd a precautionary pair of initialisations to placate optimisers,
Simon Tatham [Tue, 10 Nov 2009 19:11:03 +0000 (19:11 +0000)]
Add a precautionary pair of initialisations to placate optimisers,
and asserts to check that the preinitialised values are never
actually used.

[originally from svn r8745]

14 years agoRemove ASCII-art arrows. Missing \dash (Debian bug #522439).
Jacob Nevins [Thu, 5 Nov 2009 14:09:04 +0000 (14:09 +0000)]
Remove ASCII-art arrows. Missing \dash (Debian bug #522439).

[originally from svn r8736]

14 years agoBeat up on Black Box docs, after Debian bug #548472.
Jacob Nevins [Wed, 4 Nov 2009 13:19:39 +0000 (13:19 +0000)]
Beat up on Black Box docs, after Debian bug #548472.

[originally from svn r8735]

14 years agoTypo fixes from Debian bug#554341.
Jacob Nevins [Wed, 4 Nov 2009 12:06:32 +0000 (12:06 +0000)]
Typo fixes from Debian bug#554341.

[originally from svn r8734]

14 years agoSingle mouse clicks to toggle individual grid edges stopped working
Simon Tatham [Tue, 13 Oct 2009 17:09:42 +0000 (17:09 +0000)]
Single mouse clicks to toggle individual grid edges stopped working
in r8414 as a side effect of reorganisation in interpret_move().
Reinstate them.

[originally from svn r8692]
[r8414 == 54801998744a69786a49ebe0688942ae7b57525b]

14 years agoAdd a couple of missing checks in validate_desc(), without which
Simon Tatham [Wed, 16 Sep 2009 12:57:07 +0000 (12:57 +0000)]
Add a couple of missing checks in validate_desc(), without which
bogus game IDs were getting as far as new_game() and failing
assertions.

[originally from svn r8655]

14 years agoMinor rewording and typo-correction.
Simon Tatham [Wed, 16 Sep 2009 11:06:02 +0000 (11:06 +0000)]
Minor rewording and typo-correction.

[originally from svn r8654]

14 years agoAha, I've managed to prove that my inadequate error highlighting is
Simon Tatham [Wed, 16 Sep 2009 10:57:11 +0000 (10:57 +0000)]
Aha, I've managed to prove that my inadequate error highlighting is
actually just about adequate after all. Large comment added
containing some discussion and the proof.

[originally from svn r8653]

14 years agoError-highlighted trees look nicer with a different-coloured trunk.
Simon Tatham [Sun, 13 Sep 2009 14:43:21 +0000 (14:43 +0000)]
Error-highlighted trees look nicer with a different-coloured trunk.
Also added a comment worrying about the universality of my error
highlighting mechanism.

[originally from svn r8647]

14 years agoRedo Mines and Inertia's mine graphics using an actual circle rather
Simon Tatham [Sun, 13 Sep 2009 13:08:34 +0000 (13:08 +0000)]
Redo Mines and Inertia's mine graphics using an actual circle rather
than an approximating octagon, to improve the look when zoomed to
high resolution.

[originally from svn r8646]

14 years agoTweak to the promptness of error highlighting display.
Simon Tatham [Sat, 12 Sep 2009 12:54:49 +0000 (12:54 +0000)]
Tweak to the promptness of error highlighting display.

[originally from svn r8645]