-#define gis_tile_foreach(tile, child) \
- for (int _x = 0; _x < G_N_ELEMENTS(tile->children); _x++) \
- for (int _y = 0; child = tile->children[_x][_y], \
- _y < G_N_ELEMENTS(tile->children[_x]); _y++) \
-
-#define gis_tile_foreach_index(tile, x, y) \
- for (x = 0; x < G_N_ELEMENTS(tile->children); x++) \
- for (y = 0; y < G_N_ELEMENTS(tile->children[x]); y++)
+/**
+ * gis_tile_foreach:
+ * @parent: the #GisTile to iterate over
+ * @child: a pointer to a #GisTile to store the current subtile
+ *
+ * Iterate over each imediate subtile of @parent.
+ */
+#define gis_tile_foreach(parent, child) \
+ for (int _x = 0; _x < G_N_ELEMENTS(parent->children); _x++) \
+ for (int _y = 0; child = parent->children[_x][_y], \
+ _y < G_N_ELEMENTS(parent->children[_x]); _y++)
+
+/**
+ * gis_tile_foreach_index:
+ * @parent: the #GisTile to iterate over
+ * @x: integer to store the x index of the current subtile
+ * @y: integer to store the y index of the current subtile
+ *
+ * Iterate over each imediate subtile of @parent.
+ */
+#define gis_tile_foreach_index(parent, x, y) \
+ for (x = 0; x < G_N_ELEMENTS(parent->children); x++) \
+ for (y = 0; y < G_N_ELEMENTS(parent->children[x]); y++)