Fix problem with circle of unit radius.

This commit is contained in:
František Jahoda 2017-12-19 22:47:02 +01:00
parent c64ee7e69c
commit 2416c2e60f
1 changed files with 2 additions and 2 deletions

View File

@ -865,8 +865,8 @@ static void api_circle(tic_mem* memory, s32 xm, s32 ym, u32 radius, u8 color)
if (r > x || err > y) err += ++x*2+1; if (r > x || err > y) err += ++x*2+1;
} while (x < 0); } while (x < 0);
s32 yt = max(machine->state.clip.t, ym-r); s32 yt = max(machine->state.clip.t, ym-radius);
s32 yb = min(machine->state.clip.b, ym+r+1); s32 yb = min(machine->state.clip.b, ym+radius+1);
u8 final_color = mapColor(&machine->memory, color); u8 final_color = mapColor(&machine->memory, color);
for(s32 y = yt; y < yb; y++) { for(s32 y = yt; y < yb; y++) {
s32 xl = max(SidesBuffer.Left[y], machine->state.clip.l); s32 xl = max(SidesBuffer.Left[y], machine->state.clip.l);