-/* ------- List of grid generators ------- */
-#define GRIDLIST(A) \
- A(Squares,GRID_SQUARE,3,3) \
- A(Triangular,GRID_TRIANGULAR,3,3) \
- A(Honeycomb,GRID_HONEYCOMB,3,3) \
- A(Snub-Square,GRID_SNUBSQUARE,3,3) \
- A(Cairo,GRID_CAIRO,3,4) \
- A(Great-Hexagonal,GRID_GREATHEXAGONAL,3,3) \
- A(Octagonal,GRID_OCTAGONAL,3,3) \
- A(Kites,GRID_KITE,3,3) \
- A(Floret,GRID_FLORET,1,2) \
- A(Dodecagonal,GRID_DODECAGONAL,2,2) \
- A(Great-Dodecagonal,GRID_GREATDODECAGONAL,2,2) \
- A(Penrose (kite/dart),GRID_PENROSE_P2,3,3) \
- A(Penrose (rhombs),GRID_PENROSE_P3,3,3)
-
-#define GRID_NAME(title,type,amin,omin) #title,
-#define GRID_CONFIG(title,type,amin,omin) ":" #title
-#define GRID_TYPE(title,type,amin,omin) type,
+/*
+ * Grid type config options available in Loopy.
+ *
+ * Annoyingly, we have to use an enum here which doesn't match up
+ * exactly to the grid-type enum in grid.h. Values in params->types
+ * are given by names such as LOOPY_GRID_SQUARE, which shouldn't be
+ * confused with GRID_SQUARE which is the value you pass to grid_new()
+ * and friends. So beware!
+ *
+ * (This is partly for historical reasons - Loopy's version of the
+ * enum is encoded in game parameter strings, so we keep it for
+ * backwards compatibility. But also, we need to store additional data
+ * here alongside each enum value, such as names for the presets menu,
+ * which isn't stored in grid.h; so we have to have our own list macro
+ * here anyway, and C doesn't make it easy to enforce that that lines
+ * up exactly with grid.h.)
+ *
+ * Do not add values to this list _except_ at the end, or old game ids
+ * will stop working!
+ */
+#define GRIDLIST(A) \
+ A("Squares",SQUARE,3,3) \
+ A("Triangular",TRIANGULAR,3,3) \
+ A("Honeycomb",HONEYCOMB,3,3) \
+ A("Snub-Square",SNUBSQUARE,3,3) \
+ A("Cairo",CAIRO,3,4) \
+ A("Great-Hexagonal",GREATHEXAGONAL,3,3) \
+ A("Octagonal",OCTAGONAL,3,3) \
+ A("Kites",KITE,3,3) \
+ A("Floret",FLORET,1,2) \
+ A("Dodecagonal",DODECAGONAL,2,2) \
+ A("Great-Dodecagonal",GREATDODECAGONAL,2,2) \
+ A("Penrose (kite/dart)",PENROSE_P2,3,3) \
+ A("Penrose (rhombs)",PENROSE_P3,3,3) \
+ A("Great-Great-Dodecagonal",GREATGREATDODECAGONAL,2,2) \
+ /* end of list */
+
+#define GRID_NAME(title,type,amin,omin) title,
+#define GRID_CONFIG(title,type,amin,omin) ":" title
+#define GRID_LOOPYTYPE(title,type,amin,omin) LOOPY_GRID_ ## type,
+#define GRID_GRIDTYPE(title,type,amin,omin) GRID_ ## type,