Commit Graph

  • d35f64096d Twiddle now has an additional mode in which tile orientation matters. This mode is hard enough to scare the wossnames out of me, but that's no reason not to put it in anyway! Simon Tatham 2005-04-30 14:14:14 +00:00
  • f5ae256b77 Pango-derived fonts seem to generally look better if I ask for them in bold. Simon Tatham 2005-04-30 13:11:22 +00:00
  • 3be19aed94 New puzzle: `twiddle', generalised from a random door-unlocking gadget in Metroid Prime 2. Simon Tatham 2005-04-30 12:54:22 +00:00
  • 79a77d53e1 Added a `--generate' command-line option in the GTK port of every puzzle, to make it construcct puzzle IDs and output them on stdout. Also checked in print.py, a script which reads puzzle IDs on stdin and produces PostScript output. With these, you can generate pages of Pattern, Rectangles and Solo puzzles to take on trains with you. Simon Tatham 2005-04-29 17:07:19 +00:00
  • d55d0b53f3 Correct block coordinate display when standalone solver shows its working. Simon Tatham 2005-04-29 08:11:01 +00:00
  • df133c2297 Aha, even better: a Makefile hack that causes auto-detection of GTK 2 and fallback to GTK 1.2. Simon Tatham 2005-04-28 12:50:56 +00:00
  • 3d4f276f1f Fix inconsistent vertical centring of text in GTK (and update Solo's todo list, which complained about this because Solo was the only puzzle noticeably affected). Simon Tatham 2005-04-27 19:44:34 +00:00
  • 37a0c1af6a Patches for GTK 2. Puzzles already _built_ under GTK 2, but now it builds better: - the GTK makefile now defines $(GTK_CONFIG) which you can override, so you can build for GTK 2 with no makefile-editing simply by running `make GTK_CONFIG="pkg_config gtk+-2.0"' - we use Pango to find appropriate fonts, which means the text in the puzzles actually (gasp!) adapts its size to the circumstances. Unfortunately, I've been unable to do this portably without depending on _either_ a Pango function that isn't present in older versions _or_ the underlying window system being X11; I'd appreciate someone doing better. Simon Tatham 2005-04-27 19:39:20 +00:00
  • 8b31b4606c Command-line solver was dividing up non-square puzzles the wrong way round. Simon Tatham 2005-04-27 16:59:18 +00:00
  • 4ba97c64fe Pattern also contains an internal solver, so here's a command-line interface to it just in case it comes in handy. Simon Tatham 2005-04-27 11:13:33 +00:00
  • 37ad6698a5 The command-line solver's difficulty gradings now use the same terminology as the puzzle GUI. Simon Tatham 2005-04-26 17:03:56 +00:00
  • 070fb537cf Implement the remaining modes of reasoning in nsolve, and thus enable configurable puzzle difficulty. I'm only generating grids up to Times level (complicated non-recursive analysis but guessing never required); I wouldn't object to providing a Telegraph difficulty level (guessing required) but it turns out to be very hard indeed to generate at random. I might still add it later (probably under the name `Unreasonable' :-) if I can think of an efficient way to find them. Simon Tatham 2005-04-26 11:19:00 +00:00
  • 22ab2c0b82 Fix trivial UI glitch involving clicking on the border outside the grid. I'm really starting to get annoyed by the default round- towards-zero behaviour of C integer division. Simon Tatham 2005-04-26 08:20:25 +00:00
  • 80129693bb Remove some legacy debugging code which was breaking the MinGW build, and which is redundant given the new standalone solver functionality. Simon Tatham 2005-04-25 14:37:33 +00:00
  • 0fffbf32db Oops; _actually_ add the reasoning mode I mentioned in the last checkin. Simon Tatham 2005-04-25 14:17:14 +00:00
  • a163926ed5 Various changes prompted by my boss taking an interest: - added a compilation option -DSTANDALONE_SOLVER which makes both of Solo's internal solvers accessible from the command line. - fix a bug in nsolve turned up by testing in this mode: it failed to iterate at all! Oddly, this massive improvement to the effectiveness of nsolve hasn't emptied the generated grids by very much. - add an extra mode of reasoning to my to-do list (which is the dual of one already there, so I'm kicking myself). Simon Tatham 2005-04-25 14:03:53 +00:00
  • 6bf62f4577 Outstandingly cute mathematical transformation which allows me to lose a lot of code duplication in nsolve while preserving efficiency. Simon Tatham 2005-04-24 10:06:47 +00:00
  • f5138782b1 Introduce configurable symmetry type in generated puzzles, and drop the default symmetry from order-4 down to order-2, which seems to mitigate the excessively-full-grid problem by permitting more freedom to remove stuff. Simon Tatham 2005-04-24 09:21:57 +00:00
  • 3346ae2e54 Doc tweaks for Solo. Jacob Nevins 2005-04-23 18:16:54 +00:00
  • c7085f0ffb Simplify clip region handling under Windows, which also makes Solo's clipping policy work properly. I haven't proved why it didn't work the previous way, but I have a good guess: I think that clip regions are handled by reference. So I saved the old clip region out of the DC, then did an IntersectClipRect, and then selected the old clip region back in again - but the old clip region had never been _de_-selected, because IntersectClipRect didn't change which object was selected but rather it modified-in-place the one that already was selected. So my attempt to restore the old clip region did nothing whatsoever, and thus clipping to two different rectangles during the same draw sequence failed. Now I'm completely destroying the clip region during unclip(), which seems to work better. Simon Tatham 2005-04-23 17:09:19 +00:00
  • 5b1235c369 Visual C points out a couple of typos. Simon Tatham 2005-04-23 16:41:35 +00:00
  • 0c55b7e16f Initial checkin of Solo', the number-placing puzzle popularised by the Times under the name Sudoku'. Simon Tatham 2005-04-23 16:35:28 +00:00
  • 134418abf7 Oops. Just noticed that the Windows front end completely ignores the `colour' parameter in draw_text(). Simon Tatham 2005-03-15 14:24:45 +00:00
  • f64dcb909d Stop the Pattern grid generation from generating an entire row or column of the same colour (at least when the dimensions are big enough to make this feasible). It's a little bit too easy otherwise! Simon Tatham 2005-02-24 09:13:06 +00:00
  • e500ef9637 Fixes in grid generation for pedantic special cases when one or both grid dimensions are very small. Simon Tatham 2005-02-24 08:13:32 +00:00
  • 1c05db3fb5 I've found NSView's setNeedsDisplayInRect: method, which is obviously better than just calling setNeedsDisplay on the whole thing... Simon Tatham 2005-02-05 16:43:13 +00:00
  • c7b06e9c3a Need to impose a _maximum_ width on edit boxes, as well as a minimum width; if allowed to resize to the text within them, they look terribly silly when containing an entire Rectangles or Pattern game ID. Simon Tatham 2005-01-25 21:19:28 +00:00
  • e4306a6036 Sanitising the mouse input data was a good idea, but my implementation sucked. Revise it completely. Simon Tatham 2005-01-25 18:07:08 +00:00
  • 8b91de196c Include code in midend.c to sanitise streams of mouse events so that back ends can be assured of always receiving them in a sensible sequence (button-down, followed by zero or more drags, followed by button-up, and never changing button in the middle of such a sequence). I have a suspicion this issue was the cause of the mysterious Pattern grid updates seen by Dan during testing last night. Simon Tatham 2005-01-25 14:07:46 +00:00
  • 8ae25046d8 Ahem. Lots of stuff, including the new OS X sources, was being left out of the tarball by makedist.sh, causing the downloaded source tree to fail mkfiles.pl. Worse still, the GTK Makefile wasn't included, so people _needed_ to run mkfiles.pl! Both now fixed, I think. Simon Tatham 2005-01-25 09:07:54 +00:00
  • a88d1a459c Updates for OS X port (including updating copyright statements). Simon Tatham 2005-01-24 15:45:37 +00:00
  • 0f323c585f Ahem. Rogue copy and paste was causing preset menu items to go into the Help menu rather than the Type menu. Fixed. Simon Tatham 2005-01-24 14:10:16 +00:00
  • 9aff566286 `make release' target, which builds a .dmg disk image in what appears to be the approved Apple fashion. Simon Tatham 2005-01-24 13:44:24 +00:00
  • 895844a9d9 Help should have the shortcut Command-?. Simon Tatham 2005-01-24 13:04:37 +00:00
  • 1c47f2b553 Improve OS X help: split back up into multiple files (thanks to Halibut's new \cfg{html-local-head} directive), and add some CSS to mimic the font choices of system help files. Simon Tatham 2005-01-24 13:00:11 +00:00
  • b10be2b32a The #definition of COMBINED was done very badly: it was a piece of platform-dependent code in puzzles.h (ick), which in turn depended on the magic symbol MAC_OS_X being defined by mkfiles.pl itself (yuck). Suddenly realised I can do much better simply by putting it in an OS X makefile extras section in Recipe, and removing both previous hacks. Much nicer. Simon Tatham 2005-01-24 12:09:51 +00:00
  • 2040ff9631 First cut at online help under OS X. I just built the HTML version of the manual using Halibut (with one additional magic tag in the <HEAD> section), stuck it in the right part of the application bundle, referenced it in Info.plist, and added a Help menu. Everything else was automatic. Not bad! Simon Tatham 2005-01-24 12:05:21 +00:00
  • d8eb0de7c2 The main grid outline in Pattern was asymmetric between the top/left edges and the bottom/right ones. Fix it. (Also remove it from the todo list in osx.m, where I had entered it in the assumption that it was a bug in my new OS X port! Turns out it's an entirely platform- independent bug.) Simon Tatham 2005-01-24 10:50:17 +00:00
  • df155680f2 Fix two window-resizing bugs introduced by the addition of the status bar. Simon Tatham 2005-01-24 10:45:23 +00:00
  • 6b89284c0e Improve fatal error handling. Simon Tatham 2005-01-24 10:35:54 +00:00
  • d90e909d66 Added a dock menu which makes it more convenient to launch a new game window. Simon Tatham 2005-01-24 07:42:01 +00:00
  • 5b695b8d8b Status bar support. Simon Tatham 2005-01-24 07:37:50 +00:00
  • bcbee006c5 Implemented the configurable dialog box mechanism, allowing custom game sizes and entering of specific game IDs. I think this is now a plausibly usable port, even if still by no means _finished_. Simon Tatham 2005-01-23 22:28:18 +00:00
  • 0ae8782bc6 Added a framework for putting things other than the binary into a Mac OS X application bundle, and provided an icon for Puzzles. Simon Tatham 2005-01-23 11:20:31 +00:00
  • f80d9c6d49 Ah, no, _that_ fixes the malloc problem. I'd forgotten that midend.c already takes care of managing the allocation of game presets, so there's no need for me to introduce scary ObjC machinery to do so in the frontend. Simon Tatham 2005-01-23 09:59:45 +00:00
  • fa9f4f4522 I _think_ this has just fixed an uninitialised-memory bug, but I'm not sure. Simon Tatham 2005-01-23 09:37:16 +00:00
  • c166bdc645 Dynamically frob the menu bar to achieve selection of game presets. Simon Tatham 2005-01-23 09:17:46 +00:00
  • d85a505463 Flesh out the menus a bit. Simon Tatham 2005-01-23 08:36:24 +00:00
  • 84a73c30ac Update TODO. Simon Tatham 2005-01-22 18:46:51 +00:00
  • 11dad948a3 Initial checkin of a Mac OS X port of puzzles, using Cocoa. All puzzles are compiled together into a single monolithic application which allows you to select each one from one of its menus. Simon Tatham 2005-01-22 18:34:18 +00:00
  • a99de1be8f Arrange that we really _can_ compile all the puzzles into a single binary if we choose: fix bugs in cube.c and sixteen.c that manifest when compiled that way, and introduce list.c which provides a global list of all the available puzzles. Simon Tatham 2005-01-22 15:29:01 +00:00
  • cc54553226 Rather than each game backend file exporting a whole load of functions and a couple of variables, now each one exports a single structure containing a load of function pointers and said variables. This should make it easy to support platforms on which it's sensible to compile all the puzzles into a single monolithic application. The two existing platforms are still one-binary-per-game. Simon Tatham 2005-01-17 13:48:57 +00:00
  • 46fa25240e Add a jumble' key (J') to Net, which scrambles the positions of all unlocked tiles randomly. (Rachel asked for this; it's been being tested for a good few months now, and Simon didn't care either way, so in it goes :) Jacob Nevins 2004-12-22 19:27:26 +00:00
  • ec3d23c9d9 Add grotty casts to prevent negative -> large positive conversion of cursor position in Windows frontend; this showed up as a UI glitch while dragging to the left/top of the window in Rectangles. Jacob Nevins 2004-12-17 22:00:20 +00:00
  • 6f62e91d51 Tweak Pattern doc for consistency with other puzzles. Jacob Nevins 2004-12-08 13:42:55 +00:00
  • b18c86241d Bah; r4954 introduced an array overrun. Simon Tatham 2004-12-08 09:37:57 +00:00
  • 47e9419452 Game completion detection was occasionally failing to spot a lingering GRID_UNKNOWN, causing it to declare victory too soon. Simon Tatham 2004-12-08 08:08:00 +00:00
  • 03e455c2c6 New puzzle: `pattern'. Simon Tatham 2004-12-07 20:00:58 +00:00
  • 150b1e66de Move MODULE files out of individual project directories into a MODULES top-level directory, which is where the Tartarus website scripts will (hopefully) start reading them from. Simon Tatham 2004-11-18 11:30:39 +00:00
  • 9c49948892 Remove .cvsignore files on all active branches. Simon Tatham 2004-11-16 15:29:14 +00:00
  • f99b527b54 Move the deactivate_timer() call from window_destroy() into destroy(). I'm not sure how it cured the crash-on-quit bug, since it was in completely the wrong place! Simon Tatham 2004-09-06 15:17:59 +00:00
  • 1dc9cf5811 Deactivate the timer when we destroy the puzzle window. Otherwise it might run again in mid-shutdown and cause chaos, if you hit `q' in the middle of an animated sequence such as the Net finishing flash. Simon Tatham 2004-09-01 11:46:51 +00:00
  • a7b1697b1c Now we have the `dir' parameter, we should use it where it makes sense to do so. Simon Tatham 2004-08-17 19:59:14 +00:00
  • ae63b8010b Remove extraneous underscores at start and end of Rectangles seeds. Simon Tatham 2004-08-17 11:51:20 +00:00
  • 2b392a9d5a Net's redraw function now uses the `dir' argument to determine whether it's redrawing an undo. Seems to work. Jacob Nevins 2004-08-16 16:51:18 +00:00
  • daac529a9e After discussion with Simon, the game redraw functions are now passed a new argument `dir' which tells them whether this redraw is due to an undo, rather than have them second-guess it from game state. Note that none of the actual games yet take advantage of this; so it hasn't been tested in anger (although it has been inspected by debugging). Jacob Nevins 2004-08-16 16:29:54 +00:00
  • f1e8a586b5 UI nit: make cursor visible upon use of A/S/D keyboard controls. Jacob Nevins 2004-08-16 13:54:41 +00:00
  • 306f69868b This repository needs to have a copy of mkfiles.pl, although really I'd prefer to be able to share a single instance with PuTTY. Simon Tatham 2004-08-16 13:52:06 +00:00
  • 59be96c1d7 Clarify that difficulty does not increase forever as you increase the expansion factor... Simon Tatham 2004-08-16 13:17:40 +00:00
  • 58769376e5 Robustness in the face of a completely configurable expansion factor. Simon Tatham 2004-08-16 13:10:07 +00:00
  • fa8cc94e45 Moved my puzzle collection out into ixion's main CVS area, so here's a MODULE file. Simon Tatham 2004-08-16 12:45:35 +00:00
  • f825732316 Just for convenience, a docs Makefile, outside the main mkfiles.pl structure. Simon Tatham 2004-08-16 12:43:03 +00:00
  • d58d5c11d5 Fold in the expanded-grid mechanism for generating different kinds of puzzle. Configurable option, turned off by default, and not propagated in game IDs (though you can explicitly specify it in command-line parameters, and the docs explain how). Simon Tatham 2004-08-16 12:42:11 +00:00
  • 137c1d7bbd Added a help file, mostly thanks to Jacob. Simon Tatham 2004-08-16 12:23:56 +00:00
  • f2c240343f Failed to connect up the `destroy' signal in error_box(), causing gtk_main_quit not to get called, with the result that the whole game ended up running one gtk_main level lower down. This meant that final dialog box processing was not performed, so that (for example) selecting 1x1 in Net, hitting OK and getting an error box, then selecting a different size and hitting OK again failed to change to the new size. Simon Tatham 2004-07-30 12:16:57 +00:00
  • d98160f4cb HACKING should be in .cvsignore. Simon Tatham 2004-07-05 10:32:26 +00:00
  • 8158b5350d Richard B's utterly evil `netslide': cross between Net and Sixteen. Simon Tatham 2004-05-26 09:07:14 +00:00
  • 8b9dedcf75 Added the beginnings of a hacking guide. Simon Tatham 2004-05-24 13:07:28 +00:00
  • 9b71ae8fd7 makedist.sh should be silent. Simon Tatham 2004-05-22 13:08:18 +00:00
  • fc862ce0f2 Fix a memory leak. Simon Tatham 2004-05-22 13:07:23 +00:00
  • 61f08e7634 Now that we have string-encodable game parameters, let's support a command-line argument which is either a set of parameters or a params+seed game ID. Simon Tatham 2004-05-20 08:22:49 +00:00
  • 350683b253 Introduce routines in each game module to encode a set of game parameters as a string, and decode it again. This is used in midend.c to prepend the game parameters to the game seed, so that copying out of the Specific box is sufficient to completely specify the game you were playing. Throughout development of these games I have referred to seed' internally, and game ID' externally. Now there's a measurable difference between them! :-) Simon Tatham 2004-05-19 11:57:09 +00:00
  • ba076fbdb2 Fix `visible' calculation (again). Simon Tatham 2004-05-12 18:54:16 +00:00
  • 3c2a320143 Ahem. Seed validation was completely broken. Simon Tatham 2004-05-12 18:53:47 +00:00
  • 1ea3c92c17 During redraws, I now do corner analysis centrally, which enables me to maintain the `visible' array accurately and hence actually switch it on. This prevents us having to redraw the entire playing area on any move, which means really big grids are now sensibly playable without display lag. Simon Tatham 2004-05-12 18:45:11 +00:00
  • 3f9e52dae2 Remove vestigial code from the previous attempt at clever grid generation. Grid generation should now be orders of magnitude faster at large sizes. Simon Tatham 2004-05-12 18:28:11 +00:00
  • 0579ca1005 Fiddle with the coordinate system to see if I can improve user experience. Simon Tatham 2004-05-12 12:33:03 +00:00
  • 87aec91b37 Flash on completion. Two people actually complained! :-) Simon Tatham 2004-05-12 12:32:27 +00:00
  • 3ccdce2f6c Missing draw_update call. Simon Tatham 2004-05-11 23:22:08 +00:00
  • 97493ac8d1 Rename the Windows Net executable, due to its clash with the system net.exe. Simon Tatham 2004-05-11 19:32:05 +00:00
  • ed9b669b29 Now we have the UI abstraction, use it to implement keyboard control in Net. Simon Tatham 2004-05-11 19:24:22 +00:00
  • a03b4b467f And I _always_ forget to clear the background when first drawing the display of a new game, so I'll add it to nullgame.c and hope that makes me remember it next time! Simon Tatham 2004-05-11 18:46:36 +00:00
  • 8a67b0ed2c Cosmetic fixes for Windows. Simon Tatham 2004-05-11 18:46:10 +00:00
  • cdfc740fe4 Don't rush move animation to a conclusion on a subsequent keypress unless there's actual activity happening as a result of the move. Net animations were tending to get rushed to conclusion by the mouse button release now that it's being reported to the mid-end. Simon Tatham 2004-05-11 18:37:20 +00:00
  • eb8a374d0d We should turn off the dragging variables in the UI _whenever_ `enddrag' is TRUE, not just when the end of the drag was within a sensible range. Simon Tatham 2004-05-11 18:32:48 +00:00
  • e5d773604f Rectangles is now actually playable, since I've used the new UI feature to arrange a mechanism that allows you to draw a whole rectangle at a time by dragging rather than having to click each edge individually. Simon Tatham 2004-05-11 18:29:49 +00:00
  • a8a50014e9 Oops - missed a bit in the GTK front end :-) Simon Tatham 2004-05-11 17:45:45 +00:00
  • 180802b362 Framework alteration: we now support a game_ui' structure in addition to the game_state'. The new structure is intended to contain ephemeral data pertaining to the game's user interface rather than the actual game: things stored in the UI structure are not restored in an Undo, for example. make_move() is passed the UI to modify as it wishes; it is now allowed to return the _same_ game_state it was passed, to indicate that although no move has been made there has been a UI operation requiring a redraw. Simon Tatham 2004-05-11 17:44:30 +00:00
  • a1c88470a3 Added a new game, `Rectangles', taken from nikoli.co.jp. Simon Tatham 2004-05-11 17:06:50 +00:00
  • 20921e613e Forgot to initialise the font variables in the Windows frontend structure. Simon Tatham 2004-05-04 11:20:47 +00:00