108 Commits

Author SHA1 Message Date
b10be2b32a The #definition of COMBINED was done very badly: it was a piece of
platform-dependent code in puzzles.h (ick), which in turn depended
on the magic symbol MAC_OS_X being defined by mkfiles.pl itself
(yuck). Suddenly realised I can do much better simply by putting it
in an OS X makefile extras section in Recipe, and removing both
previous hacks. Much nicer.

[originally from svn r5191]
2005-01-24 12:09:51 +00:00
2040ff9631 First cut at online help under OS X. I just built the HTML version
of the manual using Halibut (with one additional magic tag in the
<HEAD> section), stuck it in the right part of the application
bundle, referenced it in Info.plist, and added a Help menu.
Everything else was automatic. Not bad!

[originally from svn r5190]
2005-01-24 12:05:21 +00:00
d8eb0de7c2 The main grid outline in Pattern was asymmetric between the top/left
edges and the bottom/right ones. Fix it. (Also remove it from the
todo list in osx.m, where I had entered it in the assumption that it
was a bug in my new OS X port! Turns out it's an entirely platform-
independent bug.)

[originally from svn r5187]
2005-01-24 10:50:17 +00:00
df155680f2 Fix two window-resizing bugs introduced by the addition of the status bar.
[originally from svn r5186]
2005-01-24 10:45:23 +00:00
6b89284c0e Improve fatal error handling.
[originally from svn r5185]
2005-01-24 10:35:54 +00:00
d90e909d66 Added a dock menu which makes it more convenient to launch a new
game window.

[originally from svn r5184]
2005-01-24 07:42:01 +00:00
5b695b8d8b Status bar support.
[originally from svn r5183]
2005-01-24 07:37:50 +00:00
bcbee006c5 Implemented the configurable dialog box mechanism, allowing custom
game sizes and entering of specific game IDs. I think this is now a
plausibly usable port, even if still by no means _finished_.

[originally from svn r5182]
2005-01-23 22:28:18 +00:00
0ae8782bc6 Added a framework for putting things other than the binary into a
Mac OS X application bundle, and provided an icon for Puzzles.

Also renamed the OS X source file from macosx.m to osx.m, so that it
can sit beside other things such as osx-info.plist and not cause
enormously long filenames.

[originally from svn r5179]
2005-01-23 11:20:31 +00:00
f80d9c6d49 Ah, no, _that_ fixes the malloc problem. I'd forgotten that midend.c
already takes care of managing the allocation of game presets, so
there's no need for me to introduce scary ObjC machinery to do so in
the frontend.

[originally from svn r5178]
2005-01-23 09:59:45 +00:00
fa9f4f4522 I _think_ this has just fixed an uninitialised-memory bug, but I'm
not sure.

[originally from svn r5177]
2005-01-23 09:37:16 +00:00
c166bdc645 Dynamically frob the menu bar to achieve selection of game presets.
[originally from svn r5176]
2005-01-23 09:17:46 +00:00
d85a505463 Flesh out the menus a bit.
[originally from svn r5175]
2005-01-23 08:36:24 +00:00
84a73c30ac Update TODO.
[originally from svn r5174]
2005-01-22 18:46:51 +00:00
11dad948a3 Initial checkin of a Mac OS X port of puzzles, using Cocoa. All
puzzles are compiled together into a single monolithic application
which allows you to select each one from one of its menus.

[originally from svn r5173]
2005-01-22 18:34:18 +00:00
a99de1be8f Arrange that we really _can_ compile all the puzzles into a single
binary if we choose: fix bugs in cube.c and sixteen.c that manifest
when compiled that way, and introduce list.c which provides a global
list of all the available puzzles.

[originally from svn r5169]
2005-01-22 15:29:01 +00:00
cc54553226 Rather than each game backend file exporting a whole load of
functions and a couple of variables, now each one exports a single
structure containing a load of function pointers and said variables.
This should make it easy to support platforms on which it's sensible
to compile all the puzzles into a single monolithic application. The
two existing platforms are still one-binary-per-game.

