diff options
author | Mattes D <github@xoft.cz> | 2014-10-19 14:01:59 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-10-19 14:01:59 +0200 |
commit | e0cfbc4d8526a1a1d3afa8fc0774358f4f18b7e2 (patch) | |
tree | d61cac715328f06c58c506dd74b8ee818a0c28ad /src/Generating/HeiGen.cpp | |
parent | cLuaState: cMonster descendants don't push their specific type. (diff) | |
download | cuberite-e0cfbc4d8526a1a1d3afa8fc0774358f4f18b7e2.tar cuberite-e0cfbc4d8526a1a1d3afa8fc0774358f4f18b7e2.tar.gz cuberite-e0cfbc4d8526a1a1d3afa8fc0774358f4f18b7e2.tar.bz2 cuberite-e0cfbc4d8526a1a1d3afa8fc0774358f4f18b7e2.tar.lz cuberite-e0cfbc4d8526a1a1d3afa8fc0774358f4f18b7e2.tar.xz cuberite-e0cfbc4d8526a1a1d3afa8fc0774358f4f18b7e2.tar.zst cuberite-e0cfbc4d8526a1a1d3afa8fc0774358f4f18b7e2.zip |
Diffstat (limited to 'src/Generating/HeiGen.cpp')
-rw-r--r-- | src/Generating/HeiGen.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Generating/HeiGen.cpp b/src/Generating/HeiGen.cpp index 79d529a6a..23f589f55 100644 --- a/src/Generating/HeiGen.cpp +++ b/src/Generating/HeiGen.cpp @@ -19,7 +19,7 @@ //////////////////////////////////////////////////////////////////////////////// // cTerrainHeightGen: -cTerrainHeightGen * cTerrainHeightGen::CreateHeightGen(cIniFile &a_IniFile, cBiomeGen & a_BiomeGen, int a_Seed, bool & a_CacheOffByDefault) +cTerrainHeightGenPtr cTerrainHeightGen::CreateHeightGen(cIniFile & a_IniFile, cBiomeGenPtr a_BiomeGen, int a_Seed, bool & a_CacheOffByDefault) { AString HeightGenName = a_IniFile.GetValueSet("Generator", "HeightGen", ""); if (HeightGenName.empty()) @@ -84,7 +84,7 @@ cTerrainHeightGen * cTerrainHeightGen::CreateHeightGen(cIniFile &a_IniFile, cBio // Read the settings: res->InitializeHeightGen(a_IniFile); - return res; + return cTerrainHeightGenPtr(res); } @@ -118,7 +118,7 @@ void cHeiGenFlat::InitializeHeightGen(cIniFile & a_IniFile) //////////////////////////////////////////////////////////////////////////////// // cHeiGenCache: -cHeiGenCache::cHeiGenCache(cTerrainHeightGen & a_HeiGenToCache, int a_CacheSize) : +cHeiGenCache::cHeiGenCache(cTerrainHeightGenPtr a_HeiGenToCache, int a_CacheSize) : m_HeiGenToCache(a_HeiGenToCache), m_CacheSize(a_CacheSize), m_CacheOrder(new int[a_CacheSize]), @@ -190,7 +190,7 @@ void cHeiGenCache::GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap // Not in the cache: m_NumMisses++; - m_HeiGenToCache.GenHeightMap(a_ChunkX, a_ChunkZ, a_HeightMap); + m_HeiGenToCache->GenHeightMap(a_ChunkX, a_ChunkZ, a_HeightMap); // Insert it as the first item in the MRU order: int Idx = m_CacheOrder[m_CacheSize - 1]; @@ -210,7 +210,7 @@ void cHeiGenCache::GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap void cHeiGenCache::InitializeHeightGen(cIniFile & a_IniFile) { - m_HeiGenToCache.InitializeHeightGen(a_IniFile); + m_HeiGenToCache->InitializeHeightGen(a_IniFile); } @@ -479,7 +479,7 @@ void cHeiGenBiomal::GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMa { for (int x = -1; x <= 1; x++) { - m_BiomeGen.GenBiomes(a_ChunkX + x, a_ChunkZ + z, Biomes[x + 1][z + 1]); + m_BiomeGen->GenBiomes(a_ChunkX + x, a_ChunkZ + z, Biomes[x + 1][z + 1]); } // for x } // for z |