19 #define NOISE_SIZE_Y (257 + 32) cChunkDef::BiomeMap BiomeNeighbors[3][3]
Byte Shape[256 *16 *16]
The datatype used to represent the entire chunk worth of shape.
cPerlinNoise m_NoiseDistortZ
virtual void GenShape(cChunkCoords a_ChunkCoords, cChunkDesc::Shape &a_Shape) override
Generates the shape for the given chunk.
NOISE_DATATYPE m_DistortAmpZ
cHeiGenCache m_HeightGen
Cache for m_UnderlyingHeiGen.
std::shared_ptr< cTerrainHeightGen > cTerrainHeightGenPtr
void PrepareState(cChunkCoords a_ChunkCoords)
Unless the LastChunk coords are equal to coords given, prepares the internal state (noise arrays...
static const int INTERPOL_X
cDistortedHeightmap(int a_Seed, cBiomeGenPtr a_BiomeGen)
NOISE_DATATYPE m_DistortAmpX
void UpdateDistortAmps(void)
Updates m_DistortAmpX/Z[] based on m_CurChunkX and m_CurChunkZ.
NOISE_DATATYPE m_FrequencyX
cBiomeGenPtr m_BiomeGen
The bime generator to query for biomes.
void Initialize(cIniFile &a_IniFile)
Reads the settings from the ini file.
void GenerateHeightArray(void)
Generates the m_DistortedHeightmap array for the current chunk.
NOISE_DATATYPE m_FrequencyZ
bool m_IsInitialized
True if Initialize() has been called.
int GetHeightmapAt(NOISE_DATATYPE a_X, NOISE_DATATYPE a_Z)
Calculates the heightmap value (before distortion) at the specified (floating-point) coords...
static const int INTERPOL_Y
A simple cache that stores N most recently generated chunks' heightmaps; N being settable upon creati...
NOISE_DATATYPE m_DistortedHeightmap[17 *257 *17]
float NOISE_DATATYPE
The datatype used by all the noise generators.
void GetDistortAmpsAt(BiomeNeighbors &a_Neighbors, int a_RelX, int a_RelZ, NOISE_DATATYPE &a_DistortAmpX, NOISE_DATATYPE &a_DistortAmpZ)
Calculates the X and Z distortion amplitudes based on the neighbors' biomes.
cChunkDef::HeightMap m_CurChunkHeights
Heightmap for the current chunk, before distortion (from m_HeightGen).
The interface that a terrain shape generator must implement A terrain shape generator takes chunk coo...
static const int INTERPOL_Z
cChunkCoords m_CurChunkCoords
static const sGenParam m_GenParam[256]
This table assigns a relative maximum overhang size in each direction to biomes.
cTerrainHeightGenPtr m_UnderlyingHeiGen
The generator that provides the base heightmap (before distortion).
NOISE_DATATYPE m_FrequencyY
HEIGHTTYPE HeightMap[Width *Width]
The type used for any heightmap operations and storage; idx = x + Width * z; Height points to the hig...
EMCSBiome BiomeMap[Width *Width]
The type used for any biomemap operations and storage inside Cuberite, using Cuberite biomes (need no...
cPerlinNoise m_NoiseDistortX
virtual void InitializeShapeGen(cIniFile &a_IniFile) override
Reads parameters from the ini file, prepares generator for use.
std::shared_ptr< cBiomeGen > cBiomeGenPtr