788 Commits

Author SHA1 Message Date
cfdba00313 More defensive-coding fixes from James H.
[originally from svn r8605]
2009-07-01 22:01:21 +00:00
652f03a8ae Patch from Mark Wooding: when I did r7980 I had completely failed to
notice that there was an _official_ way to have menu items marked as
selected or unselected, which is the GtkRadioMenuItem class. Replace
my ad-hoc use of bullet characters with that.

[originally from svn r8601]
[r7980 == ae6c7381272f84c0fd398f6d3e496f571ba42ec8]
2009-06-21 13:49:09 +00:00
93cd7ae62c Patch from Mark Wooding: use gdk_event_request_motions() where
available, which magically seems to eliminate most if not all of the
update lag when dragging a point in a large (say 250-point)
Untangle. I don't fully understand how this works, but it seems to!

[originally from svn r8600]
2009-06-21 13:39:54 +00:00
ec29642539 Patch from Mark Wooding: stop setting GTK_EXPAND for the x-direction
on labels in tables. The effect is that if you resize (e.g.) Solo's
configuration panel, the labels to the left of the various input
boxes will remain just big enough to fit their text in, and all the
extra space will be taken up by the useful part, i.e. the input
boxes themselves. Previously the labels and input boxes would expand
in a 1:1 ratio, causing lots of space to the right of the label text
that wasn't used for anything.

[originally from svn r8599]
2009-06-21 13:34:50 +00:00
767ec24009 Patch from Mark Wooding: one-pixel fix to the alignment of the
bottom and right edges of the Tents keyboard cursor.

[originally from svn r8598]
2009-06-21 13:28:43 +00:00
4ecc4f92d8 Patch from Mark Wooding (though somewhat tampered with by me): have
Loopy mark LINE_NO grid edges with very faint lines, instead of
leaving them totally undrawn. Helps in complex grid types where the
line layout isn't entirely obvious to a player not already familiar
with it. Disableable by setting LOOPY_FAINT_LINES=n in the
environment, just in case anyone turns out to seriously dislike it.
(You could probably disable it via LOOPY_COLOUR_6 too, but you'd
have to know the exact shade of your background to get that right.)

[originally from svn r8597]
2009-06-21 13:24:48 +00:00
0687980f0c Memory management and other fixes from James H.
[originally from svn r8596]
2009-06-17 20:01:45 +00:00
3cd83d05e8 Fix a misdesign I must have missed when I reviewed the Killer patch:
merge_some_cages() was written in the assumption that it would
always be able to do something, in that it returned void on success
and if it couldn't find anything to do it would just loop round
forever trying the same things over and over again.

Now it makes a methodical list of the pairs of cages which are merge
candidates, goes through them in a random order until it finds a
viable one, and returns a boolean indicating whether it succeeded or
ran out of candidates.

A test case which previously hung and now does not is "solo
--generate 1 7jxkdt#12345-10".

[originally from svn r8541]
2009-04-30 17:56:56 +00:00
4bb9232bcb check_valid() wasn't checking that Killer cages contain at most one
of each digit, and - perhaps more importantly - the display code
wasn't highlighting violations of that rule as an error. Fix both.

[originally from svn r8540]
2009-04-29 23:11:10 +00:00
c696ee2220 It's been a new year for some time now.
[originally from svn r8494]
2009-03-19 23:32:30 +00:00
66efa90048 Patch from James H to provide 16-bit-int cleanliness in Killer Solo.
[originally from svn r8489]
2009-03-02 23:32:43 +00:00
706e27de8d Patch from James H to abstract out of Dominosa the code which
randomly generates a tiling of a rectangle with dominoes, since he
wants to reuse that function in another puzzle.

[originally from svn r8488]
2009-03-02 19:45:59 +00:00
99ca11bf8b Make menus accessible from the keyboard in the Gtk front-end.
[originally from svn r8486]
2009-03-01 13:51:32 +00:00
cc7024b433 Fix cosmetic glitch in the interaction between Killer and Jigsaw
modes.

