aboutsummaryrefslogtreecommitdiff
path: root/towers.c (follow)
Commit message (Collapse)AuthorAge
* 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]
* Changed my mind about midend_is_solved: I've now reprototyped it asSimon Tatham2011-06-19
| | | | | | | | | | | | | | | | midend_status(), and given it three return codes for win, (permanent) loss and game-still-in-play. Depending on what the front end wants to use it for, it may find any or all of these three states worth distinguishing from each other. (I suppose a further enhancement might be to add _non_-permanent loss as a fourth distinct status, to describe situations in which you can't play further without pressing Undo but doing so is not completely pointless. That might reasonably include dead-end situations in Same Game and Pegs, and blown-self-up situations in Mines and Inertia. However, I haven't done this at present.) [originally from svn r9179]
* Fix warnings generated by gcc 4.6.0 about variables set but notSimon Tatham2011-05-04
| | | | | | | | | | thereafter read. Most of these changes are just removal of pointless stuff or trivial reorganisations; one change is actually substantive, and fixes a bug in Keen's clue selection (the variable 'bad' was unreferenced not because I shouldn't have set it, but because I _should_ have referenced it!). [originally from svn r9164]
* Add a function to every game backend which indicates whether a gameSimon Tatham2011-04-02
| | | | | | | | | | | state is in a solved position, and a midend function wrapping it. (Or, at least, a situation in which further play is pointless. The point is, given that game state, would it be a good idea for a front end that does that sort of thing to proactively provide the option to start a fresh game?) [originally from svn r9140]
* Highlight the sides as well as the top of a tower when it'sSimon Tatham2010-01-16
| | | | | | | | | selected. I think this is a more or less aesthetically neutral change for the actual selection, but the selection code is reused to draw the victory flash and that's greatly improved by not having the tower sides remain unflashed. [originally from svn r8843]
* Add a couple more checks to the 3d collision detection, withoutSimon Tatham2010-01-12
| | | | | | | which a click miles above the invisible RH surface of a tower would sometimes select that tower. [originally from svn r8833]
* The 3-D graphics in Towers need a corresponding change on the inputSimon Tatham2010-01-11
| | | | | | | | | | side: instead of locating a mouse click in whichever base grid square contained the click location, we should check to see if a tower protrudes on to that location from a neighbouring square. That way, a click should reliably activate the tower that was actually drawn under the mouse pointer. [originally from svn r8826]
* Oops! Remove evidence of blatant clone-and-hack from Keen. :-)Simon Tatham2010-01-11
| | | | [originally from svn r8825]
* Upgrade the graphics in Towers to include a thematically appropriateSimon Tatham2010-01-07
| | | | | | | | | 3D effect. (I only committed it without so that I could preserve a record of how the code looked before I added it.) The 3D effect can be disabled by setting TOWERS_2D in the environment, should anybody seriously dislike it. [originally from svn r8817]
* New puzzle, again using the revised latin.c: 'Towers', a clone of aSimon Tatham2010-01-07
latin-square puzzle which I've seen described by several names but the most common is 'Skyscrapers'. [originally from svn r8816]