aboutsummaryrefslogtreecommitdiff
path: root/untangle.c (follow)
Commit message (Collapse)AuthorAge
* Substantial infrastructure upheaval. I've separated the drawing APISimon Tatham2005-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as seen by the back ends from the one implemented by the front end, and shoved a piece of middleware (drawing.c) in between to permit interchange of multiple kinds of the latter. I've also added a number of functions to the drawing API to permit printing as well as on-screen drawing, and retired print.py in favour of integrated printing done by means of that API. The immediate visible change is that print.py is dead, and each puzzle now does its own printing: where you would previously have typed `print.py solo 2x3', you now type `solo --print 2x3' and it should work in much the same way. Advantages of the new mechanism available right now: - Map is now printable, because the new print function can make use of the output from the existing game ID decoder rather than me having to replicate all those fiddly algorithms in Python. - the new print functions can cope with non-initial game states, which means each puzzle supporting --print also supports --with-solutions. - there's also a --scale option permitting users to adjust the size of the printed puzzles. Advantages which will be available at some point: - the new API should permit me to implement native printing mechanisms on Windows and OS X. [originally from svn r6190]
* Cleanups to completion flashes: all four of these games used toSimon Tatham2005-08-05
| | | | | | | | | redraw the whole window _every_ time game_redraw() was called during a flash. Now they only redraw the whole window every time the background colour actually changes. Thanks to James H for much of the work. [originally from svn r6166]
* Cleanups from James H: a few missing statics, a precautionary castSimon Tatham2005-08-03
| | | | | | | | | or two, a debugging fix, a couple of explicit initialisations of variables that were previously read uninitialised, and a fix for a whopping great big memory leak in Slant owing to me having completely forgotten to write free_game(). [originally from svn r6159]
* The very core of cross() is capable of suffering integer overflow onSimon Tatham2005-07-24
| | | | | | | | | | | large puzzles. Resort to hand-hacked 64-bit arithmetic for doing dot products; everything else remains in `long' for the moment. (Ideally I'd auto-detect the presence of `long long' and use it in place of my cheap plastic imitation where possible, but since I currently don't have a configure mechanism that'll have to wait.) [originally from svn r6137]
* Another diagnostic mode for Untangle: if compiled withSimon Tatham2005-07-24
| | | | | | | | | `-DSHOW_CROSSINGS', it will show each edge in red if it is crossed by anything, and in black otherwise. Distracting and not particularly useful during play, but occasionally handy for debugging cross(). [originally from svn r6136]
* The `Solve' operation now rotates and/or reflects the solution gridSimon Tatham2005-07-22
| | | | | | | | | | | to bring it as close as possible to the current game state. This means that if you request `Solve' after solving a puzzle yourself, with the intention of finding out how similar your solution is to the program's, then you will mostly see the differences in _shape_ rather than those being masked by the fact that yours happened to be the other way up. [originally from svn r6126]
* The Untangle completion flash was weedy and anaemic; beef it up aSimon Tatham2005-07-20
| | | | | | | | | bit. In particular, it now flashes between _two_ specially picked colours (white and mid-grey), meaning that it should be visible even if your default background colour is white; and it also flashes twice rather than once. [originally from svn r6121]
* Switch Untangle to using `long' rather than `int' in its internalSimon Tatham2005-07-17
| | | | | | | rationals, for the sake of 16-bit-int platforms such as Palm. Thanks to James H. [originally from svn r6114]
* Two tiny cleanup patches from James H.Simon Tatham2005-07-17
| | | | [originally from svn r6111]
* New puzzle: `Untangle', cloned (with the addition of random gridSimon Tatham2005-07-16
generation) from a simple but rather fun Flash game I saw this morning. Small infrastructure change for this puzzle: while most game backends find the midend's assumption that Solve moves are never animated to be a convenience absolving them of having to handle the special case themselves, this one actually needs Solve to be animated. Rather than break that convenience for the other puzzles, I've introduced a flag bit (which I've shoved in mouse_priorities for the moment, shamefully without changing its name). [originally from svn r6097]