Tidy up Alois' confusing code

This commit is contained in:
Pyrex 2024-02-25 23:17:05 -08:00
parent ff44a3436b
commit e05f050e7d

View File

@ -140,8 +140,8 @@ void sys_oval_draw_ext(
y0 += (b + 1) / 2;
y1 = y0 - b1;
a *= 8 * a;
b1 = 8 * b * b;
int64_t aa8 = 8 * a * a;
int64_t bb8 = 8 * b * b;
do {
if (!fill) {
@ -156,9 +156,11 @@ void sys_oval_draw_ext(
sys_scanline_internal_set(x0, x1, y0, c, true);
sys_scanline_internal_set(x0, x1, y1, c, true);
}
y0++; y1--; dy += a; err += dy;
y0++; y1--; dy += aa8; err += dy;
}
if (e2 >= dx || 2 * err > dy) {
x0++; x1--; dx += bb8; err += dx;
}
if (e2 >= dx || 2 * err > dy) { x0++; x1--; dx += b1; err += dx; }
} while (x0 <= x1);
while (y0 - y1 < b) {