908 Commits

Author SHA1 Message Date
53f6e4c6cb Patch from Chris Moore to implement an extra grid type, the 'floret'
pentagonal tiling.

[originally from svn r9107]
2011-02-23 20:05:42 +00:00
1a628aebd8 Patch from Chris Moore to improve the generality of
grid_nearest_edge(), by having it search harder for a better dot to
move to in the first loop.

[originally from svn r9106]
2011-02-23 20:05:40 +00:00
b2e4437d5b Another UI feature for Group: now you can click between two legend
elements to toggle thick lines in the grid. Helps to delineate
subgroups and cosets, so it's easier to remember what you can
legitimately fill in by associativity.

(I should really stop fiddling with this game's UI; it's far too silly.)

[originally from svn r9084]
2011-02-08 22:13:18 +00:00
fd98870bff The printing function in Bridges was unable to cope with more than two
bridges between a pair of islands! Good grief. How did we never spot
that before?

[originally from svn r9083]
2011-02-03 19:49:19 +00:00
540716194d Fix error highlighting after table rearrangement.
[originally from svn r9076]
2011-01-09 11:30:09 +00:00
48f6bfa474 Add the ability to reorder the rows and columns in Group. It becomes
much easier to keep track of things if, once you've identified a
cyclic subgroup, you can move it into a contiguous correctly ordered
block.

[originally from svn r9075]
2011-01-08 15:53:25 +00:00
f9eca22196 Introduce a mechanism in Buildscr for optionally building some of the
(more finished) puzzles in 'unfinished', as Java applets only. (The
rationale being: puzzles in 'unfinished' can be played locally by
people who go to the extra effort of downloading and building the
source, but to play them in Java is particularly inconvenient unless I
build the Java version myself. I just won't link it from the front
page.)

[originally from svn r9073]
2011-01-06 18:37:05 +00:00
cca76ce6dc Also, it's ugly to blank out pieces of the applet window in black.
Use the puzzle background colour, like the GTK front end does.

(I know that renders the effect of the previous commit invisible,
but it's the principle of the thing! :-)

[originally from svn r9023]
2010-11-06 18:14:42 +00:00
9cfc61c5f7 In the Java front end, don't try to guess the puzzle rectangle's
width and height by assuming mirror symmetry within the containing
applet area. Instead, use the proper width and height as given back
by the C sizing function.

(In particular, this fixes a bug where the non-blanked puzzle area
appeared too tall by the height of the menu bar, probably as a
result of confusing PuzzleApplet.getHeight() with
PuzzlePanel.getHeight(). But the mirroring approach was conceptually
wrong anyway.)

[originally from svn r9022]
2010-11-06 18:14:41 +00:00
4d41f0f717 Fixes to r8997: firstly, move the fix out of #ifdef CAIRO so that it
applies to both drawing mechanisms, and secondly, make sure to paint
the spare pieces of window in the _puzzle's_ background colour
rather than the (sometimes slightly different) system default.

[originally from svn r9021]
[r8997 == 26c669a6b2892b97b4a9bc6842f633291951fdbd]
2010-11-06 17:47:46 +00:00
64e78f644c Liam Clarke points out that the use of the word 'radius' to describe
the size of the rotating sections in Twiddle is a misnomer, since
it's actually measuring something more like the diameter of the
section. Replace the word throughout with 'rotating block size' or
similar.

[originally from svn r9013]
2010-10-01 11:46:32 +00:00
f1ad38971c Memory leak fixes from Jonas Koelker.
[originally from svn r9001]
2010-09-20 10:36:44 +00:00
26c669a6b2 Jonas Koelker reports that using the version of GTK currently in
Debian sid (2.20.1), there's a redraw problem when the window has a
different aspect ratio from the puzzle (due to resizing or
maximising): pieces of the window outside the real puzzle rectangle
don't get redrawn when exposed (e.g. by the drop-down menus).

Introduced code to explicitly redraw the whole exposed area,
including the parts that fall outside the pixmap. This makes the
problem go away in my hasty test install of sid, and doesn't seem to
affect the build on lenny.

[originally from svn r8997]
2010-09-14 10:55:06 +00:00
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