2013-07-29 07:13:03 -04: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 06:07:08 -05:00
|
|
|
#include "../Noise/Noise.h"
|
2013-07-29 07:13:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cEndGen :
|
2014-11-12 15:24:26 -05:00
|
|
|
public cTerrainShapeGen,
|
2013-07-29 07:13:03 -04:00
|
|
|
public cTerrainCompositionGen
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cEndGen(int a_Seed);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2013-07-29 07:13:03 -04:00
|
|
|
protected:
|
|
|
|
|
2015-07-31 10:49:10 -04:00
|
|
|
/** Seed for the noise */
|
2013-07-29 07:13:03 -04:00
|
|
|
int m_Seed;
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-07-31 10:49:10 -04:00
|
|
|
/** The Perlin noise used for generating */
|
2013-07-29 07:13:03 -04:00
|
|
|
cPerlinNoise m_Perlin;
|
2020-10-11 11:44:57 -04:00
|
|
|
cPerlinNoise m_VoidOffsetNoise;
|
2013-07-29 07:13:03 -04:00
|
|
|
|
2020-10-11 11:44:57 -04: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 16:45:45 -05:00
|
|
|
|
2013-07-29 07:13:03 -04:00
|
|
|
// XYZ Frequencies of the noise functions:
|
|
|
|
NOISE_DATATYPE m_FrequencyX;
|
|
|
|
NOISE_DATATYPE m_FrequencyY;
|
|
|
|
NOISE_DATATYPE m_FrequencyZ;
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-11-12 15:24:26 -05:00
|
|
|
// cTerrainShapeGen overrides:
|
2019-09-08 09:40:12 -04:00
|
|
|
virtual void GenShape(cChunkCoords a_ChunkCoords, cChunkDesc::Shape & a_Shape) override;
|
2013-07-29 07:13:03 -04:00
|
|
|
|
2015-07-31 10:49:10 -04:00
|
|
|
|
2013-07-29 07:13:03 -04:00
|
|
|
// cTerrainCompositionGen overrides:
|
2014-11-12 15:24:26 -05:00
|
|
|
virtual void ComposeTerrain(cChunkDesc & a_ChunkDesc, const cChunkDesc::Shape & a_Shape) override;
|
2020-10-11 11:44:57 -04:00
|
|
|
|
|
|
|
// cTerrainShapeGen overrides:
|
|
|
|
virtual void InitializeShapeGen(cIniFile & a_IniFile) override;
|
2013-07-29 07:13:03 -04:00
|
|
|
} ;
|