552 Commits

Author SHA1 Message Date
13a9cb0bea James H's Palm-compatibility updates to the latest Loopy changes,
working around bugs in the Palm compiler and removing Palm-
incompatible diagnostics such as fprintf.

[originally from svn r6889]
2006-11-01 13:25:25 +00:00
9b31ed25d8 Mike's changes to dsf.c alter the internal storage format of dsf
structures, meaning that ad-hoc initialisation now doesn't work.
Hence, this checkin converts all ad-hoc dsf initialisations into
calls to dsf_init() or snew_dsf(). At least, I _hope_ I've caught
all of them.

[originally from svn r6888]
2006-11-01 11:31:20 +00:00
fe4fd0ebc5 Minimal (i.e., lame) update to Loopy documentation to match reality -- it's
been wrong since r6299.

[originally from svn r6884]
[r6299 == c389f623f66fe5296f7ef5c66d88884607b82cff]
2006-10-29 17:40:45 +00:00
b3364419da I'm sick and tired of having unfinished puzzle code lying around on
several different systems in strange directories. So I'm creating an
`unfinished' directory within source control, and centralising all
my half-finished, half-baked or otherwise half-arsed puzzle
implementations into it. Herewith Sokoban (playable but rubbish
generation), Pearl (Masyu - rubbish generation and nothing else),
Path (Number Link - rubbish generation and nothing else) and NumGame
(the Countdown numbers game - currently just a solver and not even a
generator yet).

[originally from svn r6883]
2006-10-29 09:41:02 +00:00
b7356cd209 r6880 accidentally backed out r6780. That's what I get for accepting
source files from Mike rather than patches, and not adequately
checking the result...

[originally from svn r6882]
[r6780 == f05c25347d66821d928668a7e87dffbf3ffed027]
[r6880 == b9547673c6462bf73e642328300479df6df71d7b]
2006-10-29 09:34:09 +00:00
b9547673c6 Mike Pinna has done some major reworking of the Loopy solver, giving
rise to a new Hard difficulty level.

[originally from svn r6880]
2006-10-28 15:38:53 +00:00
04e3e09b87 Couple of minor errors.
[originally from svn r6872]
2006-10-17 08:25:40 +00:00
1129ba83f9 Forgot to put the new .R files into makedist.sh. Oops!
[originally from svn r6849]
2006-09-06 08:23:15 +00:00
9955c5ffc3 Jesse W points out that I forgot to update the OS X front end in
r6420, so both drawing.c _and_ the front end were prepending the
time to the front of the Mines status bar, leading to a double
timestamp.

[originally from svn r6796]
[r6420 == 240b6cab8ce8729b7270a0411ab39038814058f1]
2006-08-25 07:10:59 +00:00
aa08d80a5f Always something. Mention `svn add'ing the .R file in the new-puzzle
checklist, and mention the now-not-version-controlled list.c in
svn:ignore.

[originally from svn r6782]
2006-08-05 17:25:09 +00:00
cf880225ed I'm sick of repeatedly adding and removing local changes to Recipe
when testing a new game, so here's a new architecture for the Recipe
file. mkfiles.pl now supports several new features:

 - an `!include' directive, which accepts wildcards
 - += to append to an existing object group definition
 - the ability to divert output to an arbitrary file.

So now each puzzle has a `.R' file containing a fragment of Recipe
code describing that puzzle, and the central Recipe does `!include
*.R' to construct the Makefiles. That way, I can keep as many
experimental half-finished puzzles lying around my working directory
as I like, and I won't have to keep reverting Recipe when I check in
any other changes.

As part of this change, list.c is no longer a version-controlled
file; it's now constructed by mkfiles.pl, so that it too can take
advantage of this mechanism.

[originally from svn r6781]
2006-08-05 17:20:29 +00:00
f05c25347d Extra utility function.
[originally from svn r6780]
2006-08-05 16:35:25 +00:00
6837cc46cd Random docs cleanups I've collected together.
[originally from svn r6749]
2006-07-07 13:59:16 +00:00
cfcd8cf8c5 Since r6711, puzzles built with Gtk 1.2 would take double actions when a menu
accelerator key (N/U/R/Q) was pressed -- once for the menu accelerator, and
once more in key_event().
This workaround, while unlovely, should at least not break in future (since the
things it relies on are unlikely to change).

[originally from svn r6745]
[r6711 == 077aa510c78f3273bd0d4ca4f1ca14780822ebf9]
2006-06-26 22:01:51 +00:00
d952a3b6ff Trivial patch from Ben Hutchings to support resizable windows under
GTK. All the infrastructure in the midend and beyond was already
there; it was just a matter of enabling it!

[originally from svn r6712]
2006-05-20 12:06:41 +00:00
077aa510c7 Ben Hutchings's patch to add display of key accelerators in the Game
menu.

[originally from svn r6711]
2006-05-20 12:01:55 +00:00
fd90d1a7c8 Patch from Ben Hutchings to prevent an ugly special case in
&splitline in which a line is `split' into a line ending in a
backslash followed by a completely blank line.