[originally from svn r8463]
2009-02-24 07:49:01 +00:00
649719a964 Make icon building cope with Solo's increased default tilesize as of r8455.
[originally from svn r8459]
[r8455 == 3d6de1eb47af21a9d9c0e6390b115febbf8b1d91]
2009-02-23 17:42:50 +00:00
87bd938ebf Fix duplicate keyword.
[originally from svn r8458]
2009-02-22 12:57:20 +00:00
3d6de1eb47 A substantial patch to Solo from Bernd Schmidt, adding support for
the 'Killer Sudoku' puzzle type. As a side effect I've had to
increase the default tile size of Solo, so that the extra numbers
drawn in the squares in Killer mode were still legible.

[originally from svn r8455]
2009-02-22 12:16:54 +00:00
407f29c46f Introduce some infrastructure to permit games' print functions to
draw dotted lines. No puzzle yet uses this, but one's about to.

[originally from svn r8453]
2009-02-22 12:05:38 +00:00
9249f09619 Fix the Java front end's vertical text positioning when
ALIGN_VNORMAL is in use: ALIGN_VNORMAL indicates that the supplied
y-coordinate denotes the _baseline_ of the text, not its top, so
adding on 'asc' to convert to the baseline is wrong.

This only affects Tents, at present.

[originally from svn r8452]
2009-02-22 12:02:40 +00:00
5027095ce2 Keyboard control patch for Bridges, from James H.
[originally from svn r8446]
2009-02-05 19:29:26 +00:00
279c678179 Lee Dowling points out that duplicating the entire grid data
structure in every game_state is terribly wasteful. Move all the
constant bits of it (i.e. everything except the per-square 'blue'
flag) into a ref-counted shared structure.

[originally from svn r8444]
2009-02-05 19:25:44 +00:00
918842835b Keyboard control patch for Black Box, from James H.
[originally from svn r8439]
2009-01-28 18:28:41 +00:00
8a3f525a54 Keyboard control patch for Twiddle, from James H.
[originally from svn r8438]
2009-01-28 18:27:10 +00:00
cd3a7d89ce Keyboard control patch for Pattern, from James H.
[originally from svn r8435]
2009-01-27 18:30:46 +00:00
921a054f0a Keyboard control for Map, from James H.
[originally from svn r8434]
2009-01-27 18:26:10 +00:00
4d79c71517 Reorder if statements in Unequal's interpret_move() so that presses
of 'h' and 'm' are treated as digits if a square is selected, and
only treated as special commands otherwise. This renders very large
games (just about) playable.

Idea from Ben Hutchings's collection of Debian patches, although I
had to redo his (trivial) patch myself since the code has changed
recently.

(Addendum after committing: hmm, I see Jacob already applied the
original version of the patch a while back. Looks as if the recent
keyboard control change reintroduced the problem. Still, re-fixed
now.)

[originally from svn r8433]
2009-01-26 22:28:17 +00:00
cc0f957d82 Patch from James H to add keyboard control in Sixteen and Netslide
(and also belatedly document the keyboard support in Unequal).

[originally from svn r8432]
2009-01-26 19:14:44 +00:00
d2b0d8cf3f Switch over to using the new-style GtkFileChooser in place of the
deprecated GtkFileSelection, at least when the latter is available.
Patch mostly due to Ori Avtalion.

[originally from svn r8431]
2009-01-26 19:11:34 +00:00
ff62f0aaff Add an automatic check for HAVE_SENSIBLE_ABSOLUTE_SIZE_FUNCTION by
using PANGO_CHECK_VERSION. (Irritatingly, the latter is not
available in all versions of Pango, so we have to be cautious about
using it at all. *sigh*)

