From: Ben Harris Date: Sat, 16 Nov 2024 23:39:30 +0000 (+0000) Subject: Switch hhints loop in emit_hints() so it counts forwards X-Git-Tag: bedstead-3.246~25 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=f23453842839c82c7065879977bc33c166fdf69b;p=bedstead.git Switch hhints loop in emit_hints() so it counts forwards Now that it only touches the input array once, it's much simpler to do the y-axis inversion there. --- diff --git a/bedstead.c b/bedstead.c index 6af8523..20f048c 100644 --- a/bedstead.c +++ b/bedstead.c @@ -3849,10 +3849,10 @@ emit_hints(int vstems[XSIZE], int ledges[XSIZE], int redges[XSIZE], select_hints(YSIZE, hstems, tedges, bedges, hhints); cur = DESCENT * YPIX; printed = false; - for (i = YSIZE - 1; i >= 0; i--) { - switch (hhints[i]) { + for (i = 0; i < YSIZE; i++) { + switch (hhints[YSIZE - 1 - i]) { case hint_stem: - start = (YSIZE - i - 1) * YPIX_S; + start = i * YPIX_S; size = YPIX_S; break; default: continue;