From 23d4322fec38f8ffac930bc541e08309e1d02f11 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 6 Jul 2023 18:20:37 +0100 Subject: [PATCH] grid.c: add dot coordinates to debugging dumps. I wanted these in order to try to check whether all the faces of a grid were being traversed in the right orientation. That turned out not to be the cause of my problem, but it's still useful information to put in diagnostics. --- grid.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/grid.c b/grid.c index 228da91..2b21103 100644 --- a/grid.c +++ b/grid.c @@ -264,6 +264,10 @@ static void grid_debug_basic(grid *g) #ifdef DEBUG_GRID int i; printf("--- Basic Grid Data ---\n"); + for (i = 0; i < g->num_dots; i++) { + grid_dot *d = g->dots[i]; + printf("Dot %d at (%d,%d)\n", i, d->x, d->y); + } for (i = 0; i < g->num_faces; i++) { grid_face *f = g->faces[i]; printf("Face %d: dots[", i);