aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Turn off the keyboard-control cursor when the user reverts to mouseSimon Tatham2005-06-24
| | | | | | control. [originally from svn r6008]
* Change the preprocessor symbol `DEBUG' to `DEBUGGING', since theSimon Tatham2005-06-24
| | | | | | former is automatically defined by Cygwin. [originally from svn r6007]
* My background-erasing changes in r5996/r5997 caused trouble with theSimon Tatham2005-06-24
| | | | | | | | | | | | | | | keyboard-control cursors, and when I tried to fix those more wallpaper bubbles popped up elsewhere. Here's what I think is a proper fix: a comprehensive overhaul of the redraw code such that, instead of tracking the cursor positions explicitly in the drawstate, we instead track for each peg position whether or not a cursor is currently displayed at that position. So cursor erasing and cursor drawing become part of the main draw loop rather than a separate bit on the end. [originally from svn r6006] [r5996 == 3d58feb561ef09cf977f710d69a3562529e23f0f] [r5997 == a46e3266558eaf5cd18ac2a6322af65c196c3655]
* Array overflow fix from James Harvey.Simon Tatham2005-06-23
| | | | [originally from svn r6005]
* Make the `hold marker' in Guess accessible from the keyboard (`H' key, for wantJacob Nevins2005-06-23
| | | | | | of a better idea). [originally from svn r6004]
* Factual and other corrections/additions to the Guess docs.Jacob Nevins2005-06-23
| | | | [originally from svn r6003]
* Reinstate WinHelp topic now we have a manual chapter.Jacob Nevins2005-06-23
| | | | [originally from svn r6002]
* Credit James Harvey.Simon Tatham2005-06-23
| | | | [originally from svn r6000]
* James Harvey's extensions to Guess: a couple of extra game settingsSimon Tatham2005-06-23
| | | | | | plus a manual chapter. [originally from svn r5999]
* And forgot to add guess to the Unix make install target! I need a list.Simon Tatham2005-06-23
| | | | [originally from svn r5998]
* Bah, not good enough. Extend those background erases by one moreSimon Tatham2005-06-23
| | | | | | pixel. [originally from svn r5997]
* Erase backgrounds when drawing over an existing circle, for theSimon Tatham2005-06-23
| | | | | | | benefit of antialiasing platforms such as OS X. Also in this checkin, fiddle with svn:ignore (there's a new puzzle binary). [originally from svn r5996]
* Allow dragging of coloured pegs from previous guesses. AlsoSimon Tatham2005-06-23
| | | | | | | | | | | | reorganise the colours so there are fewer of those terribly computery cyan and magenta shades, and more good old-fashioned colours with simple names like orange and purple. Finally, change the `right place' marking peg colour from red to black, in line with at least _my_ old Mastermind set (I faintly suspect red marker pegs of being an Americanism) and also so that the marker pegs and the coloured pegs have no colours in common. [originally from svn r5995]
* Must outline as well as filling circles, because not all platformsSimon Tatham2005-06-23
| | | | | | can be guaranteed to draw bare filled shapes the same way. [originally from svn r5994]
* Two small fixes: add some ceil() calls to stop the puzzle shrinkingSimon Tatham2005-06-23
| | | | | | | every time I press N, and revert the help topic to NULL until some documentation materialises. [originally from svn r5993]
* `Guess', a Mastermind clone from James Harvey. This checkin alsoSimon Tatham2005-06-23
| | | | | | | | introduces a few new utility functions in misc.c, one of which is the bitmap obfuscator from Mines (which has therefore been moved out of mines.c). [originally from svn r5992]
* Introduce a front-end function to draw circles.Simon Tatham2005-06-23
| | | | [originally from svn r5991]
* This TODO comment should have been taken out in r5913 :-)Simon Tatham2005-06-22
| | | | | [originally from svn r5988] [r5913 == 02035753f817173a6861d1fc4bec437508cec42d]
* New front end functions to save and restore a region of the puzzleSimon Tatham2005-06-22
| | | | | | | | bitmap. Can be used to implement sprite-like animations: for example, useful for games that wish to implement a user interface which involves dragging an object around the playing area. [originally from svn r5987]
* Add WinHelp topicJacob Nevins2005-06-21
| | | | [originally from svn r5984]
* Patch from James Harvey in response to the new Rectangles gridSimon Tatham2005-06-21
| | | | | | | | | generator: (a) take out the `#ifdef SLOW_SYSTEM' because the new generator is much more efficient, and (b) convert another int to size_t to prevent the solver going negative in 16-bit ints as a result. [originally from svn r5983]
* Conversation with Richard and Chris yesterday gave rise to a moreSimon Tatham2005-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sensible means of generating an initial gridful of rectangles. This was previously a stupidly non-scalable bit of the Rectangles puzzle generator: it filled a ludicrously large array with every possible rectangle that could go anywhere in the grid, picked one at random and winnowed the list by removing anything that overlapped that one, then repeated until the list was empty (and therefore the grid was full except for remaining singleton squares). Total cost was O(N^4) in both time and space; not pretty. Richard and Chris's sensible alternative was to place each rectangle by randomly choosing a so-far-uncovered _square_, and then picking a random rectangle from the possible ones covering that square. This means we only have to deal with a small fragment of the rectangle list at any one time, and we don't have to store the whole lot in memory; so it's _much_ faster and more scalable, and has virtually no memory cost. A side effect of this algorithmic change is that the probability distribution has altered. When you line up all the possible _rectangles_ and pick one at random, then obviously the small ones are going to be in the majority since lots of small ones can fit into the space taken up by any given big one. So the original algorithm tends to favour fiddly grids full of lots of tiny rectangles, which don't tend to be very interesting. But if you first pick a square and then think about the rectangles that can surround that square, the small ones are suddenly going to be in the _minority_ because there are only two ways you can place (say) a 2x1 containing a given square compared to 36 ways you can place a 6x6. So this algorithm favours more large rectangles, which I generally consider to be an improvement. [originally from svn r5982]
* James Harvey's memory leak patch for Flip.Simon Tatham2005-06-19
| | | | [originally from svn r5980]
* Redraw glitch: tiles marked black (at game-over time) were notSimon Tatham2005-06-19
| | | | | | | | | | | | redrawn as non-black on undo. Introduce a new flag TILE_IMPOSSIBLE, so that information about those black markers is cached in the drawstate and we know when we have to erase them. In the process I've removed the game_state argument completely from the subfunction tile_redraw(), which gives me some confidence that it isn't getting any _more_ privileged information out of it. [originally from svn r5979]
* Just noticed yesterday that initial window sizing is broken onSimon Tatham2005-06-18
| | | | | | | | | | | Windows for puzzles with status bars, because the initial call to check_window_size is given the window size _without_ the status bar and assumes that that has to be big enough for the whole thing _with_ the status bar, so it shrinks everything by a little bit. So now we resize the window to take account of the status bar before calling check_window_size(), and the problem seems to have gone away. [originally from svn r5975]
* I've decided I didn't like the asymmetry of putting the solutionSimon Tatham2005-06-18
| | | | | | markers in the top left of the square. [originally from svn r5974]
* I'm sick of not having a `make install' target.Simon Tatham2005-06-18
| | | | [originally from svn r5973]
* Correct rogue chapter into a subheading.Simon Tatham2005-06-17
| | | | [originally from svn r5972]
* Solver for Flip.Simon Tatham2005-06-17
| | | | [originally from svn r5970]
* Infrastructure change which I've been thinking about for a while:Simon Tatham2005-06-17
| | | | | | | the back end function solve_game() now takes the _current_ game_state in addition to the initial one. [originally from svn r5969]
* Animation.Simon Tatham2005-06-17
| | | | [originally from svn r5968]
* Another new puzzle! This one isn't particularly deep or complexSimon Tatham2005-06-17
| | | | | | | | | (solving it only requires matrix inversion over GF(2), whereas several of the other puzzles in this collection are NP-complete in principle), but it's a fun enough thing to play with and is non-trivial to do in your head - especially on the hardest preset. [originally from svn r5967]
* An email conversation with Chuck Fresno turned up several forms ofSimon Tatham2005-06-17
| | | | | | | | | | | | | | symmetry which were not implemented in Solo. Now they are. In the process I've completely retired symmetry_limit() on the grounds that some of the new symmetries do not have a rectangular base region; instead I determine the base region by going through the grid and finding every square which is not transformed into a lexicographically lower square by any symmetry operation. This means that adding new symmetries is now _only_ a matter of encoding the actual transformation rules. [originally from svn r5965]
* Clean up the behaviour of drags off the edge of the grid. These haveSimon Tatham2005-06-10
| | | | | | | always been a convenient way to cancel a drag you decided was an error, but now it's more obvious that this is the case. [originally from svn r5941]
* Disable shuffle overlap checking in the special case w=h=n.Simon Tatham2005-06-10
| | | | [originally from svn r5940]
* Overzealous last-move tracking during shuffle was causing lockups onSimon Tatham2005-06-10
| | | | | | 2x2 grid generation. [originally from svn r5939]
* Patch from James Harvey to rearrange the Same Game colours.Simon Tatham2005-06-10
| | | | [originally from svn r5938]
* Patch from Chris Emerson to add a status bar to Rectangles. ApartSimon Tatham2005-06-10
| | | | | | | | | from saying `Auto-solved' or `Completed', the main function of the status bar is to track the current size of a rectangle you're dragging out, which makes life much easier when trying to count up large rectangles in 19x19 mode. [originally from svn r5937]
* GDK 2.6, in its doubtless infinite wisdom, has decided thatSimon Tatham2005-06-09
| | | | | | | | | | gdk_font_from_description() will no longer even _try_ to return a font matching the specified Pango font description; instead it will return `fixed' no matter what you do. Therefore, I've had to switch to using Pango proper for Puzzles text rendering, rather than just using Pango for font selection. [originally from svn r5936]
* Remove debug output.Jacob Nevins2005-06-08
| | | | [originally from svn r5926]
* Add Windows help topicJacob Nevins2005-06-07
| | | | [originally from svn r5923]
* Tweaks and more complete documentation for Same Game.Jacob Nevins2005-06-07
| | | | [originally from svn r5922]
* Integer overflow in game_size(). Oops.Simon Tatham2005-06-07
| | | | [originally from svn r5921]
* Chris Emerson points out that gtk_window_resize() isn't in GTK 1.2.Simon Tatham2005-06-07
| | | | | | Work around it the same way I did in PuTTY. [originally from svn r5920]
* James Harvey's patch to support keyboard control in Same Game.Simon Tatham2005-06-07
| | | | [originally from svn r5919]
* Forgot to add Same Game to the big list for OS X.Simon Tatham2005-06-07
| | | | [originally from svn r5918]
* James Harvey (again) points out an array underrun in the newSimon Tatham2005-06-07
| | | | | | clash-checking code in Solo. (valgrind confirms it.) [originally from svn r5916]
* Another James Harvey patch. This one introduces a new button codeSimon Tatham2005-06-07
| | | | | | | | | | | called `CURSOR_SELECT', intended for platforms which have a fire button to go with their cursor keys. (Apparently some Palms do.) CURSOR_SELECT is not bound to anything on any of the current three platforms, and therefore no game may rely on it being available. This checkin adds it in Net as a synonym for 'a', the keyboard-based rotate-left command. [originally from svn r5915]
* James Harvey has contributed an implementation of `Same Game', alsoSimon Tatham2005-06-07
| | | | | | known as ksame (KDE) and Same GNOME (GNOME). [originally from svn r5914]
* All the games in this collection have always defined their graphicsSimon Tatham2005-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | in terms of a constant TILE_SIZE (or equivalent). Here's a surprisingly small patch which switches this constant into a run-time variable. The only observable behaviour change should be on Windows, which physically does not permit the creation of windows larger than the screen; if you try to create a puzzle (Net makes this plausible) large enough to encounter this restriction, the Windows front end should automatically re-adjust the puzzle's tile size so that it does fit within the available space. On GTK, I haven't done this, on the grounds that X _does_ permit windows larger than the screen, and many X window managers already provide the means to navigate around such a window. Gareth said he'd rather navigate around a huge Net window than have it shrunk to fit on one screen. I'm uncertain that this makes sense for all puzzles - Pattern in particular strikes me as something that might be better off shrunk to fit - so I may have to change policy later or make it configurable. On OS X, I also haven't done automatic shrinkage to fit on one screen, largely because I didn't have the courage to address the question of multiple monitors and what that means for the entire concept :-) [originally from svn r5913]