1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00

Replace openrct2_assert with Guard::Assert, remove openrct2_assert

This commit is contained in:
Matthias Moninger
2023-07-02 17:42:46 +03:00
committed by GitHub
parent 379287ed0f
commit 3ef6003671
14 changed files with 37 additions and 53 deletions

View File

@@ -794,8 +794,8 @@ static void MapGenSmoothHeightmap(std::vector<uint8_t>& src, int32_t strength)
void MapGenGenerateFromHeightmap(MapGenSettings* settings)
{
openrct2_assert(!_heightMapData.mono_bitmap.empty(), "No height map loaded");
openrct2_assert(settings->simplex_high != settings->simplex_low, "Low and high setting cannot be the same");
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");
// Make a copy of the original height map that we can edit
auto dest = _heightMapData.mono_bitmap;
@@ -835,8 +835,8 @@ void MapGenGenerateFromHeightmap(MapGenSettings* settings)
}
}
openrct2_assert(maxValue > minValue, "Input range is invalid");
openrct2_assert(settings->simplex_high > settings->simplex_low, "Output range is invalid");
Guard::Assert(maxValue > minValue, "Input range is invalid");
Guard::Assert(settings->simplex_high > settings->simplex_low, "Output range is invalid");
const uint8_t rangeIn = maxValue - minValue;
const uint8_t rangeOut = settings->simplex_high - settings->simplex_low;