aboutsummaryrefslogtreecommitdiff
path: root/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'list.c')
-rw-r--r--list.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/list.c b/list.c
new file mode 100644
index 0000000..7e3318c
--- /dev/null
+++ b/list.c
@@ -0,0 +1,21 @@
+/*
+ * list.c: List of pointers to puzzle structures, for monolithic
+ * platforms.
+ *
+ * This file depends on the header "generated-games.h", which is
+ * constructed by CMakeLists.txt.
+ */
+
+#include "puzzles.h"
+
+#define GAME(x) extern const game x;
+#include "generated-games.h"
+#undef GAME
+
+#define GAME(x) &x,
+const game *gamelist[] = {
+#include "generated-games.h"
+};
+#undef GAME
+
+const int gamecount = lenof(gamelist);