Since r6711, puzzles built with Gtk 1.2 would take double actions when a menu
[sgt/puzzles] / list.c
... / ...
CommitLineData
1/*
2 * list.c: List of puzzles.
3 */
4
5#include "puzzles.h"
6
7/*
8 * The available games can be most easily enumerated by searching
9 * for the line in each game source file saying "#define thegame
10 * <gamename>". Hence, the following piece of shell/Perl should
11 * regenerate this list automatically:
12
13perl -ne '/^#define thegame (\S+)/ and $1 ne "nullgame" and print "extern const game $1;\n"' *.c
14echo -e '\nconst game *gamelist[] = {'
15perl -ne '/^#define thegame (\S+)/ and $1 ne "nullgame" and print " &$1,\n"' *.c
16echo -e '};\n\nconst int gamecount = lenof(gamelist);'
17
18 */
19
20extern const game blackbox;
21extern const game bridges;
22extern const game cube;
23extern const game dominosa;
24extern const game fifteen;
25extern const game flip;
26extern const game guess;
27extern const game inertia;
28extern const game lightup;
29extern const game loopy;
30extern const game map;
31extern const game mines;
32extern const game net;
33extern const game netslide;
34extern const game pattern;
35extern const game pegs;
36extern const game rect;
37extern const game samegame;
38extern const game sixteen;
39extern const game slant;
40extern const game solo;
41extern const game tents;
42extern const game twiddle;
43extern const game untangle;
44
45const game *gamelist[] = {
46 &blackbox,
47 &bridges,
48 &cube,
49 &dominosa,
50 &fifteen,
51 &flip,
52 &guess,
53 &inertia,
54 &lightup,
55 &loopy,
56 &map,
57 &mines,
58 &net,
59 &netslide,
60 &pattern,
61 &pegs,
62 &rect,
63 &samegame,
64 &sixteen,
65 &slant,
66 &solo,
67 &tents,
68 &twiddle,
69 &untangle,
70};
71
72const int gamecount = lenof(gamelist);