Enumerations | Functions | Variables

# tgp.h File Reference

Functions for the Perlin noise enhanced map generator. More...

Go to the source code of this file.

## Enumerations
enum | Smoothness { SMOOTHNESS_VERY_SMOOTH = 0, SMOOTHNESS_SMOOTH = 1, SMOOTHNESS_ROUGH = 2, SMOOTHNESS_VERY_ROUGH = 3, SMOOTHNESS_CEREALLY_ROUGH = 4, SMOOTHNESS_COMMUTORZ = 5, SMOOTHNESS_GO_WITH_THE_FLOW = 6 }
## Functions
void | GenerateTerrainPerlin ()
| The main new land generator using Perlin noise.
## Variables
static const uint | TGP_HEIGHT_FACTOR = 8
static const int | TGP_FREQUENCY_MAX = 9
| Maximum index into array of noise amplitudes.

## Detailed Description

Functions for the Perlin noise enhanced map generator.

Definition in file tgp.h.

## Function Documentation

void GenerateTerrainPerlin | ( |  | ) |

The main new land generator using Perlin noise.

Desert landscape is handled different to all others to give a desert valley between two high mountains. Clearly if a low height terrain (flat/very flat) is chosen, then the tropic areas wont be high enough, and there will be very little tropic on the map. Thus Tropic works best on Hilly or Mountainous.

Definition at line 1192 of file tgp.cpp.

References _settings_game, AllocHeightMap(), GameSettings::construction, ConstructionSettings::freeform_edges, FreeHeightMap(), GenerateWorldSetAbortCallback(), GetMaxTileHeight(), GWP_LANDSCAPE, H2I, HeightMap::height(), HeightMapGenerate(), HeightMapNormalize(), IncreaseGeneratingWorldProgress(), MakeVoid(), TgenSetTileHeight(), TGPGetMaxAllowedHeight(), and TileXY().

Referenced by GenerateLandscape().

## Variable Documentation

const int TGP_FREQUENCY_MAX = 9`[static]`

Maximum index into array of noise amplitudes.

Definition at line 18 of file tgp.h.

Referenced by HeightMapGenerate().