hedgewars/uRenderUtils.pas
changeset 6992 b8f3d8991e92
parent 6986 409dd3851309
child 7013 54db061b5710
equal deleted inserted replaced
6991:1ec44dde5eb9 6992:b8f3d8991e92
   191              x,y);
   191              x,y);
   192 end;
   192 end;
   193 
   193 
   194 procedure DrawLine2Surf(dest: PSDL_Surface; x0, y0,x1,y1: LongInt; r,g,b: byte);
   194 procedure DrawLine2Surf(dest: PSDL_Surface; x0, y0,x1,y1: LongInt; r,g,b: byte);
   195 var
   195 var
   196     max: LongInt;
       
   197     dx,dy,err,e2,sx,sy: LongInt;
   196     dx,dy,err,e2,sx,sy: LongInt;
   198     yMax: LongInt;
   197     yMax: LongInt;
   199     destPixels: PLongwordArray;
   198     destPixels: PLongwordArray;
   200 begin
   199 begin
   201     max:= (dest^.pitch div 4) * dest^.h;
   200     //max:= (dest^.pitch div 4) * dest^.h;
   202     yMax:= dest^.pitch div 4;
   201     yMax:= dest^.pitch div 4;
   203     destPixels:= dest^.pixels;
   202     destPixels:= dest^.pixels;
   204 
   203 
   205     dx:= abs(x1-x0);
   204     dx:= abs(x1-x0);
   206     dy:= abs(y1-y0);
   205     dy:= abs(y1-y0);