7ba4c00b98Forgot to set up the initial value of checkboxes.
Simon Tatham
2004-05-04 10:24:08 +00:00
2f999a9a59dupstr() should take a const char *. In particular, this allows compilation under GTK 2.
Simon Tatham
2004-05-04 09:56:38 +00:00
33de1a833eNet puzzles more than 32 tiles wide weren't working properly due to me testing the wrong variables for clicks on the tile border...
Simon Tatham
2004-05-04 09:18:33 +00:00
5106190ad2Peter Maydell points out that the README misspells Makefile' as Makefile.gtk'.
Simon Tatham
2004-05-04 08:33:28 +00:00
72c581a959Add a README.
Simon Tatham
2004-05-03 13:07:43 +00:00
6dc05307d6Shell script to prepare a source distribution archive.
Simon Tatham
2004-05-03 13:03:12 +00:00
25755b09b9Add a licence file.
Simon Tatham
2004-05-03 12:48:13 +00:00
2a1b7e0dd3Redraws during undo in Sixteen had been broken by my faffing about with last_movement_sense (which was necessary to fix the animation when the grid was only 2 squares wide in either dimension). Movement sense is now inverted if the move being animated is an undo.
Simon Tatham
2004-05-03 12:12:30 +00:00
ccbf3ca6f1GTK and Windows appear to handle timers very differently: specifically, the elapsed time between calls varies much more with GTK than it does under Windows. Therefore, I now take my own time readings on every timer call, and this appears to have made the animations run at closer to the same speed between platforms. Having done that, I decided some of them were at the _wrong_ speed, and fiddled with each game's timings as well.
Simon Tatham
2004-05-03 09:43:08 +00:00
2d1d54b96bMake Return and Escape work reliably in GTK dialog boxes.
Simon Tatham
2004-05-03 09:19:34 +00:00
aa9a8e8c7eThe Windows RNG turns out to only give about 16 bits at a time. This is (a) pretty feeble, and (b) means that although Net seeds transfer between platforms and still generate the same game, there's a suspicious discrepancy in the typical seed _generated_ by each platform. I have a better RNG kicking around in this code base already, so I'll just use it. Each midend has its own random_state, which it passes to new_game_seed() as required. A handy consequence of this is that initial seed data is now passed to midend_new(), which means that new platform implementors are unlikely to forget to seed the RNG because failure to do so causes a compile error!
Simon Tatham
2004-05-03 09:10:52 +00:00
6e42ddd31bImplement selection of game seeds, by reusing the config box mechanism I've just invented (the midend handles the standard game selection configuration). Each game is now required to validate its own seed data before attempting to base a game on it and potentially confusing itself.
Simon Tatham
2004-05-03 08:51:31 +00:00
eb88ee0973`Fifteen' was getting the parity wrong on any size of board where the top left and bottom right corners didn't have the same chessboard colour.
Simon Tatham
2004-05-03 07:56:23 +00:00
e8f6124996Game configuration box for Windows, by constructing the dialog box right from scratch without the slightest reference to any dialog templates (meaning that we get to figure out the layout and _then_ choose the window size). I'm rather pleased with that. Also introduced free_cfg(), which is why this checkin touched gtk.c as well.
Simon Tatham
2004-05-03 07:52:33 +00:00
ee17149822`BOOLEAN' is a term already used by Win32. Bah. Change terminology.
Simon Tatham
2004-05-02 10:43:46 +00:00
44ff00665bConfiguration dialog box, on the GTK front end only as yet.
Simon Tatham
2004-05-01 11:32:12 +00:00
b1bfb378f4Remove arbitrary restriction on Net minimum game size. (Awww, cute 2x2! Cuter 2x1!)
Simon Tatham
2004-05-01 08:58:48 +00:00
4e5a0a3d67Wrap the status bar in a viewport, to avoid it expanding if the text doesn't fit in it. This not only looked ugly, but caused unnecessary calls to configure_area() and kept destroying the pixmap.
Simon Tatham
2004-05-01 07:53:53 +00:00
2206a1aa25The cube was being drawn slightly differently on the top and left rows, because the coordinates were crossing one or other axis at that point and so the lower coordinate was being rounded up while the upper one was rounded down. Judicious use of floor() fixes it.
Simon Tatham
2004-05-01 07:32:09 +00:00
a3c5409af2Keep the status bar in better sync with the game display.
Simon Tatham
2004-04-30 10:17:22 +00:00
17f261018aWe were forgetting to count the final move.
Simon Tatham
2004-04-30 10:14:55 +00:00
3cc2c00e69Incorrect placing of the polyhedron sometimes left it on a blue square. Oops.
Simon Tatham
2004-04-30 10:11:53 +00:00
a8c8237bd0Added a status bar.
Simon Tatham
2004-04-29 19:23:08 +00:00
fa7ef572c7Implemented text and clipping primitives in the frontend, and added two new simple games fifteen' and sixteen'.
Simon Tatham
2004-04-29 18:10:22 +00:00
4b9d755252`There's always one'. Add nullgame to .cvsignore.
Simon Tatham
2004-04-29 09:15:42 +00:00
443310b94cAdd a template file defining the null game.
Simon Tatham
2004-04-29 08:37:19 +00:00
d396382abdAdd a new game concept called a `flash'. This is a graphical effect taking non-zero time, which is triggered by the making of a move and is _not_ hurried to its conclusion by the start of the next move (so the game redraw function is expected to be able to draw it in parallel with continuing moves). The only thing that prematurely terminates a flash is the start of a fresh flash. In particular, this concept is used to display the completion flash in Net, because at least _my_ playing instincts make me lock every piece I've unambiguously placed, and hence the last turn move is instantly followed by a lock move which was previously suppressing the completion flash.
Simon Tatham
2004-04-28 18:43:50 +00:00
64e6afdeedHave each game declare a name which is used for window titles etc.
Simon Tatham
2004-04-28 17:46:04 +00:00
e96f53452aShift-click is equivalent to middle-click. This is mostly for Windows users who may not have a middle button at all, but I've replicated it in GTK to maintain cross-platform consistency.
Simon Tatham
2004-04-28 17:42:32 +00:00
3b1ec74d73Fix zillions of MSVC compiler warnings. Sigh.
Simon Tatham
2004-04-28 17:37:13 +00:00
56a59e2e51Introduce diagonal movement keys on the numeric keypad, and use them as an alternative control method in Cube. (This was a bit of hassle in the Windows front end; I also introduced a debugging framework and made TranslateMessage conditional.)
Simon Tatham
2004-04-28 17:21:57 +00:00
d37b52bde5Add .map and .rsp files to .cvsignore.
Simon Tatham
2004-04-28 12:39:39 +00:00
d44034bcf6More robust timer handling in GTK: never create a new timer when one is already active.
Simon Tatham
2004-04-28 12:34:37 +00:00
3d8e7585b7Add a menu bar, in both Windows and GTK. In particular, game modules are now expected to provide a list of `presets' (game_params plus a name) which are selectable from the menu. This means I can play both Octahedron and Cube without recompiling in between :-) While I'm here, also enabled a Cygwin makefile, which Just Worked.
Simon Tatham
2004-04-28 12:07:15 +00:00
03e4862683A-_ha_! The Windows Rectangle() call appears to get uppity if asked to draw a 1x1 rectangle, presumably on the grounds that that's beneath its dignity and you ought to be using SetPixel() instead. So now I do, and now Net actually looks exactly the same on Windows and GTK. Woo!
Simon Tatham
2004-04-27 22:49:21 +00:00
c866e24f9aMost of a Windows front end. Something's not _quite_ right in the GDI - there are blobs in the middle of powered lines in Net. But it's 99% there now.
Simon Tatham
2004-04-27 20:51:08 +00:00
786b24afc1Stop the user being able to resize the window.
Simon Tatham
2004-04-27 19:01:49 +00:00
d99e217cfbImplemented Cube, in a sufficiently general way that it also handles the tetrahedron, octahedron and icosahedron.
Simon Tatham
2004-04-27 17:44:30 +00:00
9867234e70Further general development. Net is now playable, though configuration is absent as yet.
Simon Tatham
2004-04-26 17:10:44 +00:00
a87bb05760General further development. Sketched out the mid-end, added more GTK code, rudiments of event passing.
Simon Tatham
2004-04-25 20:15:22 +00:00
3663603627Beginnings of a GTK framework. (And I do mean _beginnings_; it opens a window and that's about it.)
Simon Tatham
2004-04-25 14:45:22 +00:00
96dbb537eeInitial checkin of a portable framework for writing small GUI puzzle games.
Simon Tatham
2004-04-25 14:27:58 +00:00