hedgewars/uLandGenTemplateBased.pas
changeset 10472 8d04cebedb16
parent 10387 cb17b79844b5
child 10477 b219c5a2317f
--- a/hedgewars/uLandGenTemplateBased.pas	Sat Nov 08 10:11:16 2014 -0500
+++ b/hedgewars/uLandGenTemplateBased.pas	Sat Nov 08 11:26:16 2014 -0500
@@ -9,6 +9,7 @@
 implementation
 uses uVariables, uConsts, uFloat, uLandUtils, uRandom, SDLh, math;
 
+var minDistance: LongInt; // different details size
 
 procedure SetPoints(var Template: TEdgeTemplate; var pa: TPixAr; fps: PPointArray);
 var i: LongInt;
@@ -97,7 +98,6 @@
 
 procedure FindPoint(si: LongInt; fillPointsCount: LongWord; var newPoint: TPoint; var pa: TPixAr);
 const mapBorderMargin = 40;
-    minDistance = 32; // adjust/parametrize this for different details size
 var p1, p2, p4, fp, mp: TPoint;
     i, t1, t2, iy, ix, aqpb: LongInt;
     a, b, p, q: LongInt;
@@ -336,7 +336,8 @@
     for y:= 0 to LAND_HEIGHT - 1 do
         for x:= 0 to LAND_WIDTH - 1 do
             Land[y, x]:= lfBasic;
-            
+    
+    minDistance:= max(cFeatureSize,12);
     MaxHedgehogs:= Template.MaxHedgehogs;
     hasGirders:= Template.hasGirders;
     playHeight:= Template.TemplateHeight;