From b521456a01fbb89a48677109b0473968f82f2dbc Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 27 Jul 2012 16:47:55 +0000 Subject: Initial WormNestCaves commit. Won't generate caves, only the schematic for caves' centers. git-svn-id: http://mc-server.googlecode.com/svn/trunk@696 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Caves.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'source/Caves.h') diff --git a/source/Caves.h b/source/Caves.h index ec3ecdf0f..8af9974fe 100644 --- a/source/Caves.h +++ b/source/Caves.h @@ -78,9 +78,11 @@ class cStructGenWormNestCaves : public cStructureGen { public: - cStructGenWormNestCaves(int a_Seed, int a_Size = 128) : + cStructGenWormNestCaves(int a_Seed, int a_Size = 64, int a_Grid = 96, int a_MaxOffset = 128) : m_Noise(a_Seed), - m_Size(128) + m_Size(a_Size), + m_Grid(a_Grid), + m_MaxOffset(a_MaxOffset) { } @@ -88,17 +90,19 @@ public: protected: class cCaveSystem; // fwd: Caves.cpp - typedef std::list cCaves; + typedef std::list cCaveSystems; - cNoise m_Noise; - int m_Size; // relative size, in blocks, of the nests produced. Also used for spacing. - cCaves m_Cache; + cNoise m_Noise; + int m_Size; // relative size of the cave systems' caves. Average number of blocks of each initial tunnel + int m_MaxOffset; // maximum offset of the cave nest origin from the grid cell the nest belongs to + int m_Grid; // average spacing of the nests + cCaveSystems m_Cache; /// Clears everything from the cache void ClearCache(void); /// Returns all caves that *may* intersect the given chunk. All the caves are valid until the next call to this function. - void GetCavesForChunk(int a_ChunkX, int a_ChunkZ, cCaves & a_Caves); + void GetCavesForChunk(int a_ChunkX, int a_ChunkZ, cCaveSystems & a_Caves); // cStructGen override: virtual void GenStructures( -- cgit v1.2.3