# HG changeset patch # User nemo # Date 1415566329 18000 # Node ID 31afb7cdff69949b638e43624205144c32c5c9f6 # Parent 12662c21e0e95b0717cde4639ad17b7b1e66510b hookup perlin diff -r 12662c21e0e9 -r 31afb7cdff69 hedgewars/uLandGenPerlin.pas --- a/hedgewars/uLandGenPerlin.pas Sun Nov 09 23:44:13 2014 +0300 +++ b/hedgewars/uLandGenPerlin.pas Sun Nov 09 15:52:09 2014 -0500 @@ -10,6 +10,7 @@ , uConsts , uRandom , uLandOutline // FillLand + , uUtils ; var p: array[0..511] of LongInt; @@ -120,20 +121,21 @@ p[256 + i]:= p[i]; end; -const detail = 150000; - width = 4096; - height = 2048; - minY = 500; +const width = 4096; + height = 2048; + minY = 500; //bottomPlateHeight = 90; //bottomPlateMargin = 1200; margin = 200; procedure GenPerlin; -var y, x, {dy, }di, dj, df, r, param1, param2: LongInt; +var y, x, {dy, }di, dj, df, r, param1, param2, rCutoff, detail: LongInt; begin param1:= cTemplateFilter div 3; param2:= cTemplateFilter mod 3; + rCutoff:= min(max(cFeatureSize*4,15),85); + detail:= cFeatureSize*16000+50000; df:= detail * (6 - param2 * 2); @@ -169,7 +171,7 @@ end; } - if r < 50 then Land[y, x]:= 0 else Land[y, x]:= lfObjMask; + if r < rCutoff then Land[y, x]:= 0 else Land[y, x]:= lfObjMask; end; end;