From ee8ba58441425e5e23708721c04b23955c6227ce Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Sun, 26 Feb 2023 21:46:05 -0800 Subject: [PATCH] Minor cleanup. --- implementations/uvm-ncc/graphics.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/implementations/uvm-ncc/graphics.h b/implementations/uvm-ncc/graphics.h index b398b78..7fb5e35 100644 --- a/implementations/uvm-ncc/graphics.h +++ b/implementations/uvm-ncc/graphics.h @@ -142,13 +142,12 @@ carefree_wu_line(u32* dest, size_t dest_stride, u64 x, u64 y, u64 w, u64 h, u32 while (x1 > x) { plot_pixel(dest, dest_stride, x, y + 1, color, d >> 8); plot_pixel(dest, dest_stride, x, y, color, 0xFF - (d >> 8)); - plot_pixel(dest, dest_stride, x1, y1, color, d >> 8); - plot_pixel(dest, dest_stride, x1, y1 + 1, color, 0xFF - (d >> 8)); + plot_pixel(dest, dest_stride, x1, y1, color, d >> 8); + plot_pixel(dest, dest_stride, x1, y1 + 1, color, 0xFF - (d >> 8)); ++x; x1 = x1 - 1; // "--x1" didn't work here, x1 remained unchanged. if (d + k >= 0xFFFF) { d = 0; - // opposite (de-)increment because computer y is negative cartesian y ++y; y1 = y1 - 1; } else {