895 Commits

Author SHA1 Message Date
d14999949c New puzzle from Jonas Koelker: 'Range', an implementation of the
puzzle variously known (depending on which website you look at) as
Kurodoko, Kuromasu or 'Where is Black Cells'.

[originally from svn r8996]
2010-09-14 09:31:52 +00:00
b96a99042b Patch from Jonas Koelker to fix a double free in magnetssolver.
[originally from svn r8972]
2010-07-04 22:57:05 +00:00
795ef3c137 Some minor fixes to the unfinished Pearl solver:
- move critical correctness checks out of diagnostic ifdefs (ahem)
 - move declarations to before conditionally compiled code (we don't
   build in C99 mode round here)
 - tidy up an unsightly blank line while I'm here.

[originally from svn r8969]
2010-06-27 11:17:27 +00:00
3dc6adba5e Some kernels don't like my #! line. Move the -w into a 'use
warnings;' to make it simpler.

[originally from svn r8966]
2010-05-30 22:48:31 +00:00
d5c848b92f 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]
2010-05-29 15:43:52 +00:00
8589cb3a0c 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]
2010-05-29 15:43:50 +00:00
4b0a8c03a6 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]
2010-05-29 15:43:48 +00:00
9cd182ffa9 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]
2010-05-29 15:43:46 +00:00
ef6e78c6ac 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]
2010-05-29 15:43:42 +00:00
9ce82b0feb 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]
2010-05-29 15:43:41 +00:00
d040a921ba 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]
2010-05-29 15:43:40 +00:00
0a4c832e9b 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]
2010-05-29 13:44:12 +00:00
19fa275b6a 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]
2010-05-16 06:58:09 +00:00
c539872613 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]
2010-05-09 07:22:16 +00:00
177f4c1974 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]
2010-04-26 17:26:38 +00:00
36cee4e279 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]
2010-04-25 14:57:21 +00:00
178f87a79e 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]
2010-04-25 14:57:20 +00:00
5062bee2ec 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]
2010-04-25 14:57:19 +00:00
68bc396b7b Wording tweaks inspired by (but not the same as) some in a Debian
downstream patch.

[originally from svn r8924]
2010-04-18 15:07:54 +00:00
b7e0d854fe Patch from Ben Hutchings: explicitly initialise something which some
gccs complained about.

[originally from svn r8923]
2010-04-18 15:07:52 +00:00
0a9b0a7384 Fix incorrect uses of ctype.h (passing it uncast chars, or other
things potentially not in the range 0..255).

[originally from svn r8922]
2010-04-17 13:27:15 +00:00
945d8f0a3a Fix from James H for an assertion failure during Signpost
generation. To reproduce, try 'signpost --generate 1 7x7#12345-162'.

[originally from svn r8921]
2010-04-17 13:27:12 +00:00
c0f8b08833 Add '-v' option to patternsolver, to make it show its working.
[originally from svn r8914]
2010-04-02 10:20:58 +00:00
8e74bbae6b Dylan O'Donnell reports that Signpost hangs on trying to generate a
2x2 puzzle. Rule it out in validate_params().

[originally from svn r8913]
2010-04-02 07:21:34 +00:00
50b6e0d708 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]
2010-03-21 14:30:49 +00:00
5627dc4049 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]
2010-03-21 08:48:29 +00:00
d437253eca Another w/h transposition typo.
[originally from svn r8887]
2010-02-24 19:30:03 +00:00
b4ca687c02 Typo affecting gameplay on grids wider than they are tall. (Clicking
in columns with x > h was being erroneously rejected.)

[originally from svn r8886]
2010-02-24 18:06:59 +00:00
66aef80d62 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]
2010-02-22 23:14:46 +00:00
d54bbdadee 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]
2010-02-18 18:12:12 +00:00
7011d13ae7 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]
2010-02-17 19:15:04 +00:00
fabfc2caed Typo fix (from Debian).
[originally from svn r8869]
2010-02-17 02:37:40 +00:00
4a1ea06f49 Capitalisation glitch.
[originally from svn r8868]
2010-02-16 21:49:17 +00:00
2887a1da69 '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]
2010-02-16 15:13:28 +00:00
b39f9dfb99 Docs and comments fixes from James H.
[originally from svn r8866]
2010-02-16 10:48:25 +00:00
1fa6d1b7f1 Updates to the new-puzzle checklist, since the world has moved on.
[originally from svn r8865]
2010-02-15 21:31:58 +00:00
7e4f870f6d 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]
2010-02-15 21:09:09 +00:00
b0ad387d05 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]
2010-01-19 00:56:37 +00:00
f55dc67f43 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]
2010-01-18 21:23:27 +00:00
9f96c12e9f 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]
2010-01-18 21:23:26 +00:00
3c6280ef8b Memory leak fix from James H.
[originally from svn r8850]
2010-01-18 21:23:25 +00:00
6b650f894c 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]
2010-01-17 01:05:55 +00:00
6d5493300f Typo/formatting fixes for Magnets documentation.
[originally from svn r8844]
2010-01-16 13:03:36 +00:00
4a9961a572 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]
2010-01-16 12:38:15 +00:00
854f4b2386 Don't use payload strings directly as the format for printf.
[originally from svn r8839]
2010-01-13 19:25:57 +00:00
65b37d5dd5 Placate optimiser.
[originally from svn r8838]
2010-01-13 19:25:56 +00:00
0d0619868d New puzzle from James H: 'Magnets'.
[originally from svn r8836]
2010-01-13 19:12:32 +00:00
deb5e1e5b4 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]
2010-01-12 23:32:23 +00:00
b3af872f3c Patch from James H: make the Windows debugging output conditional on
an enabling environment variable.

[originally from svn r8834]
2010-01-12 23:32:22 +00:00
7aefa1110a 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]
2010-01-12 18:34:06 +00:00