Re-worked generator subobject ownership, added a cache for the CompositionGen

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1447 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-05-05 19:56:45 +00:00
parent 6b35c64658
commit e88cdf8da7
10 changed files with 187 additions and 66 deletions
+5 -6
View File
@@ -148,13 +148,12 @@ protected:
cStructureGenList m_StructureGens;
cFinishGenList m_FinishGens;
// Specific generators that can be reused for different purposes - we don't want to create multiple objects for them
cNoise3DComposable * m_Noise3DComposable;
int m_NumNoise3DComposableUses; ///< How many times is it actually used?
cDistortedHeightmap * m_DistortedHeightmap;
int m_NumDistortedHeightmapUses; ///< How many times is it actually used?
// Generators underlying the caches:
cBiomeGen * m_UnderlyingBiomeGen;
cTerrainHeightGen * m_UnderlyingHeightGen;
cTerrainCompositionGen * m_UnderlyingCompositionGen;
/// Reads the biome gen settings from the ini and initializes m_BiomeGen accordingly
void InitBiomeGen(cIniFile & a_IniFile);