-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Introduced nullability * Fixed some nullability problems * Refactored old C# style to more recent ones * Removed unused usings * Removed some unused code * Fixed some spelling mistakes * Updated engenious to newer version(for better nullability compatibility)
- Loading branch information
Showing
353 changed files
with
2,251 additions
and
5,266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
using OctoAwesome.Noise; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using OctoAwesome.Basics.Noise; | ||
|
||
namespace OctoAwesome.Basics.Biomes | ||
{ | ||
class FlatlandBiome : BiomeBase | ||
public class FlatlandBiome : BiomeBase | ||
{ | ||
public FlatlandBiome(IPlanet planet, float minValue, float maxValue, float valueRangeOffset, float valueRange) | ||
: base(planet, minValue, maxValue, valueRangeOffset, valueRange) | ||
: base(planet, minValue, maxValue, valueRangeOffset, valueRange, | ||
new SimplexNoiseGenerator(planet.Seed + 2) { FrequencyX = 1f / 256, FrequencyY = 1f / 256, Persistence = 0.25f, Octaves = 3, Factor = 1f }) | ||
{ | ||
BiomeNoiseGenerator = new SimplexNoiseGenerator(planet.Seed + 2) { FrequencyX = 1f / 256, FrequencyY = 1f / 256, Persistance = 0.25f, Octaves = 3, Factor = 1f }; | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
using OctoAwesome.Noise; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using OctoAwesome.Basics.Noise; | ||
|
||
namespace OctoAwesome.Basics.Biomes | ||
{ | ||
class HighMountainBiome : BiomeBase | ||
public class HighMountainBiome : BiomeBase | ||
{ | ||
public HighMountainBiome(IPlanet planet, float minValue, float maxValue, float valueRangeOffset, float valueRange) | ||
: base(planet, minValue, maxValue, valueRangeOffset, valueRange) | ||
: base(planet, minValue, maxValue, valueRangeOffset, valueRange, | ||
new SimplexNoiseGenerator(planet.Seed + 2) { FrequencyX = 1f / 256, FrequencyY = 1f / 256, FrequencyZ = 1f / 256, Persistence = 0.5f, Octaves = 6, Factor = 1f }) | ||
{ | ||
BiomeNoiseGenerator = new SimplexNoiseGenerator(planet.Seed + 2) { FrequencyX = 1f / 256, FrequencyY = 1f / 256, FrequencyZ = 1f / 256, Persistance = 0.5f, Octaves = 6, Factor = 1f }; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
using OctoAwesome.Noise; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using OctoAwesome.Basics.Noise; | ||
|
||
namespace OctoAwesome.Basics.Biomes | ||
{ | ||
public class HillsBiome : BiomeBase | ||
{ | ||
public HillsBiome(IPlanet planet, float minValue, float maxValue, float valueRangeOffset, float valueRange) | ||
: base(planet, minValue, maxValue, valueRangeOffset, valueRange) | ||
: base(planet, minValue, maxValue, valueRangeOffset, valueRange, | ||
new SimplexNoiseGenerator(planet.Seed + 2) { FrequencyX = 1f / 256, FrequencyY = 1f / 256, FrequencyZ = 1f / 256, Persistence = 0.4f, Octaves = 4, Factor = 1f }) | ||
{ | ||
BiomeNoiseGenerator = new SimplexNoiseGenerator(planet.Seed + 2) { FrequencyX = 1f / 256, FrequencyY = 1f / 256, FrequencyZ = 1f / 256, Persistance = 0.4f, Octaves = 4, Factor = 1f }; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
using OctoAwesome.Noise; | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using OctoAwesome.Basics.Noise; | ||
|
||
namespace OctoAwesome.Basics.Biomes | ||
{ | ||
|
||
public interface IBiome | ||
{ | ||
|
||
IPlanet Planet { get; } | ||
float MinValue { get; } | ||
float MaxValue { get; } | ||
|
||
float ValueRangeOffset { get; } | ||
float ValueRange { get; } | ||
|
||
INoise BiomeNoiseGenerator { get; } | ||
|
||
float[] GetHeightmap(Index2 chunkIndex, float[] heightmap); | ||
void GetHeightmap(Index2 chunkIndex, float[] heightmap); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.