hedgewars/uLandPainted.pas
changeset 10244 f7b5b4b88171
parent 10243 9a3ba4e76e38
child 10246 8da91cd7a32a
equal deleted inserted replaced
10243:9a3ba4e76e38 10244:f7b5b4b88171
    80 procedure Draw;
    80 procedure Draw;
    81 var pe: PPointEntry;
    81 var pe: PPointEntry;
    82     prevPoint: PointRec;
    82     prevPoint: PointRec;
    83     radius: LongInt;
    83     radius: LongInt;
    84     color: Longword;
    84     color: Longword;
       
    85     linePoints: Longword;
    85 begin
    86 begin
    86     // shutup compiler
    87     // shutup compiler
    87     prevPoint.X:= 0;
    88     prevPoint.X:= 0;
    88     prevPoint.Y:= 0;
    89     prevPoint.Y:= 0;
    89     radius:= 0;
    90     radius:= 0;
    97 
    98 
    98     while(pe <> nil) do
    99     while(pe <> nil) do
    99         begin
   100         begin
   100         if (pe^.point.flags and $80 <> 0) then
   101         if (pe^.point.flags and $80 <> 0) then
   101             begin
   102             begin
   102             if (pe^.point.flags and $40 <> 0) then
   103             if (pe^.point.flags and $40 <> 0) and (not cAdvancedMapGenMode) then
   103                 color:= 0
   104                 color:= 0
   104                 else
   105                 else
   105                 color:= lfBasic;
   106                 color:= lfBasic;
   106             radius:= (pe^.point.flags and $3F) * 5 + 3;
   107             radius:= (pe^.point.flags and $3F) * 5 + 3;
   107             AddFileLog('[DRAW] Move to: ('+inttostr(pe^.point.X)+','+inttostr(pe^.point.Y)+'), radius = '+inttostr(radius));
   108             linePoints:= FillRoundInLand(pe^.point.X, pe^.point.Y, radius, color)
   108             FillRoundInLand(pe^.point.X, pe^.point.Y, radius, color)
       
   109             end
   109             end
   110             else
   110             else
   111             begin
   111             begin
   112             AddFileLog('[DRAW] Line to: ('+inttostr(pe^.point.X)+','+inttostr(pe^.point.Y)+'), radius = '+inttostr(radius));
   112             inc(linePoints, DrawThickLine(prevPoint.X, prevPoint.Y, pe^.point.X, pe^.point.Y, radius, color));
   113             DrawThickLine(prevPoint.X, prevPoint.Y, pe^.point.X, pe^.point.Y, radius, color);
       
   114             end;
   113             end;
   115 
   114 
   116         prevPoint:= pe^.point;
   115         prevPoint:= pe^.point;
   117         pe:= pe^.next;
   116         pe:= pe^.next;
   118         end;
   117         end;