aboutsummaryrefslogtreecommitdiff
path: root/map.c (follow)
Commit message (Collapse)AuthorAge
...
* 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]
* 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]
* Various patches from Ben H: a fix for an outdated comment, a coupleSimon Tatham2005-09-05
| | | | | | | of spurious ps_printf() arguments removed, and an error check in the `make install' target. [originally from svn r6275]
* I've dithered a bit in the past about whether or not it's allowableSimon Tatham2005-09-05
| | | | | | | | | | to call game_set_size() twice on the same drawstate. Finally, a definite decision: it isn't. Accordingly, midend.c arranges never to do so, the devel docs state that puzzles may enforce by assertion that it never happens, and the four puzzles which care (i.e. use blitters) do so. [originally from svn r6274]
* Patches from James H. The usual stuff (memory leak fixes and 16-bitSimon Tatham2005-09-03
| | | | | | | | | cleanliness), plus he's enlarged the pencil-mark circles from TILESIZE/8 to TILESIZE/7. Makes no difference at all (thanks to integer division) when TILESIZE is the default of 20, but presumably helps at some other tile sizes. Fine by me. [originally from svn r6265]
* James H has implemented a new `Tricky' difficulty level in Light Up:Simon Tatham2005-09-01
| | | | | | | | | | | | | | | | | | a non-recursive level above Easy, which therefore moves the recursive Hard mode further up still. Play-testing suggests that in fact Tricky is often _harder_ than the old Hard mode, since the latter had limited depth of recursion and would therefore spot complex deductions only if it happened to start a recursion on the right square; Tricky may be limited in the sophistication of its complex deductions, but it never misses one, so its puzzles tend to be hard all over. Also in this checkin, a new source file `nullfe.c', containing all the annoying stub functions required to make command-line solvers link successfully. James wrote this for (the new) lightupsolver, and I've used it to simplify the other stand-alone solvers. [originally from svn r6254]
* Ability to drag pencil marks around.Simon Tatham2005-08-31
| | | | [originally from svn r6250]
* Terribly cunning approach to making the pencil marks look nicer,Simon Tatham2005-08-31
| | | | | | thanks to Gareth. [originally from svn r6248]
* Ahem; forgot about recursion. Recursive solving now shows itsSimon Tatham2005-08-31
| | | | | | working as well. [originally from svn r6245]
* Now that Map has some seriously complex deductions, it's about timeSimon Tatham2005-08-31
| | | | | | | | | | | | it had a command-line solver. In order to do this, I've had to expose the internal region numbering because the solver has to have some way to state which region it means; and in any case it's also useful to have human-visible region numbering so that two people can discuss a puzzle they're solving together. So pressing L during play now toggles the display of region numbers; and `mapsolver' uses those same numbers when showing its working and its solutions. [originally from svn r6244]
* Forcing chains in Map give rise to a new `Hard' difficulty level.Simon Tatham2005-08-30
| | | | | | | Also implemented the Map analogue of Solo's pencil marks, to make this mode more playable. [originally from svn r6240]
* Typo in comment :-)Simon Tatham2005-08-29
| | | | [originally from svn r6236]
* Ahem. The region density at which things start to get hairy is 2/3Simon Tatham2005-08-29
| | | | | | of the grid area, not 3/2! [originally from svn r6235]
* Aesthetic improvements to the Map error indicators:Simon Tatham2005-08-29
| | | | | | | | | - the exclamation mark was a bit dot-heavy - allowing the indicator to be placed at a grid point as well as half way between two grid points allows some much more natural positioning. [originally from svn r6234]
* Unreasonable mode for Map.Simon Tatham2005-08-28
| | | | [originally from svn r6229]
* Error highlighting in Map.Simon Tatham2005-08-28
| | | | [originally from svn r6228]
* `Solve' operation on an already solved map without an aux_info wasSimon Tatham2005-08-22
| | | | | | | returning NULL due to no moves being required, leading to a strange error message. Trivial fix. [originally from svn r6198]
* 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]
* Memory leak fixes from James H.Simon Tatham2005-08-13
| | | | [originally from svn r6188]
* New puzzle: `Map'. Vaguely original, for a change.Simon Tatham2005-08-13
(This puzzle is theoretically printable, but I haven't added it in print.py since there's rather a lot of painful processing required to get from the game ID to the puzzle's visual appearance. It probably won't become printable unless I get round to implementing a more integrated printing architecture.) [originally from svn r6186]