763 Commits

Author SHA1 Message Date
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
b2f1b324fe Patch from Lee Dowling to implement mouse control in Sokoban, along
pretty much the same lines as Cube and Inertia.

[originally from svn r8301]
2008-11-16 15:47:55 +00:00
33be388d41 Take out some lurking "nullgame" holdovers from unfinished puzzle
source files, in case they cause trouble. Spotted by Lee Dowling.

[originally from svn r8300]
2008-11-16 15:42:32 +00:00
466aa6e532 Patches from Lee Dowling to make Light Up and Net use the
CURSOR_SELECT2 button (to, respectively, toggle a "definitely not
light" dot and to rotate in the opposite direction from
CURSOR_SELECT).

[originally from svn r8299]
2008-11-16 15:37:58 +00:00
ce237a73ee Couple of solving-related mid-end tweaks. Firstly, when we generate
a game which comes with an aux string, we immediately self-test that
string by passing it to solve() and test by assertion that it
succeeded. So a bug in a back end which intermittently generates
malformed aux strings will be detected as soon as it occurs, instead
of only if the user happens to use the Solve operation on a
particular game in which it happened.

Secondly, Ctrl-S now (undocumentedly) triggers the Solve operation,
on the general principle that keyboard shortcuts tend to come in
handy, and on the specific principle that if you want to look at
lots of solved grids in quick succession (say, when observing their
general shape and nature to see if your generation algorithm was
good or not) it's handy to have a quick way of getting to them.

[originally from svn r8298]
2008-11-16 15:28:28 +00:00
23fb0e7753 Check return values from fwrite when saving files.
[originally from svn r8278]
2008-11-04 23:02:07 +00:00
f4bd45e7b9 Patch from Lambros to improve the generality of path-generation. In
particular, Great Hexagonal tilings previously had virtually every
(if not _actually_ every) hexagon on the inside of the path, and now
don't.

[originally from svn r8277]
2008-11-04 21:39:59 +00:00
a35c660284 Patch from Chris Boyle to prevent Solo's inter-block dividing lines
from becoming indistinguishable from the intra-block ones at low
tile sizes.

[originally from svn r8259]
2008-11-02 14:29:41 +00:00
808495cb41 Apply "103_fix-unequal-digit-h.diff" from the Debian package:
Unequal 18x18 or above was unplayable due to a clash with the undocumented
"H" (hint) key. Resolve the clash by making the hint function only fire
when no square is selected.

[originally from svn r8200]
2008-10-05 12:22:37 +00:00
736da74eba Remove strange punctuation.
[originally from svn r8199]
2008-10-04 21:49:44 +00:00
8ad01fc6e7 Cut-and-paste error which was preventing any drop-down list in the
custom game configuration code from working in the Java applets.

[originally from svn r8192]
2008-09-19 07:31:52 +00:00
734dc80c53 Lambros points out that trying to generate a 3x3 Cairo Easy grid
spins forever, but observes that raising the limit to 4x4 across all
grid types is not good for the complex grids like great-hexagonal.
Introduce per-grid minimum sizes using mad macro trickery.

(In fact, for each grid type I've put in a minimum size which _both_
dimensions must equal or exceed, plus another minimum size which _at
least one_ must equal or exceed; that permits both 3x4 and 4x3 Cairo
while disallowing 3x3.)

[originally from svn r8191]
2008-09-18 18:19:55 +00:00
ef6166e198 Patch from Lambros implementing error highlighting in Loopy.
[originally from svn r8190]
2008-09-18 15:33:13 +00:00
55f9540179 Yet another complete rewrite of Slant's loop detection during
gameplay. Having tried methods based on using the slashes to define
a dsf on grid vertices, and also methods based on tracing round the
loops using conventional (non-dsf-based) graph theory, it occurred
to me the other day that there's a far simpler technique involving
connectivity. A loop is precisely that which causes the playing area
to become disconnected; so what we do now is to go through and build
a dsf describing connectedness of the _area_ of the grid rather than
the vertices. That divides the area into its maximal connected
components, and then we can trivially identify every edge that's
part of a loop by noticing that it separates two nonequivalent
pieces of space. The resulting algorithm is half the size of the old
one, and it's much easier to be confident of its correctness.

(Having said which, there will doubtless turn out to be an
embarrassing bug in it, but I haven't found it yet.)

[originally from svn r8187]
2008-09-17 16:43:36 +00:00
4cfec3765a Cosmetic: fix mismatch between game_compute_size() and game_redraw()
(was causing unwanted "drop-shadow" type effect).

[originally from svn r8186]
2008-09-16 23:51:57 +00:00
ba2a002c02 Lambros provides this workaround for a compiler warning on his
Ubuntu system. I'm inclined to think the real problem is in his gtk
headers, but this is a harmless enough change to avoid hassle.

[originally from svn r8181]
2008-09-14 08:52:59 +00:00
0819e8ec76 Typo spotted by James H.
[originally from svn r8180]
2008-09-13 19:21:53 +00:00
961f3d12b7 Oops, left this out of r8178: having defined COMBINED everywhere in
the puzzles, we can now remove it from the OS X makefile section.

[originally from svn r8179]
[r8178 == 43eafe1fdf356c0c1c88936ffa79c83291973b5d]
2008-09-13 19:18:42 +00:00
43eafe1fdf Change to the handling of -DCOMBINED in the makefiles. Instead of
defining it centrally per port, I think it's neater to define it for
each puzzle when adding that puzzle to the ALL list - because those
front ends which take -DCOMBINED are precisely those which use ALL.
In particular, this change opens up the possibility of compiling
both individual puzzles _and_ a combined monolith within the same
makefile.

[originally from svn r8178]
2008-09-13 19:17:26 +00:00
1d661ec46b Patch from James H providing lots more paranoid casting. Also one
actual behaviour change: Untangle now permits dragging with the
right mouse button, which has exactly the same effect as it does
with the left. (Harmless on desktop platforms, but helpful when
"right-click" is achieved by press-and-hold; now the drag takes
place even if you hesitate first.)

[originally from svn r8177]
2008-09-13 18:29:20 +00:00
5ead207060 Patch from James H to centralise some generally useful cursor-
handling functionality into misc.c.

[originally from svn r8176]
2008-09-13 18:26:53 +00:00
fe1b91ac49 Since the lack of this has caused portability issues in the past:
add "-ansi -pedantic" to the main Unix makefile, and clean up a few
minor problems pointed out thereby.

[originally from svn r8175]
2008-09-13 18:25:19 +00:00
acf5c55d35 Patch from James H to make new-Loopy port more easily.
[originally from svn r8174]
2008-09-10 21:44:23 +00:00
018fa4053d Having played new-Loopy a bit recently, I've had occasion to think a
bit harder about advanced solver techniques. Expand the comment at
the top of the file.

[originally from svn r8167]
2008-09-07 10:02:40 +00:00
4033458aff How did I manage to check this in without actually trying to build
on Windows at all?! Fix some departures from the C standard, mostly
declaring variables after a statement has already been issued in the
same block. MSVC is picky about this where gcc is forgiving, and TBH
I'd change the latter given the choice.

[originally from svn r8166]
2008-09-07 08:35:52 +00:00
f7ab0a4996 New Loopy save file, compatible with the new Loopy.
[originally from svn r8165]
2008-09-06 21:24:21 +00:00