hedgewars/uLandGenPerlin.pas
changeset 10491 c92955fa8b67
parent 10479 31afb7cdff69
child 10492 0cf3b2762606
equal deleted inserted replaced
10490:b30b8d39d662 10491:c92955fa8b67
   132 procedure GenPerlin;
   132 procedure GenPerlin;
   133 var y, x, {dy, }di, dj, df, r, param1, param2, rCutoff, detail: LongInt;
   133 var y, x, {dy, }di, dj, df, r, param1, param2, rCutoff, detail: LongInt;
   134 begin
   134 begin
   135     param1:= cTemplateFilter div 3;
   135     param1:= cTemplateFilter div 3;
   136     param2:= cTemplateFilter mod 3;
   136     param2:= cTemplateFilter mod 3;
   137     rCutoff:= min(max(cFeatureSize*4,15),85);
   137     rCutoff:= min(max((26-cFeatureSize)*4,15),85);
   138     detail:= cFeatureSize*16000+50000;
   138     detail:= (26-cFeatureSize)*16000+50000; // feature size is a slider from 1-25 at present. flip it for perlin
   139 
   139 
   140     df:= detail * (6 - param2 * 2);
   140     df:= detail * (6 - param2 * 2);
   141 
   141 
   142     inoise_setup();
   142     inoise_setup();
   143 
   143