1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
// CompoGen.h
/* Interfaces to the various terrain composition generators:
- cCompoGenSameBlock
- cCompoGenDebugBiomes
- cCompoGenClassic
*/
#pragma once
#include "cChunkGenerator.h"
class cCompoGenSameBlock :
public cTerrainCompositionGen
{
public:
cCompoGenSameBlock(BLOCKTYPE a_BlockType, bool a_IsBedrocked) :
m_BlockType(a_BlockType),
m_IsBedrocked(a_IsBedrocked)
{}
protected:
BLOCKTYPE m_BlockType;
bool m_IsBedrocked;
// 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
cEntityList & a_Entities, // Entitites may be generated along with the terrain
cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...)
) override;
} ;
class cCompoGenDebugBiomes :
public cTerrainCompositionGen
{
public:
cCompoGenDebugBiomes(cBiomeGen * a_BiomeGen) : m_BiomeGen(a_BiomeGen) {}
protected:
cBiomeGen * m_BiomeGen;
// 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
cEntityList & a_Entities, // Entitites may be generated along with the terrain
cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...)
) override;
} ;
class cCompoGenClassic :
public cTerrainCompositionGen
{
public:
cCompoGenClassic(int a_SeaLevel, int a_BeachHeight, int a_BeachDepth);
protected:
int m_SeaLevel;
int m_BeachHeight;
int m_BeachDepth;
// 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
cEntityList & a_Entities, // Entitites may be generated along with the terrain
cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...)
) override;
} ;
|