2013-07-29 12:13:03 +01:00
|
|
|
|
|
|
|
|
// EndGen.h
|
|
|
|
|
|
|
|
|
|
// Declares the cEndGen class representing the generator for the End, both as a HeightGen and CompositionGen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "ComposableGenerator.h"
|
2014-11-18 12:07:08 +01:00
|
|
|
#include "../Noise/Noise.h"
|
2013-07-29 12:13:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cEndGen :
|
2014-11-12 21:24:26 +01:00
|
|
|
public cTerrainShapeGen,
|
2013-07-29 12:13:03 +01:00
|
|
|
public cTerrainCompositionGen
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
cEndGen(int a_Seed);
|
2016-02-05 23:45:45 +02:00
|
|
|
|
2013-07-29 12:13:03 +01:00
|
|
|
protected:
|
|
|
|
|
|
2015-07-31 16:49:10 +02:00
|
|
|
/** Seed for the noise */
|
2013-07-29 12:13:03 +01:00
|
|
|
int m_Seed;
|
2016-02-05 23:45:45 +02:00
|
|
|
|
2015-07-31 16:49:10 +02:00
|
|
|
/** The Perlin noise used for generating */
|
2013-07-29 12:13:03 +01:00
|
|
|
cPerlinNoise m_Perlin;
|
2020-10-11 17:44:57 +02:00
|
|
|
cPerlinNoise m_VoidOffsetNoise;
|
2013-07-29 12:13:03 +01:00
|
|
|
|
2020-10-11 17:44:57 +02:00
|
|
|
NOISE_DATATYPE m_AirThresholdMainIsland;
|
|
|
|
|
NOISE_DATATYPE m_AirThresholdOtherIslands;
|
|
|
|
|
int m_MainIslandSize;
|
|
|
|
|
int m_BaseHeight;
|
|
|
|
|
int m_TerrainTopMultiplier;
|
|
|
|
|
int m_TerrainBottomMultiplier;
|
|
|
|
|
int m_VoidOffsetNoiseMultiplier;
|
2016-02-05 23:45:45 +02:00
|
|
|
|
2013-07-29 12:13:03 +01:00
|
|
|
// XYZ Frequencies of the noise functions:
|
|
|
|
|
NOISE_DATATYPE m_FrequencyX;
|
|
|
|
|
NOISE_DATATYPE m_FrequencyY;
|
|
|
|
|
NOISE_DATATYPE m_FrequencyZ;
|
2016-02-05 23:45:45 +02:00
|
|
|
|
2014-11-12 21:24:26 +01:00
|
|
|
// cTerrainShapeGen overrides:
|
2019-09-08 15:40:12 +02:00
|
|
|
virtual void GenShape(cChunkCoords a_ChunkCoords, cChunkDesc::Shape & a_Shape) override;
|
2013-07-29 12:13:03 +01:00
|
|
|
|
2015-07-31 16:49:10 +02:00
|
|
|
|
2013-07-29 12:13:03 +01:00
|
|
|
// cTerrainCompositionGen overrides:
|
2014-11-12 21:24:26 +01:00
|
|
|
virtual void ComposeTerrain(cChunkDesc & a_ChunkDesc, const cChunkDesc::Shape & a_Shape) override;
|
2020-10-11 17:44:57 +02:00
|
|
|
|
|
|
|
|
// cTerrainShapeGen overrides:
|
|
|
|
|
virtual void InitializeShapeGen(cIniFile & a_IniFile) override;
|
2013-07-29 12:13:03 +01:00
|
|
|
} ;
|