aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Since r6711, puzzles built with Gtk 1.2 would take double actions when a menuJacob Nevins2006-06-26
| | | | | | | | | | 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]
* Trivial patch from Ben Hutchings to support resizable windows underSimon Tatham2006-05-20
| | | | | | | GTK. All the infrastructure in the midend and beyond was already there; it was just a matter of enabling it! [originally from svn r6712]
* Ben Hutchings's patch to add display of key accelerators in the GameSimon Tatham2006-05-20
| | | | | | menu. [originally from svn r6711]
* Patch from Ben Hutchings to prevent an ugly special case inSimon Tatham2006-05-20
| | | | | | | &splitline in which a line is `split' into a line ending in a backslash followed by a completely blank line. [originally from svn r6710]
* Cleanup patch from Ben Hutchings, fixing some odd-looking rangeSimon Tatham2006-05-20
| | | | | | | | 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]
* Patch from Ben Hutchings to prevent memory leakage during Loopy gameSimon Tatham2006-05-20
| | | | | | generation. [originally from svn r6708]
* Tidy up comments.Simon Tatham2006-03-12
| | | | [originally from svn r6601]
* Introduce a new deductive mode in Slant's Hard level, which is theSimon Tatham2006-03-06
| | | | | | | | | | | | | | | | | 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]
* "Hold" function in Guess was completely broken.Jacob Nevins2006-03-03
| | | | | | | | 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]
* I've been pondering whether to do this for months: turn the ratherSimon Tatham2006-03-02
| | | | | | | | | | 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]
* Mines's error signalling is highly asymmetric: if you erroneouslySimon Tatham2006-02-20
| | | | | | | | | | | | | 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]
* Small docs patch from Phil Bordelon adding more history of Sudoku.Simon Tatham2006-02-19
| | | | [originally from svn r6575]
* Patch from Phil Bordelon to improve Bridges' appearance by adjustingSimon Tatham2006-02-19
| | | | | | the font size. [originally from svn r6573]
* Tal Kelrich spotted that hitting `Solve' on a configuration which isSimon Tatham2006-02-07
| | | | | | | | | 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]
* It's a new year.Jacob Nevins2006-01-08
| | | | | [originally from svn r6513] [this svn revision also touched halibut,putty,putty-website]
* Revert a change in an assertion made in r6299. It was right theSimon Tatham2006-01-05
| | | | | | | first time, and now has a comment explaining why! [originally from svn r6511] [r6299 == c389f623f66fe5296f7ef5c66d88884607b82cff]
* Add some random index terms. ("Sudoku" wasn't in the index!)Jacob Nevins2005-12-27
| | | | [originally from svn r6509]
* Laurent Thioudellet reports that gcc4's ultra-cautious data flowSimon Tatham2005-12-26
| | | | | | | | | | | | | | | | | | 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]
* I've just noticed a bug in the Inertia solver: if you call it on anSimon Tatham2005-12-26
| | | | | | | 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]
* Correct w/h mixup in grid edge checks.Simon Tatham2005-11-10
| | | | [originally from svn r6452]
* Document Unix command-line options.Jacob Nevins2005-10-22
| | | | [originally from svn r6423]
* Fix segfault in Tents' printing.Jacob Nevins2005-10-22
| | | | [originally from svn r6422]
* Work around a couple of minor display issues with max bridges set to 4:Jacob Nevins2005-10-22
| | | | | | | | | | | | | - 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]
* Cleanup: relieve frontends of the duty to callSimon Tatham2005-10-22
| | | | | | | | | | | | | 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]
* Cleanup: remove the `just_used_solve' field from a number of gamesSimon Tatham2005-10-22
| | | | | | | | | | | | | | | 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]
* Forgot to update devel.but in r6417.Simon Tatham2005-10-22
| | | | | [originally from svn r6418] [r6417 == eb2013efc0a6201d0e46de65c1a905b676d13d01]
* Cleanup: it was absolutely stupid for game_wants_statusbar() to be aSimon Tatham2005-10-22
| | | | | | | | | 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]
* Cleanup: remove the game_state parameter to game_colours(). No gameSimon Tatham2005-10-22
| | | | | | | | | | | | 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]
* Noticed recently that bitcount16() isn't 16-bit clean due to signedSimon Tatham2005-10-22
| | | | | | | | | | 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]
* Cleanup: the `mouse_priorities' field in the back end has been aSimon Tatham2005-10-22
| | | | | | | more general-purpose flags word for some time now. Rename it to `flags'. [originally from svn r6414]
* OS X frontend was directly calling the backend's wants_statusbar()Simon Tatham2005-10-22
| | | | | | function, whereas it ought to have been calling the midend's one. [originally from svn r6413]
* Cleanup: rename random_init() to random_new(), because it actuallySimon Tatham2005-10-22
| | | | | | | _allocates_ a random_state rather than just initialising one passed in by the caller. [originally from svn r6412]
* New puzzle from James H: `Bridges', another Nikoli job.Simon Tatham2005-10-21
| | | | [originally from svn r6409]
* Miscellaneous fixes. Correct a comparison of y with w causingSimon Tatham2005-10-17
| | | | | | | | | | 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]
* Just noticed a longhand shuffling operation which I must have missedSimon Tatham2005-10-17
| | | | | | when I converted them all into calls to shuffle(). [originally from svn r6404]
* Janes H provides a small workaround for a Palm tools bug.Simon Tatham2005-10-15
| | | | [originally from svn r6403]
* Small error in solver diagnostics.Simon Tatham2005-10-15
| | | | [originally from svn r6402]
* Revamp of the control mechanism to permit drag- as well asSimon Tatham2005-10-14
| | | | | | | click-based control. Only used for right-dragging to clear a large area to NONTENT. [originally from svn r6400]
* New puzzle: `Tents'. Requires a potentially shared algorithms moduleSimon Tatham2005-10-13
| | | | | | | maxflow.c. Also in this checkin, fixes to the OS X and GTK back ends to get ALIGN_VNORMAL right. This is the first time I've used it! :-) [originally from svn r6390]
* loopy_diffnames[] isn't used, and provokes a warning on OS X.Simon Tatham2005-10-13
| | | | [originally from svn r6389]
* Yikes! I've only just noticed that this copy of tree234.c was stillSimon Tatham2005-10-12
| | | | | | | | | using unwrappered malloc/free, leaving plenty of openings for out- of-memory segfaults. Switch to using Puzzles's memory management, which I should have done right at the start but can only assume I forgot about. [originally from svn r6388]
* r6384 didn't go quite far enough. In fact, a grid square whichSimon Tatham2005-10-10
| | | | | | | | | | | | | | differs between oldstate and state in only the hint bit should not have a flip animation even if hints_active is TRUE. Flip animations should only happen for tiles which are changing their primary state. (Put like that, it seems so obvious.) Test case which demonstrates this fix to be right and r6384 to be wrong: 3x3:101000000000000000000,300 . Hit Solve immediately and then click on the red-highlighted squares. [originally from svn r6385] [r6384 == dd175e490a197026210ba4432eec6236971c6173]
* Fixes for handling human-entered Flip games. The clicked-on squareSimon Tatham2005-10-10
| | | | | | | | | | | | always got a flip animation even when it wasn't one of the ones being turned, and a square with no effect at all was still counting as a move. Since it's an invariant of Flip's internal generator that every square includes itself as an effect, this never comes up in auto- generated games. [originally from svn r6384]
* Richard Earnshaw points out that if you enter an out-of-range numberSimon Tatham2005-10-10
| | | | | | | | | in the game description, the solver will fail to notice it and overrun an array leading to assertion failure, silent wrong answers or (in extreme cases) segfaults. Hence, validate_desc() now spots them and kicks them out. [originally from svn r6383]
* Use game_set_size() to set up the temporary drawstate inSimon Tatham2005-09-23
| | | | | | | | | | | | | | | | | | game_print(), wherever feasible. This fixes a specific bug in Loopy (James H's new field ds->linewidth wasn't being set up, leading to corrupted print output), but I've made the change in all affected files because it also seems like a generally good idea to encourage it for future games, to prevent other problems of this type. There is one slight snag, which is that Map _can't_ do this because its game_set_size() also initialises a blitter. I could fix this by abstracting the common parts of Map's game_set_size() out into a subfunction called by game_set_size() and also called directly by game_print(); alternatively, I could introduce a means of determining whether a `drawing *' was for screen or printing use. Not sure which yet. [originally from svn r6340]
* Fix very strange indentation issue!Simon Tatham2005-09-23
| | | | [originally from svn r6339]
* Bug fix from James H: prevent LINEWIDTH ever reaching zero.Simon Tatham2005-09-18
| | | | [originally from svn r6331]
* Another optimisation patch from Mike, which (among other things)Simon Tatham2005-09-18
| | | | | | | | eliminates gratuitous duplication of the solver state every time it goes round the main loop, in favour of the usual type of `done_something' flag. [originally from svn r6322]
* Optimisation patch from Mike: remember which squares we've entirelySimon Tatham2005-09-15
| | | | | | finished dealing with, and don't do them again on the next loop. [originally from svn r6312]
* Patch from Mike: fix an array indexing error in the clueSimon Tatham2005-09-13
| | | | | | highlighting, and adjust the presets. [originally from svn r6303]