@@ -289,13 +289,13 @@ float MapgenV6::baseTerrainLevelFromNoise(v2s16 p)
289
289
if (spflags & MGV6_FLAT)
290
290
return water_level;
291
291
292
- float terrain_base = NoisePerlin2D_PO (&noise_terrain_base->np ,
292
+ float terrain_base = NoiseFractal2D_PO (&noise_terrain_base->np ,
293
293
p.X , 0.5 , p.Y , 0.5 , seed);
294
- float terrain_higher = NoisePerlin2D_PO (&noise_terrain_higher->np ,
294
+ float terrain_higher = NoiseFractal2D_PO (&noise_terrain_higher->np ,
295
295
p.X , 0.5 , p.Y , 0.5 , seed);
296
- float steepness = NoisePerlin2D_PO (&noise_steepness->np ,
296
+ float steepness = NoiseFractal2D_PO (&noise_steepness->np ,
297
297
p.X , 0.5 , p.Y , 0.5 , seed);
298
- float height_select = NoisePerlin2D_PO (&noise_height_select->np ,
298
+ float height_select = NoiseFractal2D_PO (&noise_height_select->np ,
299
299
p.X , 0.5 , p.Y , 0.5 , seed);
300
300
301
301
return baseTerrainLevel (terrain_base, terrain_higher,
@@ -355,7 +355,7 @@ BiomeV6Type MapgenV6::getBiome(v2s16 p)
355
355
356
356
float MapgenV6::getHumidity (v2s16 p)
357
357
{
358
- /* double noise = noise2d_perlin (
358
+ /* double noise = noise2d_fractal (
359
359
0.5+(float)p.X/500, 0.5+(float)p.Y/500,
360
360
seed+72384, 4, 0.66);
361
361
noise = (noise + 1.0)/2.0;*/
@@ -374,11 +374,11 @@ float MapgenV6::getHumidity(v2s16 p)
374
374
375
375
float MapgenV6::getTreeAmount (v2s16 p)
376
376
{
377
- /* double noise = noise2d_perlin (
377
+ /* double noise = noise2d_fractal (
378
378
0.5+(float)p.X/125, 0.5+(float)p.Y/125,
379
379
seed+2, 4, 0.66);*/
380
380
381
- float noise = NoisePerlin2D (np_trees, p.X , p.Y , seed);
381
+ float noise = NoiseFractal2D (np_trees, p.X , p.Y , seed);
382
382
float zeroval = -0.39 ;
383
383
if (noise < zeroval)
384
384
return 0 ;
@@ -389,11 +389,11 @@ float MapgenV6::getTreeAmount(v2s16 p)
389
389
390
390
bool MapgenV6::getHaveAppleTree (v2s16 p)
391
391
{
392
- /* is_apple_tree = noise2d_perlin (
392
+ /* is_apple_tree = noise2d_fractal (
393
393
0.5+(float)p.X/100, 0.5+(float)p.Z/100,
394
394
data->seed+342902, 3, 0.45) > 0.2;*/
395
395
396
- float noise = NoisePerlin2D (np_apple_trees, p.X , p.Y , seed);
396
+ float noise = NoiseFractal2D (np_apple_trees, p.X , p.Y , seed);
397
397
398
398
return noise > 0.2 ;
399
399
}
@@ -404,7 +404,7 @@ float MapgenV6::getMudAmount(int index)
404
404
if (spflags & MGV6_FLAT)
405
405
return MGV6_AVERAGE_MUD_AMOUNT;
406
406
407
- /* return ((float)AVERAGE_MUD_AMOUNT + 2.0 * noise2d_perlin (
407
+ /* return ((float)AVERAGE_MUD_AMOUNT + 2.0 * noise2d_fractal (
408
408
0.5+(float)p.X/200, 0.5+(float)p.Y/200,
409
409
seed+91013, 3, 0.55));*/
410
410
@@ -415,7 +415,7 @@ float MapgenV6::getMudAmount(int index)
415
415
bool MapgenV6::getHaveBeach (int index)
416
416
{
417
417
// Determine whether to have sand here
418
- /* double sandnoise = noise2d_perlin (
418
+ /* double sandnoise = noise2d_fractal (
419
419
0.2+(float)p2d.X/250, 0.7+(float)p2d.Y/250,
420
420
seed+59420, 3, 0.50);*/
421
421
@@ -427,7 +427,7 @@ bool MapgenV6::getHaveBeach(int index)
427
427
BiomeV6Type MapgenV6::getBiome (int index, v2s16 p)
428
428
{
429
429
// Just do something very simple as for now
430
- /* double d = noise2d_perlin (
430
+ /* double d = noise2d_fractal (
431
431
0.6+(float)p2d.X/250, 0.2+(float)p2d.Y/250,
432
432
seed+9130, 3, 0.50);*/
433
433
@@ -547,7 +547,7 @@ void MapgenV6::makeChunk(BlockMakeData *data)
547
547
if ((flags & MG_DUNGEONS) && stone_surface_max_y >= node_min.Y &&
548
548
full_node_min.Y >= dungeon_ymin && full_node_max.Y <= dungeon_ymax) {
549
549
u16 num_dungeons = std::fmax (std::floor (
550
- NoisePerlin3D (&np_dungeons, node_min.X , node_min.Y , node_min.Z , seed)), 0 .0f );
550
+ NoiseFractal3D (&np_dungeons, node_min.X , node_min.Y , node_min.Z , seed)), 0 .0f );
551
551
552
552
if (num_dungeons >= 1 ) {
553
553
PseudoRandom ps (blockseed + 4713 );
@@ -633,17 +633,17 @@ void MapgenV6::calculateNoise()
633
633
int fz = full_node_min.Z ;
634
634
635
635
if (!(spflags & MGV6_FLAT)) {
636
- noise_terrain_base->perlinMap2D_PO (x, 0.5 , z, 0.5 );
637
- noise_terrain_higher->perlinMap2D_PO (x, 0.5 , z, 0.5 );
638
- noise_steepness->perlinMap2D_PO (x, 0.5 , z, 0.5 );
639
- noise_height_select->perlinMap2D_PO (x, 0.5 , z, 0.5 );
640
- noise_mud->perlinMap2D_PO (x, 0.5 , z, 0.5 );
636
+ noise_terrain_base->noiseMap2D_PO (x, 0.5 , z, 0.5 );
637
+ noise_terrain_higher->noiseMap2D_PO (x, 0.5 , z, 0.5 );
638
+ noise_steepness->noiseMap2D_PO (x, 0.5 , z, 0.5 );
639
+ noise_height_select->noiseMap2D_PO (x, 0.5 , z, 0.5 );
640
+ noise_mud->noiseMap2D_PO (x, 0.5 , z, 0.5 );
641
641
}
642
642
643
- noise_beach->perlinMap2D_PO (x, 0.2 , z, 0.7 );
643
+ noise_beach->noiseMap2D_PO (x, 0.2 , z, 0.7 );
644
644
645
- noise_biome->perlinMap2D_PO (fx, 0.6 , fz, 0.2 );
646
- noise_humidity->perlinMap2D_PO (fx, 0.0 , fz, 0.0 );
645
+ noise_biome->noiseMap2D_PO (fx, 0.6 , fz, 0.2 );
646
+ noise_humidity->noiseMap2D_PO (fx, 0.0 , fz, 0.0 );
647
647
// Humidity map does not need range limiting 0 to 1,
648
648
// only humidity at point does
649
649
}
@@ -1075,7 +1075,7 @@ void MapgenV6::growGrass() // Add surface nodes
1075
1075
1076
1076
void MapgenV6::generateCaves (int max_stone_y)
1077
1077
{
1078
- float cave_amount = NoisePerlin2D (np_cave, node_min.X , node_min.Y , seed);
1078
+ float cave_amount = NoiseFractal2D (np_cave, node_min.X , node_min.Y , seed);
1079
1079
int volume_nodes = (node_max.X - node_min.X + 1 ) *
1080
1080
(node_max.Y - node_min.Y + 1 ) * MAP_BLOCKSIZE;
1081
1081
cave_amount = MYMAX (0.0 , cave_amount);
0 commit comments