[originally from svn r8430]
2009-01-24 17:58:42 +00:00
47c3878dc7 Keyboard control patch for Pegs, from James H.
[originally from svn r8419]
2009-01-20 18:28:28 +00:00
f46eceb714 Keyboard control patch for Solo, from James H.
[originally from svn r8418]
2009-01-19 18:38:29 +00:00
4169a54831 Keyboard control patch for Slant, from James H.
[originally from svn r8417]
2009-01-16 18:52:18 +00:00
28acb0ebdc Keyboard cursor support for Tents, from James H.
[originally from svn r8416]
2009-01-16 18:50:22 +00:00
fa23fc3943 r8396 introduced midend_tilesize(). Document it.
[originally from svn r8415]
[r8396 == 7888d8db677e25d2401914e6aacb1be02301d15f]
2009-01-16 18:45:01 +00:00
5480199874 Keyboard cursor support for Rectangles, from James H.
[originally from svn r8414]
2009-01-15 18:20:02 +00:00
4850845205 Keyboard cursor support in Galaxies, by James H.
[originally from svn r8413]
2009-01-15 18:18:21 +00:00
c826fdc062 Keyboard interface for Filling, from James H.
[originally from svn r8412]
2009-01-14 20:44:25 +00:00
96315bc2ba Patch from James H to fix some off-by-one errors in Guess's click
rectangle checking, preventing array bounds violation.

[originally from svn r8409]
2009-01-12 20:30:12 +00:00
4a202808ee Patch from James H which adds keyboard cursor support to Unequal,
and also updates the docs for both that and the Mines cursor support
in r8402.

[originally from svn r8408]
[r8402 == f20847354cb6335fd349204f16021a72e2956cce]
2009-01-12 20:23:56 +00:00
f20847354c Patches from James H to add or improve arrow-key-driven cursors for
some puzzles. (Light Up's and Net's are merely polished a bit, but
Mines acquires a new one.)

[originally from svn r8402]
2009-01-08 18:28:32 +00:00
fee17c3704 Patch from Lambros to make the Normal difficulty level easier, since
people have generally seemed to think Loopy is one of the more
difficult puzzles in the collection. There's a new level called
Tricky, between Normal and Hard, which is equivalent to the old
Normal.

[originally from svn r8398]
2009-01-07 23:07:11 +00:00
d9e39add3a Standalone solver for Loopy. Bit half-hearted, since the solver
doesn't have diagnostics embedded and the ASCII formatter can't
print non-square puzzles anyway; but it can grade difficulty, which
is what I most immediately want it for.

[originally from svn r8397]
2009-01-07 21:55:21 +00:00
7888d8db67 Patch from James H to enable a single monolithic binary to be built
alongside the individual puzzle binaries, on Windows only. (MacOS
already has it, of course; Unix would require about as much work
again.)

[originally from svn r8396]
2009-01-06 23:26:18 +00:00
6328483bb4 Bring the unfinished .R files into line with the current conventions.
[originally from svn r8395]
2009-01-06 23:21:42 +00:00
17334d1945 Don't ignore the return code of fwrite(). (Slight modification of a
patch from Phil Bordelon.)

[originally from svn r8373]
2008-12-12 19:49:05 +00:00
ba08d8ab28 Add missing call to gtk_selection_clear_targets(), without which the
list of selection targets offered by GTK Puzzles grows an extra copy
of each of the three supported text formats every time the user
makes a selection!

[originally from svn r8365]
2008-12-01 23:04:17 +00:00
ec38952c4c Stand-alone command-line interface to the obfuscate_bitmap()
function. Useful in conjunction with the new --save option to
generate lots of games, extract the aux strings from the game
generator, and de-obfuscate them in order to measure statistical
properties of their solutions.

[originally from svn r8352]
2008-11-29 13:51:36 +00:00
6aa7ccfa06 The other day I found it useful for a (silly) special purpose to
generate a thousand saved-game files of randomly generated puzzles.
On the general principle that if I find it useful someone else
conceivably might too, add a --save option to the Unix puzzle
binaries, for use with --generate in much the same way as --print.

[originally from svn r8351]
2008-11-29 08:50:50 +00:00
4443016a82 Fix parenthesis problem in Light Up solver. Should fix Debian bug
#505359.

[originally from svn r8342]
2008-11-28 19:33:40 +00:00
f514a1ea90 Let's have some more presets in here: 3x3 is much _too_ short and
easy compared to 6x6.

[originally from svn r8340]
2008-11-28 18:33:39 +00:00