Added PieceStructures generator.
This commit is contained in:
@@ -85,9 +85,24 @@ public:
|
||||
int a_MaxStructureSizeX, int a_MaxStructureSizeZ,
|
||||
size_t a_MaxCacheSize
|
||||
);
|
||||
|
||||
/** Creates a new instance that has the generation parameters set to defaults.
|
||||
This is used for instances that are later loaded from a file. */
|
||||
cGridStructGen(int a_Seed);
|
||||
|
||||
/** Sets the generator params based on the dictionary passed in.
|
||||
Note that this must not be called anymore after generating a chunk. */
|
||||
void SetGeneratorParams(const AStringMap & a_GeneratorParams);
|
||||
|
||||
// cFinishGen override:
|
||||
virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;
|
||||
|
||||
protected:
|
||||
/** Seed for generating grid offsets and also available for descendants. */
|
||||
/** Base seed of the world for which the generator generates chunk. */
|
||||
int m_BaseSeed;
|
||||
|
||||
/** Seed for generating grid offsets and also available for descendants.
|
||||
Calculated from m_BaseSeed by adding the SeedOffset parameter loaded from the cubeset file (if applicable); otherwise the same as m_BaseSeed. */
|
||||
int m_Seed;
|
||||
|
||||
/** The noise used for generating grid offsets. */
|
||||
@@ -131,9 +146,6 @@ protected:
|
||||
around their gridpoint intersects the chunk. */
|
||||
void GetStructuresForChunk(int a_ChunkX, int a_ChunkZ, cStructurePtrs & a_Structures);
|
||||
|
||||
// cFinishGen overrides:
|
||||
virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;
|
||||
|
||||
// Functions for the descendants to override:
|
||||
/** Create a new structure at the specified gridpoint */
|
||||
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) = 0;
|
||||
|
||||
Reference in New Issue
Block a user