diff options
author | Patric Stout <truebrain@openttd.org> | 2021-03-24 10:29:01 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-03-26 12:22:32 +0100 |
commit | 422e132845255264314cd79aa14361d0df0905d7 (patch) | |
tree | 21452e883fa2a1bec4280625fb0ce7a6dfb168b8 /src/genworld.h | |
parent | 1a1049bc0db4e29402e950e56f3a6873c1f5a0ab (diff) | |
download | openttd-422e132845255264314cd79aa14361d0df0905d7.tar.xz |
Feature: auto-detect map height limit based on generated map
This opens up the true power of the TGP terrain generator, as it
is no longer constrainted by an arbitrary low map height limit,
especially for extreme terrain types.
In other words: on a 1kx1k map with "Alpinist" terrain type, the
map is now really hilly with default settings.
People can still manually limit the map height if they so wish,
and after the terrain generation the limit is stored in the
savegame as if the user set it.
Cheats still allow you to change this value.
Diffstat (limited to 'src/genworld.h')
-rw-r--r-- | src/genworld.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/genworld.h b/src/genworld.h index e780ed169..71dae3f36 100644 --- a/src/genworld.h +++ b/src/genworld.h @@ -46,6 +46,9 @@ static const uint CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY = 4; ///< Value for custom static const uint CUSTOM_SEA_LEVEL_MIN_PERCENTAGE = 1; ///< Minimum percentage a user can specify for custom sea level. static const uint CUSTOM_SEA_LEVEL_MAX_PERCENTAGE = 90; ///< Maximum percentage a user can specify for custom sea level. +static const uint MAP_HEIGHT_LIMIT_AUTO_MINIMUM = 30; ///< When map height limit is auto, make this the lowest possible map height limit. +static const uint MAP_HEIGHT_LIMIT_AUTO_CEILING_ROOM = 15; ///< When map height limit is auto, the map height limit will be the higest peak plus this value. + typedef void GWDoneProc(); ///< Procedure called when the genworld process finishes typedef void GWAbortProc(); ///< Called when genworld is aborted |