[originally from svn r6710]
2006-05-20 11:58:24 +00:00
197e262ba6 Cleanup patch from Ben Hutchings, fixing some odd-looking range
checks. He thinks they were harmless (due to being followed by other
range checks in RIGHTOF_DOT and friends) but it clearly can't hurt
to fix them anyway.

[originally from svn r6709]
2006-05-20 11:54:21 +00:00
877900f58a Patch from Ben Hutchings to prevent memory leakage during Loopy game
generation.

[originally from svn r6708]
2006-05-20 11:52:22 +00:00
3575c3df79 Tidy up comments.
[originally from svn r6601]
2006-03-12 09:06:27 +00:00
27160f7ad2 Introduce a new deductive mode in Slant's Hard level, which is the
generalisation of the previous deduction involving two 3s or two 1s
either adjacent or separated by a row of contiguous 2s. I always
said that was an ugly loop and really ought to arise naturally as a
special case of something more believable, and here it is.

The practical upshot is that Hard mode has just become slightly
harder: some grids generated by the new Slant will be unsolvable by
the old one's solver. I don't think it's become _excessively_ more
hard; I think I'm happy with the new difficulty level. (In
particular, I don't think the new level is sufficiently harder than
the old to make it worth preserving the old one as Medium or
anything like that.)

[originally from svn r6591]
2006-03-06 20:03:27 +00:00
87eaeb51fe "Hold" function in Guess was completely broken.
Fix it, add holds to the undo history (by analogy with Net), and save the
current holds in saved games.
Also fix a couple of unrelated minor issues with string encoding.

[originally from svn r6590]
2006-03-03 20:04:13 +00:00
a8fd3a1b17 I've been pondering whether to do this for months: turn the rather
washed-out yellow and green in Guess into their full-brightness pure
forms. This makes them hard to see against some backgrounds, so I'm
also surrounding all coloured pegs with black outlines. Looks a
little cartoony, but I think it's an overall improvement on the
previous look.

[originally from svn r6589]
2006-03-02 19:39:46 +00:00
fe514e9374 Mines's error signalling is highly asymmetric: if you erroneously
believe a square to be empty, you find out instantly and lethally,
but if you erroneously believe a square to be full you can
occasionally (when it doesn't cause a complementary square to be
assumed empty) not notice until you find at the very end of the game
that you're one mine heavy. To help with this, here's an error
highlighting patch: any number square surrounded by an excess of
flags will now light up red. This should be an unintrusive change,
because it will never happen unless you make a mistake.

[originally from svn r6580]
2006-02-20 19:51:50 +00:00
afe3a1372a Small docs patch from Phil Bordelon adding more history of Sudoku.
[originally from svn r6575]
2006-02-19 12:54:17 +00:00
9a59d8a45a Patch from Phil Bordelon to improve Bridges' appearance by adjusting
the font size.

[originally from svn r6573]
2006-02-19 12:42:46 +00:00
c5001ca751 Tal Kelrich spotted that hitting `Solve' on a configuration which is
laser-indistinguishable from the right solution _but_ has a number
of balls outside the acceptable range does not report an error. His
example was the game ID w8h8m5M5:1e3e6e80fa3e16265ccef7ca , omitting
the rightmost ball in the second row.

[originally from svn r6542]
2006-02-07 21:45:50 +00:00
acafc4d93f It's a new year.
[originally from svn r6513]
[this svn revision also touched halibut,putty,putty-website]
2006-01-08 18:18:11 +00:00
ac027d9d08 Revert a change in an assertion made in r6299. It was right the
first time, and now has a comment explaining why!

[originally from svn r6511]
[r6299 == c389f623f66fe5296f7ef5c66d88884607b82cff]
2006-01-05 09:40:51 +00:00
7c5ff85bb1 Add some random index terms. ("Sudoku" wasn't in the index!)
[originally from svn r6509]
2005-12-27 15:36:21 +00:00
e15a2defff Laurent Thioudellet reports that gcc4's ultra-cautious data flow
warnings require two more variables to be explicitly initialised. In
fact these variables are reliably initialised by a subfunction; gcc3
was happy to assume I knew what I was doing when it couldn't prove
they were definitely used uninitialised, whereas gcc4 apparently
takes the view that the onus is on me to allow it to prove they
_aren't_. I regard this as a step backwards, since the effect will
be to make explicit initialisation commonplace in cases where the
initialiser value is chosen arbitrarily and never expected to be
used, at which point (a) it will be less clear which initialisers
have genuine purpose and which are compiler-placating fluff, and (b)
valgrind's run-time uninitialised-data tracking will become less
useful. Still, the effect doesn't seem great as yet, so here's the
gcc4-placating checkin.

[originally from svn r6508]
2005-12-26 23:24:09 +00:00
74f45138ae I've just noticed a bug in the Inertia solver: if you call it on an
already-solved grid (i.e. no gems), it will still attempt to show
you a move you can make. Eliminate that special case.

[originally from svn r6507]
2005-12-26 11:26:34 +00:00
f0ec00fb4c Correct w/h mixup in grid edge checks.
[originally from svn r6452]
2005-11-10 11:57:15 +00:00
c8855bff31 Document Unix command-line options.
[originally from svn r6423]
2005-10-22 19:58:59 +00:00
5e28f1a971 Fix segfault in Tents' printing.
[originally from svn r6422]
2005-10-22 18:18:21 +00:00
cc6092ce79 Work around a couple of minor display issues with max bridges set to 4:
- the highlighting for a set of 4 lines spilled outside the tile, so would
   leave white residue if undone;

 - the endpoints of sets of 4 lines were not completely overprinted by the
   circle of an island (at least on Windows), which was untidy.

Fixed by reducing the gap width for groups of lines which wouldn't otherwise
fit in a tile (only).

[originally from svn r6421]
2005-10-22 18:07:56 +00:00
240b6cab8c Cleanup: relieve frontends of the duty to call
midend_rewrite_statusbar() and check the result against the last
string returned. This is now done centrally in drawing.c, and the
front end status bar function need only do what it says on the tin.

While I'm modifying the prototype of drawing_init(), I've also
renamed it drawing_new() for the same reason as random_new() (it
_allocates_ a drawing object, rather than just initialising one
passed in).

[originally from svn r6420]
2005-10-22 17:23:55 +00:00
a3b837c698 Cleanup: remove the `just_used_solve' field from a number of games
which didn't actually need it. It was originally introduced in
Fifteen to suppress animation on Solve moves, but midend.c now does
that centrally unless the game specifically instructs it otherwise.
Therefore, just_used_solve is obsolete in all games which previously
used it. (Mines was even worse: it scrupulously maintained the
correctness of the field but never used it!)

