hedgewars/uLandGenTemplateBased.pas
branchios-revival
changeset 11175 e1a098f950a9
parent 10564 0cb20aa8877a
child 11532 bf86c6cb9341
equal deleted inserted replaced
11166:9aad7f294864 11175:e1a098f950a9
     7 procedure DivideEdges(fillPointsCount: LongWord; var pa: TPixAr);
     7 procedure DivideEdges(fillPointsCount: LongWord; var pa: TPixAr);
     8 
     8 
     9 var minDistance, dabDiv: LongInt; // different details size
     9 var minDistance, dabDiv: LongInt; // different details size
    10 
    10 
    11 implementation
    11 implementation
    12 uses uVariables, uConsts, uFloat, uLandUtils, uRandom, SDLh, math;
    12 uses uVariables, uTypes, uConsts, uFloat, uLandUtils, uRandom, SDLh, math;
    13 
    13 
    14 
    14 
    15 procedure SetPoints(var Template: TEdgeTemplate; var pa: TPixAr; fps: PPointArray);
    15 procedure SetPoints(var Template: TEdgeTemplate; var pa: TPixAr; fps: PPointArray);
    16 var i: LongInt;
    16 var i: LongInt;
    17 begin
    17 begin
   325     repeat
   325     repeat
   326         i:= pa.Count;
   326         i:= pa.Count;
   327         DivideEdges(Template.FillPointsCount, pa)
   327         DivideEdges(Template.FillPointsCount, pa)
   328     until i = pa.Count;
   328     until i = pa.Count;
   329 
   329 
       
   330 {$IFDEF IPHONEOS}
       
   331     if GameType <> gmtLandPreview then
       
   332 {$ENDIF}
   330     // make it smooth
   333     // make it smooth
   331     BezierizeEdge(pa, _0_2);
   334     BezierizeEdge(pa, _0_2);
   332 end;
   335 end;
   333 
   336 
   334 
   337