aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Fix a comment in Tents (it said 'tents' instead of 'trees').Jonas Kölker2015-10-21
|
* Highlight clue errors in Tracks in some more situations.Jonas Kölker2015-10-21
| | | | | | | | | - Count any square as having a track either if the square is marked as such (rendered as a different background), or if at least one adjacent edge is marked as containing a segment of train track (rendered as train tracks if they're placed, else as an '='). - Do the same counting in rows and columns.
* In Undead, mark clues as errors in a few more situations.Jonas Kölker2015-10-21
| | | | | | | | | - Mark a clue as an error if too many monsters are seen, even if some squares are empty. - Mark a clue as an error if too few monsters are seen, taking into account how many more sightings are possible given the number of empty squares and how many times each of them are visited.
* Fix array overruns in the new Filling solver pass.Simon Tatham2015-10-21
| | | | | | | | | | | | | Probably because I wrote a couple of loops up to the maximum cell value using the non-idiomatic <= for their termination test, I also managed to use <= inappropriately for iterating over every cell of the grid, leading to a couple of references just off the end of arrays. Amusingly, it was the Emscripten front end which pointed this out to me by actually crashing as a result! Though valgrind found it just fine too, once I thought to run that. But it comes to something when running your C program in Javascript detects your memory errors :-)
* Enhance Filling's solver to handle large ghost regions.Simon Tatham2015-10-20
| | | | | | | | | | | | | | | | The previous solver could cope with inferring a '1' in an empty square, but had no deductions that would enable it to infer the existence of a '4'-sized region in 5x3:52d5b1a5b3. The new solver can handle that, and I've made a companion change to the clue-stripping code so that it aims to erase whole regions where possible so as to actually present this situation to the player. Current testing suggests that at the smallest preset a nontrivial ghost region comes up in about 1/3 of games, and at the largest, more like 1/2 of games. I may yet decide to introduce a difficulty level at which it's skewed to happen more often still and one at which it doesn't happen at all; but for the moment, this at least gets the basic functionality into the code.
* Add the new 'fifteensolver' to .gitignore.Simon Tatham2015-10-18
|
* Use \q{} in place of literal quote marks in puzzles.but.Simon Tatham2015-10-18
| | | | | | While checking over the Palisade docs for this sort of error, I happened to notice that a few were already in the existing games' documentation.
* Add a new puzzle: Palisade.Jonas Kölker2015-10-18
|
* Fix GTK puzzle resizing, *again*.Simon Tatham2015-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jonas Kölker points out that commit a800ff16b (which fixed a bug in the previous attempt) left in another bug: if the puzzle size was changed while the window was maximised, the system would fail to recompute the tile size and would redraw completely wrongly. So it's not optional after all to run midend_size(), even if the drawing area size hasn't changed. I've reverted that code to be unconditional, and now only the refresh of the Cairo-side backing store system is conditionalised - and that's conditionalised on changes to either the size of the actual window _or_ the size of the contained pixmap. (The latter should defend against redraw failure in the case where the puzzle aspect ratio changes, so that neither the window size nor the tile size changes but a recentre is still needed.) I _think_ this now fixes all the cases of resizing: this time I've tested making an unmaximised puzzle window bigger or smaller, and within a maximised window, forcing the puzzle to scale up, scale down, or change its aspect ratio without changing its tile size. All work, on GTK2 and GTK3, and yet we still don't get the visible flicker on status line updates that was the reason I started fiddling with this code in the first place. (We _do_ still call configure_area on every update of the status line, at least under GTK3; that's going to cause a forced full redraw on every timer tick in Mines, which is wasteful of CPU, so it would still be nice to find a better way of identifying the cases in which no resizing at all was necessary and we could avoid renewing the game drawstate. But the current code at least doesn't have any display _errors_ that I know of, which is an improvement on its previous state.)
* Produce shorter Filling descriptions by run-length encoding 0s.Jonas Kölker2015-10-18
|
* Expand keyboard input options in Bridges, for faster entry.Jonas Kölker2015-10-18
| | | | | | - Lay bridges (crosess) with Control-arrow (Shift-arrow) - Jump (non-orthogonally) to nearby islands with number keys, a..f - Mark islands as done with a single tap on the space bar
* Fix two memory leaks in GTK frontend.Jonas Kölker2015-10-18
| | | | | | | | - The file selector for loading and saving gets a g_free(). - The handling of saving (menu_save_event) gets an sfree(). - It's also slightly restructured to prevent future errors. - menu_load_event was already structured to prevent this error. - The OLD_FILESEL code seems to not need a g_free().
* Fix a typo in a Bridges error message.Jonas Kölker2015-10-18
| | | | 'contain_ER_s' becomes 'contains'.
* Fix Bridges keyboard cursor vertical out-of-bounds error.Jonas Kölker2015-10-18
| | | | | | Position the cursor in the top (bottom) row, press enter and press up (down). The game acts as if you had pressed right, both with Enter- and Space-based dragging.
* Update Sixteen keyboard system for faster entry.Jonas Kölker2015-10-18
| | | | | | | Pressing Ctrl-arrow or Shift-arrow on a tile now moves the row or column under the tile. With Ctrl, the cursor moves as well so you can keep making moves that affect the same tile; with Shift, the cursor stays put so you can keep making moves that affect the same location.
* In GTK frontend, bind mouse8/mouse9 to undo/redo.Jonas Kölker2015-10-14
| | | | | | These button codes are generated by the back/forward button pair on the sides of some mice, and web browsers treat these as the back and forward actions in the page history.
* Add hinting feature to Guess.Jonas Kölker2015-10-14
| | | | | | | | | Pressing H now suggests the lexicographically first row consistent with all previous feedback. The previous function of the H key to toggle a hold marker on the current peg is now performed by Space / CURSOR_SELECT2, which is more in line with other puzzles anyway.
* Add standalone Fifteen solver, based on the hint feature.Jonas Kölker2015-10-14
| | | | | | Recall that the hint feature is really an incremental solver. Apply it repeatedly until the board is solved. Grade puzzles as solvable or unsolvable by checking their parity.
* Add hinting feature to Fifteen (press 'h' for a hint).Jonas Kölker2015-10-14
| | | | | | | | | | This is really an incremental solver. It alternates between solving rows and solving columns. Each row and column is solved one piece at a time. Except for some temporary trickery with the last two pieces in a row or column, once a piece is solved it is never moved again. (On non-square grids it first solves some rows or some columns until the unsolved part is a square, then starts alternating.)
* Invert the Fifteen cursor if FIFTEEN_INVERT_CURSOR ~= ^[yY].*$Jonas Kölker2015-10-14
| | | | | The introduction of flip_cursor allows us to replace some hairy hand-rolled logic with the standardised and tested move_cursor.
* End victory flash on new game and restart game.Jonas Kölker2015-10-14
| | | | | | | | | | | | Net provides the best demonstration of why. Complete a game of net, then press N while the victory flash is playing: then the victory flash keeps playing on the new game board. (Tip: save a game which but for a redo is completed, then you can reproduce this repeatedly without having to complete a new game each time.) The flash timer reset code is placed together with the animation timer reset code, because the two are conceptually related. Note that midend_restart_game resets animations via midend_finish_move.
* Reset midend animation counters on starting a new game.Jonas Kölker2015-10-14
| | | | | | This is already done in midend_restart_game via midend_finish_move. If it's good enough for restarting a game, it ought to also be good enough for starting new games.
* Remove a redundant line of code.Jonas Kölker2015-10-14
| | | | | Setting me->anim_time = 0.0 right before calling midend_finish_move is redundant, since midend_finish_move itself sets me->anim_time = 0.
* Don't stop animations when restarting an already restarted game.Jonas Kölker2015-10-14
| | | | | | | | Restarting a game that is already in the restarted state is meant to be a no-op. It stopped animations. Don't do this. Also, given that midmidend_restart_game called midend_stop_anim twice, the invocation we remove was redundant.
* Stop animations on a new game, no matter how it is started.Jonas Kölker2015-10-14
| | | | | | | | Animations were stopped if a new game was initiated with a keyboard shortcut (n, N, Ctrl-N), but not via menu items such as presets or custom configurations, nor (perhaps not a problem) on starting the program. Fix this, so that animations are stopped on a new game no matter how the new game is started.
* GTK 3 cleanup: stop using GtkDialog for config boxes.Simon Tatham2015-10-04
| | | | | | | | | | | It's becoming annoying to keep working within the increasing restrictions on GtkDialog, in particular the fact that not only do we have to let it have complete control of the button area, but also it's not clear whether we can intercept a press of the 'OK' button and display an error message rather than ending the dialog. So, as I did in PuTTY, I'm resorting to using an ordinary GtkWindow with controls I laid out myself.
* GTK 3 cleanup: use GtkAboutDialog for the About box.Simon Tatham2015-10-04
| | | | | | This is again easier than faffing about doing it manually, and as an added bonus, we get to put the largest of our icons in the box as a logo :-)
* GTK 3 cleanup: use GtkMessageDialog for message_box().Simon Tatham2015-10-04
| | | | | | This is a lot easier than faffing about setting up a dialog box ourself, and also avoids direct access to GtkDialog's action area (deprecated in GTK 3.16).
* GTK 3.16 deprecation: stop using gtk_misc_set_alignment.Simon Tatham2015-10-04
| | | | | The new equivalent is gtk_label_set_{x,y}align. But we can't use that in all GTK 3 builds, because it's very new.
* Improve Towers error highlighting.Jonas Kölker2015-10-03
| | | | | | | Highlight clues of value n in Towers if its row/column contains an increasing sequence of length n, the last number of which is not equal to the number of rows/columns (i.e. such that the sequence will have to be extended, in violation of the clue).
* Dominosa: Highlight a number when pressed on the keyboard.Jonas Kölker2015-10-03
|
* Fix switching to a larger puzzle size under GTK 2.Simon Tatham2015-10-03
| | | | | | | | | | | | | Commit 8b491946e had a bug: configure_area stopped doing most of its work if the new size already matched fe->w and fe->h, but in fact the GTK2 resize_fe() _already_ set up fe->w and fe->h for the new size. I managed not to notice, because I checked it all worked on GTK 3 but only tested resizing to a _smaller_ puzzle on GTK 2. Ahem. Now we don't change fe->w and fe->h at all until configure_area is called. Also, we initialise them to dummy values at setup time, so that configure_area won't compare the new size with uninitialised data.
* build fixSimon Tatham2015-10-03
|
* Insert a manual reference in the default status bar text.Jonas Kölker2015-10-03
| | | | | | To guide developers to the resources they need. [actual wording tweaked by SGT]
* Render Filling presets as 'WxH', not 'HxW'.Jonas Kölker2015-10-03
|
* Add 'Inshi No Heya' (multiplication only) variant to Keen.Jonas Kölker2015-10-03
|
* Fix a display glitch in Keen's pencil-mode cursor.Jonas Kölker2015-10-03
| | | | | | Draw pencil-mode cursor before corners of thick lines in order to make the thick lines appear on top of the north-west corner of the pencil cursor, just like they do with the non-pencil cursor.
* Recompute solutions in Inertia if the user strays from the path.Jonas Kölker2015-10-03
|
* Fix an instance generation hang in Signpost.Jonas Kölker2015-10-03
| | | | Also expand the set of permissible parameters (add 1xN, Nx1 and 2x2).
* Greatly improve and speed up the Filling instance generation.Jonas Kölker2015-10-03
|
* Greatly increase the speed of the Filling solver.Jonas Kölker2015-10-03
|
* Towers: allow marking of clues as done with the keyboardJonas Kölker2015-10-03
|
* Allow marking of clues as exhausted in Unequal.Jonas Kölker2015-10-03
|
* Display improvements to Range.Jonas Kölker2015-10-03
| | | | | Make the grid look a lot less heavy; enhance highlighting of error clues; highlight enclosed small regions much more prettily.
* Fix a misrendering in Guess.Jonas Kölker2015-10-03
| | | | | | When the cursor was visible, redrawing after undo-redo or label toggling or resizing would draw background over the top of the circular cursor.
* Fix a memory error in Guess cursor handling.Jonas Kölker2015-10-03
|
* Cancel dragging in Pearl by pressing Escape or Backspace.Jonas Kölker2015-10-03
|
* Change Pearl's cursor logic.Jonas Kölker2015-10-03
| | | | | | Keyboard dragging while holding Control now moves the cursor to the target square. Shift-Control-arrowkey performs the previous behavior of Control-arrowkey.
* Refactor Pearl's mark_in_direction, and invert a parameter.Jonas Kölker2015-10-03
|
* Refactor modifier handling in Pearl's cursor code.Jonas Kölker2015-10-03
|