mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Rename internal map generator functions
This commit is contained in:
@@ -606,7 +606,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
mapgenSettings.simplex_base_freq = 1.75f;
|
||||
mapgenSettings.simplex_octaves = 6;
|
||||
|
||||
MapGenGenerate(&mapgenSettings);
|
||||
MapGenGenerateSimplex(&mapgenSettings);
|
||||
GfxInvalidateScreen();
|
||||
break;
|
||||
}
|
||||
@@ -666,7 +666,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
mapgenSettings.wall = -1;
|
||||
}
|
||||
|
||||
MapGenGenerate(&mapgenSettings);
|
||||
MapGenGenerateSimplex(&mapgenSettings);
|
||||
GfxInvalidateScreen();
|
||||
break;
|
||||
}
|
||||
@@ -817,7 +817,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
MapGenSettings mapgenSettings = _settings;
|
||||
mapgenSettings.simplex_low = _heightmapLow;
|
||||
mapgenSettings.simplex_high = _heightmapHigh;
|
||||
MapGenGenerateFromHeightmap(&mapgenSettings);
|
||||
MapGenGenerateFromHeightmapImage(&mapgenSettings);
|
||||
GfxInvalidateScreen();
|
||||
}
|
||||
|
||||
@@ -1290,7 +1290,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
void OnClose() override
|
||||
{
|
||||
MapGenUnloadHeightmap();
|
||||
MapGenUnloadHeightmapImage();
|
||||
}
|
||||
|
||||
void OnMouseUp(WidgetIndex widgetIndex) override
|
||||
@@ -1410,7 +1410,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
if (result == MODAL_RESULT_OK)
|
||||
{
|
||||
if (!MapGenLoadHeightmap(path))
|
||||
if (!MapGenLoadHeightmapImage(path))
|
||||
{
|
||||
// TODO: Display error popup
|
||||
return;
|
||||
|
||||
@@ -142,7 +142,7 @@ void MapGenGenerateBlank(MapGenSettings* settings)
|
||||
MapGenSetWaterLevel(settings->water_level);
|
||||
}
|
||||
|
||||
void MapGenGenerate(MapGenSettings* settings)
|
||||
void MapGenGenerateSimplex(MapGenSettings* settings)
|
||||
{
|
||||
const auto& mapSize = settings->mapSize;
|
||||
auto waterLevel = settings->water_level;
|
||||
@@ -682,7 +682,7 @@ static TileCoordsXY MapgenHeightmapCoordToTileCoordsXY(uint32_t x, uint32_t y)
|
||||
return TileCoordsXY(static_cast<int32_t>(y + 1), static_cast<int32_t>(x + 1));
|
||||
}
|
||||
|
||||
bool MapGenLoadHeightmap(const utf8* path)
|
||||
bool MapGenLoadHeightmapImage(const utf8* path)
|
||||
{
|
||||
auto format = Imaging::GetImageFormatFromPath(path);
|
||||
if (format == IMAGE_FORMAT::PNG)
|
||||
@@ -743,7 +743,7 @@ bool MapGenLoadHeightmap(const utf8* path)
|
||||
/**
|
||||
* Frees the memory used to store the selected height map
|
||||
*/
|
||||
void MapGenUnloadHeightmap()
|
||||
void MapGenUnloadHeightmapImage()
|
||||
{
|
||||
_heightMapData.mono_bitmap.clear();
|
||||
_heightMapData.width = 0;
|
||||
@@ -796,7 +796,7 @@ static void MapGenSmoothHeightmap(std::vector<uint8_t>& src, int32_t strength)
|
||||
}
|
||||
}
|
||||
|
||||
void MapGenGenerateFromHeightmap(MapGenSettings* settings)
|
||||
void MapGenGenerateFromHeightmapImage(MapGenSettings* settings)
|
||||
{
|
||||
Guard::Assert(!_heightMapData.mono_bitmap.empty(), "No height map loaded");
|
||||
Guard::Assert(settings->simplex_high != settings->simplex_low, "Low and high setting cannot be the same");
|
||||
|
||||
@@ -38,7 +38,7 @@ struct MapGenSettings
|
||||
};
|
||||
|
||||
void MapGenGenerateBlank(MapGenSettings* settings);
|
||||
void MapGenGenerate(MapGenSettings* settings);
|
||||
bool MapGenLoadHeightmap(const utf8* path);
|
||||
void MapGenUnloadHeightmap();
|
||||
void MapGenGenerateFromHeightmap(MapGenSettings* settings);
|
||||
void MapGenGenerateSimplex(MapGenSettings* settings);
|
||||
bool MapGenLoadHeightmapImage(const utf8* path);
|
||||
void MapGenUnloadHeightmapImage();
|
||||
void MapGenGenerateFromHeightmapImage(MapGenSettings* settings);
|
||||
|
||||
Reference in New Issue
Block a user