aboutsummaryrefslogtreecommitdiff
path: root/pearl.c (follow)
Commit message (Collapse)AuthorAge
...
* build fixSimon Tatham2015-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
|
* Add game_text_format to Pearl.Jonas Kölker2015-10-03
|
* Fix a typo in the comments of Pearl.Jonas Kölker2015-10-03
| | | | Each stone can have 2 lines radiating from its centre, not 3.
* Giant const patch of doom: add a 'const' to every parameter in everySimon Tatham2013-04-13
| | | | | | | | | | | | | | puzzle backend function which ought to have it, and propagate those consts through to per-puzzle subroutines as needed. I've recently had to do that to a few specific parameters which were being misused by particular puzzles (r9657, r9830), which suggests that it's probably a good idea to do the whole lot pre-emptively before the next such problem shows up. [originally from svn r9832] [r9657 == 3b250baa02a7332510685948bf17576c397b8ceb] [r9830 == 0b93de904a98f119b1a95d3a53029f1ed4bfb9b3]
* Add 'const' to the game_params arguments in validate_desc andSimon Tatham2013-04-12
| | | | | | | | | | | | new_desc. Oddities in the 'make test' output brought to my attention that a few puzzles have been modifying their input game_params for various reasons; they shouldn't do that, because that's the game_params held permanently by the midend and it will affect subsequent game generations if they modify it. So now those arguments are const, and all the games which previously modified their game_params now take a copy and modify that instead. [originally from svn r9830]
* Bring Pearl's game-completion handling in line with my usual practice:Simon Tatham2013-01-19
| | | | | | | | | the 'completed' flag is not reset if you make a new move transforming a solved game into an unsolved state, so the game won't flash again if you manually erase and redraw a line segment (though it still will if you undo and redo past the first solved state in the undo history). [originally from svn r9750]
* New rule: interpret_move() is passed a pointer to the game_drawstateSimon Tatham2012-09-09
| | | | | | | | | | | | | | | | basically just so that it can divide mouse coordinates by the tile size, but is definitely not expected to _write_ to it, and it hadn't previously occurred to me that anyone might try. Therefore, interpret_move() now gets a pointer to a _const_ game_drawstate instead of a writable one. All existing puzzles cope fine with this API change (as long as the new const qualifier is also added to a couple of subfunctions to which interpret_move delegates work), except for the just-committed Undead, which somehow had ds->ascii and ui->ascii the wrong way round but is otherwise unproblematic. [originally from svn r9657]
* Add a difficulty exception to prevent Pearl spinning forever whenSimon Tatham2012-04-08
| | | | | | asked to generate a 5x5 Tricky puzzle. (Debian bug #667963) [originally from svn r9454]
* Patch from Jonas Koelker to add keyboard control support to Pearl.Simon Tatham2012-02-19
| | | | [originally from svn r9411]
* Tweak a conditional expression in pearl.c to work around a display bugSimon Tatham2012-02-17
| | | | | | | | | | in the Java build - which turns out to be a JVM bug in OpenJDK 6, causing the NestedVM rendition of the expression (i==1?3:4) to be mis-JITed. OpenJDK 7 appears not to do that any more, but this equivalent (for these purposes) rephrasing should perturb the code just enough to dodge the problem. [originally from svn r9408]
* Fix one-character typo in r9405 which was breaking right-clicks.Simon Tatham2012-02-13
| | | | | [originally from svn r9406] [r9405 == 0c13787c2a17adc891f8e47c06b259f80bc8251a]
* David Nickerson reports odd behaviour involving a drag start pointSimon Tatham2012-02-08
| | | | | | | | | | persisting between separate mouse actions. Revamp all uses of the ndragcoords field in an attempt to stamp that out: we now distinguish between active drags (>0), a valid click but no drag yet (0), and a totally invalid situation in which all mouse activity will be ignored until the next fresh attempt (-1). [originally from svn r9405]
* David Nickerson reports that it's possible to lay a line over a 'noSimon Tatham2012-02-02
| | | | | | | | | | line here' cross mark by dragging, and furthermore, that doing so puts that grid edge into a stuck state that no UI action short of undo can get it back out of. Fix drags to stop at crosses, and fix execute_move to fault any move string that nonetheless somehow managed to try to set a line over a cross without explicitly tagging it 'R'. [originally from svn r9400]
* Move a debug statement at the end of new_clues from the caller (justSimon Tatham2012-01-31
| | | | | | | | | | after return) to the callee (just before). Might print something useful in the soak-test context (where that debug statement will now be printed and previously wasn't), but the main aim is to remove the variable 'ngen' at the main call site, which triggered a set-but-not- used warning if the debug statement that printed it was compiled out. [originally from svn r9392]
* Tweak right-click processing to be less finicky.Simon Tatham2012-01-22
| | | | [originally from svn r9381]
* New puzzle! Or rather, new-ish, because this one has been lying aroundSimon Tatham2012-01-22
in the 'unfinished' directory for a while, and has now been finished up thanks to James Harvey putting in some effort and galvanising me to put in the rest. This is 'Pearl', an implementation of Nikoli's 'Masyu'. The code in Loopy that generates a random loop along grid edges to use as the puzzle solution has been abstracted out into loopgen.[ch] so that Pearl can use it for its puzzle solutions too. I've also introduced a new utility module called 'tdq' (for 'to-do queue'). [originally from svn r9379]