[originally from svn r5126]
2005-01-17 13:48:57 +00:00
46fa25240e Add a jumble' key (J') to Net, which scrambles the positions of all unlocked
tiles randomly. (Rachel asked for this; it's been being tested for a good few
months now, and Simon didn't care either way, so in it goes :)

As part of this, the front end can now be asked to provide a random random
seed (IYSWIM).

[originally from svn r5019]
2004-12-22 19:27:26 +00:00
ec3d23c9d9 Add grotty casts to prevent negative -> large positive conversion of cursor
position in Windows frontend; this showed up as a UI glitch while dragging to
the left/top of the window in Rectangles.

[originally from svn r5007]
2004-12-17 22:00:20 +00:00
6f62e91d51 Tweak Pattern doc for consistency with other puzzles.
[originally from svn r4957]
2004-12-08 13:42:55 +00:00
b18c86241d Bah; r4954 introduced an array overrun.
[originally from svn r4955]
[r4954 == 47e9419452a9fca895f1c84412ab1040d1aa86a5]
2004-12-08 09:37:57 +00:00
47e9419452 Game completion detection was occasionally failing to spot a
lingering GRID_UNKNOWN, causing it to declare victory too soon.

[originally from svn r4954]
2004-12-08 08:08:00 +00:00
03e455c2c6 New puzzle: `pattern'.
[originally from svn r4953]
2004-12-07 20:00:58 +00:00
150b1e66de Move MODULE files out of individual project directories into a
MODULES top-level directory, which is where the Tartarus website
scripts will (hopefully) start reading them from.

[originally from svn r4813]
[this svn revision also touched charset,enigma,filter,halibut,putty,pycee,sdlgames,timber]
2004-11-18 11:30:39 +00:00
9c49948892 Remove .cvsignore files on all active branches.
[originally from svn r4788]
[this svn revision also touched bmbm,caltrap,charset,enigma,filter,fonts,golem,grunge,halibut,html,lj,local,misc,polyhedra,putty,putty-website,putty-wishlist,pycee,sdlgames,svn-tools,timber,tweak]
2004-11-16 15:29:14 +00:00
f99b527b54 Move the deactivate_timer() call from window_destroy() into
destroy(). I'm not sure how it cured the crash-on-quit bug, since it
was in completely the wrong place!

[originally from svn r4533]
2004-09-06 15:17:59 +00:00
1dc9cf5811 Deactivate the timer when we destroy the puzzle window. Otherwise it
might run again in mid-shutdown and cause chaos, if you hit `q' in
the middle of an animated sequence such as the Net finishing flash.

[originally from svn r4525]
2004-09-01 11:46:51 +00:00
a7b1697b1c Now we have the `dir' parameter, we should use it where it makes
sense to do so.

[originally from svn r4477]
2004-08-17 19:59:14 +00:00
ae63b8010b Remove extraneous underscores at start and end of Rectangles seeds.
[originally from svn r4473]
2004-08-17 11:51:20 +00:00
2b392a9d5a Net's redraw function now uses the `dir' argument to determine whether it's
redrawing an undo. Seems to work.

[originally from svn r4470]
2004-08-16 16:51:18 +00:00
daac529a9e After discussion with Simon, the game redraw functions are now passed a new
argument `dir' which tells them whether this redraw is due to an undo, rather
than have them second-guess it from game state.
Note that none of the actual games yet take advantage of this; so it hasn't
been tested in anger (although it has been inspected by debugging).

[originally from svn r4469]
2004-08-16 16:29:54 +00:00
f1e8a586b5 UI nit: make cursor visible upon use of A/S/D keyboard controls.
[originally from svn r4467]
2004-08-16 13:54:41 +00:00
306f69868b This repository needs to have a copy of mkfiles.pl, although really
I'd prefer to be able to share a single instance with PuTTY.

[originally from svn r4466]
2004-08-16 13:52:06 +00:00
59be96c1d7 Clarify that difficulty does not increase forever as you increase
the expansion factor...

[originally from svn r4465]
2004-08-16 13:17:40 +00:00
58769376e5 Robustness in the face of a completely configurable expansion factor.
[originally from svn r4464]
2004-08-16 13:10:07 +00:00
fa8cc94e45 Moved my puzzle collection out into ixion's main CVS area, so here's
a MODULE file.

[originally from svn r4463]
2004-08-16 12:45:35 +00:00
f825732316 Just for convenience, a docs Makefile, outside the main mkfiles.pl
structure.

[originally from svn r4462]
2004-08-16 12:43:03 +00:00
d58d5c11d5 Fold in the expanded-grid mechanism for generating different kinds
of puzzle. Configurable option, turned off by default, and not
propagated in game IDs (though you can explicitly specify it in
command-line parameters, and the docs explain how).

[originally from svn r4461]
2004-08-16 12:42:11 +00:00
137c1d7bbd Added a help file, mostly thanks to Jacob.
[originally from svn r4460]
2004-08-16 12:23:56 +00:00
f2c240343f Failed to connect up the `destroy' signal in error_box(), causing
gtk_main_quit not to get called, with the result that the whole game
ended up running one gtk_main level lower down. This meant that
final dialog box processing was not performed, so that (for example)
selecting 1x1 in Net, hitting OK and getting an error box, then
selecting a different size and hitting OK again failed to change to
the new size.

[originally from svn r4376]
2004-07-30 12:16:57 +00:00
d98160f4cb HACKING should be in .cvsignore.
[originally from svn r4322]
2004-07-05 10:32:26 +00:00
8158b5350d Richard B's utterly evil `netslide': cross between Net and Sixteen.
[originally from svn r4257]
2004-05-26 09:07:14 +00:00
8b9dedcf75 Added the beginnings of a hacking guide.
[originally from svn r4255]
2004-05-24 13:07:28 +00:00
9b71ae8fd7 makedist.sh should be silent.
[originally from svn r4240]
2004-05-22 13:08:18 +00:00
fc862ce0f2 Fix a memory leak.
[originally from svn r4239]
2004-05-22 13:07:23 +00:00
61f08e7634 Now that we have string-encodable game parameters, let's support a
command-line argument which is either a set of parameters or a
params+seed game ID.

[originally from svn r4234]
2004-05-20 08:22:49 +00:00
350683b253 Introduce routines in each game module to encode a set of game
parameters as a string, and decode it again. This is used in
midend.c to prepend the game parameters to the game seed, so that
copying out of the Specific box is sufficient to completely specify
the game you were playing.
Throughout development of these games I have referred to `seed'
internally, and `game ID' externally. Now there's a measurable
difference between them! :-)

[originally from svn r4231]
2004-05-19 11:57:09 +00:00
ba076fbdb2 Fix `visible' calculation (again).
[originally from svn r4223]
2004-05-12 18:54:16 +00:00
3c2a320143 Ahem. Seed validation was completely broken.
[originally from svn r4222]
2004-05-12 18:53:47 +00:00
1ea3c92c17 During redraws, I now do corner analysis centrally, which enables me
to maintain the `visible' array accurately and hence actually switch
it on. This prevents us having to redraw the entire playing area on
any move, which means really big grids are now sensibly playable
without display lag.

[originally from svn r4221]
2004-05-12 18:45:11 +00:00