diff --git a/chameleonic.p8 b/chameleonic.p8 index 8b871a5..acf6490 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -95,11 +95,10 @@ function linefill(ax,ay,bx,by,r,c) local _x1,_y1=x1,y1 if(y0>y1) x0,y0,x1,y1=x1,y1,x0,y0 local dx=(x1-x0)/(y1-y0) - if(y0<0) x0-=y0*dx y0=-1 local cy0=y0\1+1 -- sub-pix shift x0+=(cy0-y0)*dx - for y=y0\1+1,min(y1\1,127) do + for y=cy0,min(y1\1,127) do -- open span? local span=spans[y] if (span) rectfill(x0,y,span,y)