diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-02 22:44:15 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-02 22:44:15 +0200 |
commit | a7c87e92ce35092f3abd1ea59ba15ea7cb369343 (patch) | |
tree | f694bc5f18b2d04f40cf3902c96a5c1862216760 /source/CompoGen.h | |
parent | ClientHandle dumps the contents of all packets in the queue if the packet queue gets overloaded to the point of client-kicking. Use this to debug FS #197. (diff) | |
download | cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.gz cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.bz2 cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.lz cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.xz cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.zst cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.zip |
Diffstat (limited to 'source/CompoGen.h')
-rw-r--r-- | source/CompoGen.h | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/source/CompoGen.h b/source/CompoGen.h index a3a524533..74e38757b 100644 --- a/source/CompoGen.h +++ b/source/CompoGen.h @@ -5,6 +5,7 @@ - cCompoGenSameBlock
- cCompoGenDebugBiomes
- cCompoGenClassic
+ - cCompoGenBiomal
*/
@@ -14,6 +15,7 @@ #pragma once
#include "cChunkGenerator.h"
+#include "cNoise.h"
@@ -39,6 +41,7 @@ protected: cChunkDef::BlockTypes & a_BlockTypes, // BlockTypes to be generated
cChunkDef::BlockNibbles & a_BlockMeta, // BlockMetas to be generated
const cChunkDef::HeightMap & a_HeightMap, // The height map to fit
+ const cChunkDef::BiomeMap & a_BiomeMap, // Biomes to adhere to
cEntityList & a_Entities, // Entitites may be generated along with the terrain
cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...)
) override;
@@ -52,11 +55,9 @@ class cCompoGenDebugBiomes : public cTerrainCompositionGen
{
public:
- cCompoGenDebugBiomes(cBiomeGen * a_BiomeGen) : m_BiomeGen(a_BiomeGen) {}
+ cCompoGenDebugBiomes(void) {}
protected:
-
- cBiomeGen * m_BiomeGen;
// cTerrainCompositionGen overrides:
virtual void ComposeTerrain(
@@ -64,6 +65,7 @@ protected: cChunkDef::BlockTypes & a_BlockTypes, // BlockTypes to be generated
cChunkDef::BlockNibbles & a_BlockMeta, // BlockMetas to be generated
const cChunkDef::HeightMap & a_HeightMap, // The height map to fit
+ const cChunkDef::BiomeMap & a_BiomeMap, // Biomes to adhere to
cEntityList & a_Entities, // Entitites may be generated along with the terrain
cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...)
) override;
@@ -91,9 +93,50 @@ protected: cChunkDef::BlockTypes & a_BlockTypes, // BlockTypes to be generated
cChunkDef::BlockNibbles & a_BlockMeta, // BlockMetas to be generated
const cChunkDef::HeightMap & a_HeightMap, // The height map to fit
+ const cChunkDef::BiomeMap & a_BiomeMap, // Biomes to adhere to
+ cEntityList & a_Entities, // Entitites may be generated along with the terrain
+ cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...)
+ ) override;
+} ;
+
+
+
+
+
+class cCompoGenBiomal :
+ public cTerrainCompositionGen
+{
+public:
+ cCompoGenBiomal(int a_Seed, int a_SeaLevel) :
+ m_Noise(a_Seed + 1000),
+ m_SeaLevel(a_SeaLevel - 1) // we do an adjustment later in filling the terrain with water
+ {
+ }
+
+protected:
+
+ cNoise m_Noise;
+ int m_SeaLevel;
+
+ // cTerrainCompositionGen overrides:
+ virtual void ComposeTerrain(
+ int a_ChunkX, int a_ChunkZ,
+ cChunkDef::BlockTypes & a_BlockTypes, // BlockTypes to be generated
+ cChunkDef::BlockNibbles & a_BlockMeta, // BlockMetas to be generated
+ const cChunkDef::HeightMap & a_HeightMap, // The height map to fit
+ const cChunkDef::BiomeMap & a_BiomeMap, // Biomes to adhere to
cEntityList & a_Entities, // Entitites may be generated along with the terrain
cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...)
) override;
+
+ void FillColumnGrass (int a_RelX, int a_RelZ, int a_Height, cChunkDef::BlockTypes & a_BlockTypes);
+ void FillColumnSand (int a_RelX, int a_RelZ, int a_Height, cChunkDef::BlockTypes & a_BlockTypes);
+ void FillColumnMycelium (int a_RelX, int a_RelZ, int a_Height, cChunkDef::BlockTypes & a_BlockTypes);
+ void FillColumnWaterSand(int a_RelX, int a_RelZ, int a_Height, cChunkDef::BlockTypes & a_BlockTypes);
+
+ void FillColumnWaterMix (int a_ChunkX, int a_ChunkZ, int a_RelX, int a_RelZ, int a_Height, cChunkDef::BlockTypes & a_BlockTypes);
+
+ void FillColumnPattern (int a_RelX, int a_RelZ, int a_Height, cChunkDef::BlockTypes & a_BlockTypes, const BLOCKTYPE * a_Pattern, int a_PatternSize);
} ;
|