From cf880225edb1b6a5cb27dec01ba54c61822788f2 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 5 Aug 2006 17:20:29 +0000 Subject: I'm sick of repeatedly adding and removing local changes to Recipe when testing a new game, so here's a new architecture for the Recipe file. mkfiles.pl now supports several new features: - an `!include' directive, which accepts wildcards - += to append to an existing object group definition - the ability to divert output to an arbitrary file. So now each puzzle has a `.R' file containing a fragment of Recipe code describing that puzzle, and the central Recipe does `!include *.R' to construct the Makefiles. That way, I can keep as many experimental half-finished puzzles lying around my working directory as I like, and I won't have to keep reverting Recipe when I check in any other changes. As part of this change, list.c is no longer a version-controlled file; it's now constructed by mkfiles.pl, so that it too can take advantage of this mechanism. [originally from svn r6781] --- list.c | 72 ------------------------------------------------------------------ 1 file changed, 72 deletions(-) delete mode 100644 list.c (limited to 'list.c') diff --git a/list.c b/list.c deleted file mode 100644 index b1f1323..0000000 --- a/list.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * list.c: List of puzzles. - */ - -#include "puzzles.h" - -/* - * The available games can be most easily enumerated by searching - * for the line in each game source file saying "#define thegame - * ". Hence, the following piece of shell/Perl should - * regenerate this list automatically: - -perl -ne '/^#define thegame (\S+)/ and $1 ne "nullgame" and print "extern const game $1;\n"' *.c -echo -e '\nconst game *gamelist[] = {' -perl -ne '/^#define thegame (\S+)/ and $1 ne "nullgame" and print " &$1,\n"' *.c -echo -e '};\n\nconst int gamecount = lenof(gamelist);' - - */ - -extern const game blackbox; -extern const game bridges; -extern const game cube; -extern const game dominosa; -extern const game fifteen; -extern const game flip; -extern const game guess; -extern const game inertia; -extern const game lightup; -extern const game loopy; -extern const game map; -extern const game mines; -extern const game net; -extern const game netslide; -extern const game pattern; -extern const game pegs; -extern const game rect; -extern const game samegame; -extern const game sixteen; -extern const game slant; -extern const game solo; -extern const game tents; -extern const game twiddle; -extern const game untangle; - -const game *gamelist[] = { - &blackbox, - &bridges, - &cube, - &dominosa, - &fifteen, - &flip, - &guess, - &inertia, - &lightup, - &loopy, - &map, - &mines, - &net, - &netslide, - &pattern, - &pegs, - &rect, - &samegame, - &sixteen, - &slant, - &solo, - &tents, - &twiddle, - &untangle, -}; - -const int gamecount = lenof(gamelist); -- cgit v1.1