Untangle is exempt from this cleanup: its `just_solved' field is
used to change the _length_ of the animation on Solve moves, not to
suppress it entirely, and so it has to stay.

[originally from svn r6419]
2005-10-22 17:00:35 +00:00
d31f3ac3a5 Forgot to update devel.but in r6417.
[originally from svn r6418]
[r6417 == eb2013efc0a6201d0e46de65c1a905b676d13d01]
2005-10-22 16:53:06 +00:00
eb2013efc0 Cleanup: it was absolutely stupid for game_wants_statusbar() to be a
function, since it took no parameters by which to vary its decision,
and in any case it's hard to imagine a game which only
_conditionally_ wants a status bar. Changed it into a boolean data
field in the backend structure.

[originally from svn r6417]
2005-10-22 16:52:16 +00:00
40fcf516f4 Cleanup: remove the game_state parameter to game_colours(). No game
was actually using it, and also it wasn't being called again for
different game states or different game parameters, so it would have
been a mistake to depend on anything in that game state. Games are
now expected to commit in advance to a single fixed list of all the
colours they will ever need, which was the case in practice already
and simplifies any later port to a colour-poor platform. Also this
change has removed a lot of unnecessary faff from midend_colours().

[originally from svn r6416]
2005-10-22 16:44:38 +00:00
b44d75aa4e Noticed recently that bitcount16() isn't 16-bit clean due to signed
shift right. It doesn't actually matter in the current code since
the input word only ever uses the bottom 9 bits, but if I ever
extended Mines to work in a triangular grid then all 16 bits might
be required. Fix this now, while I'm cleaning things up, so that it
won't bite me unexpectedly in future.

[originally from svn r6415]
2005-10-22 16:38:15 +00:00
b7f192eea3 Cleanup: the `mouse_priorities' field in the back end has been a
more general-purpose flags word for some time now. Rename it to
`flags'.

[originally from svn r6414]
2005-10-22 16:35:23 +00:00
6824dcde03 OS X frontend was directly calling the backend's wants_statusbar()
function, whereas it ought to have been calling the midend's one.

[originally from svn r6413]
2005-10-22 16:34:28 +00:00
23ab000b7b Cleanup: rename random_init() to random_new(), because it actually
_allocates_ a random_state rather than just initialising one passed
in by the caller.

[originally from svn r6412]
2005-10-22 16:27:54 +00:00
4faecc7726 New puzzle from James H: `Bridges', another Nikoli job.
[originally from svn r6409]
2005-10-21 08:07:31 +00:00
6ea453c95f Miscellaneous fixes. Correct a comparison of y with w causing
assertion failures in portrait-type grids; retire an unused array in
the game generation function (my original generation strategy needed
it, but the final one didn't); correct a typo; further restrict the
generable sizes of game and include a special case for 4x4dt to
prevent a tight loop.

[originally from svn r6405]
2005-10-17 18:41:05 +00:00
f9168d6003 Just noticed a longhand shuffling operation which I must have missed
when I converted them all into calls to shuffle().

[originally from svn r6404]
2005-10-17 18:32:24 +00:00
5f16a29d4c Janes H provides a small workaround for a Palm tools bug.
[originally from svn r6403]
2005-10-15 16:03:14 +00:00
3bee86241c Small error in solver diagnostics.
[originally from svn r6402]
2005-10-15 15:01:40 +00:00