mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-31 02:35:46 +01:00
Move default settings to MapGen header
This commit is contained in:
@@ -267,35 +267,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
private:
|
||||
ResizeDirection _resizeDirection{ ResizeDirection::Both };
|
||||
bool _mapWidthAndHeightLinked{ true };
|
||||
|
||||
MapGenSettings _settings{
|
||||
// Base
|
||||
.algorithm = MapGenAlgorithm::blank,
|
||||
.mapSize{ 150, 150 },
|
||||
.waterLevel = 6,
|
||||
.landTexture = 0,
|
||||
.edgeTexture = 0,
|
||||
.heightmapLow = 14,
|
||||
.heightmapHigh = 60,
|
||||
.smoothTileEdges = true,
|
||||
|
||||
// Features (e.g. tree, rivers, lakes etc.)
|
||||
.trees = true,
|
||||
.treeToLandRatio = 25,
|
||||
.minTreeAltitude = 10,
|
||||
.maxTreeAltitude = 50,
|
||||
.beaches = true,
|
||||
|
||||
// Simplex Noise Parameters
|
||||
.simplex_base_freq = 175,
|
||||
.simplex_octaves = 6,
|
||||
|
||||
// Height map _settings
|
||||
.smooth_height_map = false,
|
||||
.smooth_strength = 1,
|
||||
.normalize_height = false,
|
||||
};
|
||||
|
||||
MapGenSettings _settings{};
|
||||
bool _randomTerrain = true;
|
||||
bool _heightmapLoaded = false;
|
||||
|
||||
|
||||
@@ -22,30 +22,30 @@ enum class MapGenAlgorithm : uint8_t
|
||||
struct MapGenSettings
|
||||
{
|
||||
// Base
|
||||
MapGenAlgorithm algorithm;
|
||||
TileCoordsXY mapSize;
|
||||
int32_t waterLevel;
|
||||
int32_t landTexture;
|
||||
int32_t edgeTexture;
|
||||
int32_t heightmapLow;
|
||||
int32_t heightmapHigh;
|
||||
bool smoothTileEdges;
|
||||
MapGenAlgorithm algorithm = MapGenAlgorithm::blank;
|
||||
TileCoordsXY mapSize{ 150, 150 };
|
||||
int32_t waterLevel = 6;
|
||||
int32_t landTexture = 0;
|
||||
int32_t edgeTexture = 0;
|
||||
int32_t heightmapLow = 14;
|
||||
int32_t heightmapHigh = 60;
|
||||
bool smoothTileEdges = true;
|
||||
|
||||
// Features (e.g. tree, rivers, lakes etc.)
|
||||
bool trees;
|
||||
int32_t treeToLandRatio;
|
||||
int32_t minTreeAltitude;
|
||||
int32_t maxTreeAltitude;
|
||||
bool beaches;
|
||||
bool trees = true;
|
||||
int32_t treeToLandRatio = 25;
|
||||
int32_t minTreeAltitude = 10;
|
||||
int32_t maxTreeAltitude = 50;
|
||||
bool beaches = true;
|
||||
|
||||
// Simplex Noise Parameters
|
||||
int32_t simplex_base_freq;
|
||||
int32_t simplex_octaves;
|
||||
int32_t simplex_base_freq = 175;
|
||||
int32_t simplex_octaves = 6;
|
||||
|
||||
// Height map settings
|
||||
bool smooth_height_map;
|
||||
uint32_t smooth_strength;
|
||||
bool normalize_height;
|
||||
bool smooth_height_map = true;
|
||||
uint32_t smooth_strength = 1;
|
||||
bool normalize_height = true;
|
||||
};
|
||||
|
||||
void MapGenGenerate(MapGenSettings* settings);
|
||||
|
||||
Reference in New Issue
Block a user