summaryrefslogtreecommitdiffstats
path: root/src/Generating/MineShafts.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-09 10:59:33 +0200
committerMattes D <github@xoft.cz>2014-05-09 10:59:33 +0200
commit14543aa3fc204f38d0ab402d4c257d533619a983 (patch)
treeb0b100958c848258416a9b06f9bbf6b5b28877d6 /src/Generating/MineShafts.h
parentFixed cGridStructGen. (diff)
downloadcuberite-14543aa3fc204f38d0ab402d4c257d533619a983.tar
cuberite-14543aa3fc204f38d0ab402d4c257d533619a983.tar.gz
cuberite-14543aa3fc204f38d0ab402d4c257d533619a983.tar.bz2
cuberite-14543aa3fc204f38d0ab402d4c257d533619a983.tar.lz
cuberite-14543aa3fc204f38d0ab402d4c257d533619a983.tar.xz
cuberite-14543aa3fc204f38d0ab402d4c257d533619a983.tar.zst
cuberite-14543aa3fc204f38d0ab402d4c257d533619a983.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/MineShafts.h34
1 files changed, 12 insertions, 22 deletions
diff --git a/src/Generating/MineShafts.h b/src/Generating/MineShafts.h
index ba32e75ad..c29b6cdac 100644
--- a/src/Generating/MineShafts.h
+++ b/src/Generating/MineShafts.h
@@ -9,7 +9,7 @@
#pragma once
-#include "ComposableGenerator.h"
+#include "GridStructGen.h"
#include "../Noise.h"
@@ -17,16 +17,16 @@
class cStructGenMineShafts :
- public cFinishGen
+ public cGridStructGen
{
+ typedef cGridStructGen super;
+
public:
cStructGenMineShafts(
int a_Seed, int a_GridSize, int a_MaxSystemSize,
int a_ChanceCorridor, int a_ChanceCrossing, int a_ChanceStaircase
);
- virtual ~cStructGenMineShafts();
-
protected:
friend class cMineShaft;
friend class cMineShaftDirtRoom;
@@ -34,26 +34,16 @@ protected:
friend class cMineShaftCrossing;
friend class cMineShaftStaircase;
class cMineShaftSystem; // fwd: MineShafts.cpp
- typedef std::list<cMineShaftSystem *> cMineShaftSystems;
- cNoise m_Noise;
- int m_GridSize; ///< Average spacing of the systems
- int m_MaxSystemSize; ///< Maximum blcok size of a mineshaft system
- int m_ProbLevelCorridor; ///< Probability level of a branch object being the corridor
- int m_ProbLevelCrossing; ///< Probability level of a branch object being the crossing, minus Corridor
- int m_ProbLevelStaircase; ///< Probability level of a branch object being the staircase, minus Crossing
- cMineShaftSystems m_Cache; ///< Cache of the most recently used systems. MoveToFront used.
+ cNoise m_Noise;
+ int m_GridSize; ///< Average spacing of the systems
+ int m_MaxSystemSize; ///< Maximum blcok size of a mineshaft system
+ int m_ProbLevelCorridor; ///< Probability level of a branch object being the corridor
+ int m_ProbLevelCrossing; ///< Probability level of a branch object being the crossing, minus Corridor
+ int m_ProbLevelStaircase; ///< Probability level of a branch object being the staircase, minus Crossing
- /// Clears everything from the cache
- void ClearCache(void);
-
- /** Returns all systems that *may* intersect the given chunk.
- All the systems are valid until the next call to this function (which may delete some of the pointers).
- */
- void GetMineShaftSystemsForChunk(int a_ChunkX, int a_ChunkZ, cMineShaftSystems & a_MineShaftSystems);
-
- // cFinishGen overrides:
- virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;
+ // cGridStructGen overrides:
+ virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override;
} ;