Speedup api_circle, api_tri. #474
it crashed when you try to draw circle with y<0
This commit is contained in:
parent
46eb6f7a9a
commit
6c6fa6cc8e
|
@ -869,8 +869,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;
|
||||
} while (x < 0);
|
||||
|
||||
s32 yt = max(machine->state.clip.t, ym-radius);
|
||||
s32 yb = min(machine->state.clip.b, ym+radius+1);
|
||||
s32 yt = max(machine->state.clip.t, ym-(s32)radius);
|
||||
s32 yb = min(machine->state.clip.b, ym+(s32)radius+1);
|
||||
u8 final_color = mapColor(&machine->memory, color);
|
||||
for(s32 y = yt; y < yb; y++) {
|
||||
s32 xl = max(SidesBuffer.Left[y], machine->state.clip.l);
|
||||
|
|
Loading…
Reference in New Issue