mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Mapgens: Rename m_emerge to prevent name collisions
This commit is contained in:
parent
2b8180a417
commit
00fc0babe0
@ -50,7 +50,7 @@ FlagDesc flagdesc_mapgen_v5[] = {
|
|||||||
MapgenV5::MapgenV5(int mapgenid, MapgenParams *params, EmergeManager *emerge)
|
MapgenV5::MapgenV5(int mapgenid, MapgenParams *params, EmergeManager *emerge)
|
||||||
: Mapgen(mapgenid, params, emerge)
|
: Mapgen(mapgenid, params, emerge)
|
||||||
{
|
{
|
||||||
this->emerge = emerge;
|
this->m_emerge = emerge;
|
||||||
this->bmgr = emerge->biomemgr;
|
this->bmgr = emerge->biomemgr;
|
||||||
|
|
||||||
// amount of elements to skip for the next index
|
// amount of elements to skip for the next index
|
||||||
@ -240,7 +240,7 @@ void MapgenV5::makeChunk(BlockMakeData *data) {
|
|||||||
full_node_max = (blockpos_max + 2) * MAP_BLOCKSIZE - v3s16(1, 1, 1);
|
full_node_max = (blockpos_max + 2) * MAP_BLOCKSIZE - v3s16(1, 1, 1);
|
||||||
|
|
||||||
// Create a block-specific seed
|
// Create a block-specific seed
|
||||||
blockseed = emerge->getBlockSeed(full_node_min); //////use getBlockSeed2()!
|
blockseed = m_emerge->getBlockSeed(full_node_min); //////use getBlockSeed2()!
|
||||||
|
|
||||||
// Make some noise
|
// Make some noise
|
||||||
calculateNoise();
|
calculateNoise();
|
||||||
@ -268,10 +268,10 @@ void MapgenV5::makeChunk(BlockMakeData *data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate the registered decorations
|
// Generate the registered decorations
|
||||||
emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Generate the registered ores
|
// Generate the registered ores
|
||||||
emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
|
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Sprinkle some dust on top after everything else was generated
|
// Sprinkle some dust on top after everything else was generated
|
||||||
dustTopNodes();
|
dustTopNodes();
|
||||||
|
@ -49,7 +49,7 @@ struct MapgenV5Params : public MapgenSpecificParams {
|
|||||||
|
|
||||||
class MapgenV5 : public Mapgen {
|
class MapgenV5 : public Mapgen {
|
||||||
public:
|
public:
|
||||||
EmergeManager *emerge;
|
EmergeManager *m_emerge;
|
||||||
BiomeManager *bmgr;
|
BiomeManager *bmgr;
|
||||||
|
|
||||||
int ystride;
|
int ystride;
|
||||||
|
@ -52,7 +52,7 @@ FlagDesc flagdesc_mapgen_v6[] = {
|
|||||||
MapgenV6::MapgenV6(int mapgenid, MapgenParams *params, EmergeManager *emerge)
|
MapgenV6::MapgenV6(int mapgenid, MapgenParams *params, EmergeManager *emerge)
|
||||||
: Mapgen(mapgenid, params, emerge)
|
: Mapgen(mapgenid, params, emerge)
|
||||||
{
|
{
|
||||||
this->emerge = emerge;
|
this->m_emerge = emerge;
|
||||||
this->ystride = csize.X; //////fix this
|
this->ystride = csize.X; //////fix this
|
||||||
|
|
||||||
MapgenV6Params *sp = (MapgenV6Params *)params->sparams;
|
MapgenV6Params *sp = (MapgenV6Params *)params->sparams;
|
||||||
@ -529,10 +529,10 @@ void MapgenV6::makeChunk(BlockMakeData *data) {
|
|||||||
placeTreesAndJungleGrass();
|
placeTreesAndJungleGrass();
|
||||||
|
|
||||||
// Generate the registered decorations
|
// Generate the registered decorations
|
||||||
emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Generate the registered ores
|
// Generate the registered ores
|
||||||
emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
|
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Calculate lighting
|
// Calculate lighting
|
||||||
if (flags & MG_LIGHT)
|
if (flags & MG_LIGHT)
|
||||||
|
@ -65,7 +65,7 @@ struct MapgenV6Params : public MapgenSpecificParams {
|
|||||||
|
|
||||||
class MapgenV6 : public Mapgen {
|
class MapgenV6 : public Mapgen {
|
||||||
public:
|
public:
|
||||||
EmergeManager *emerge;
|
EmergeManager *m_emerge;
|
||||||
|
|
||||||
int ystride;
|
int ystride;
|
||||||
u32 spflags;
|
u32 spflags;
|
||||||
|
@ -52,7 +52,7 @@ FlagDesc flagdesc_mapgen_v7[] = {
|
|||||||
MapgenV7::MapgenV7(int mapgenid, MapgenParams *params, EmergeManager *emerge)
|
MapgenV7::MapgenV7(int mapgenid, MapgenParams *params, EmergeManager *emerge)
|
||||||
: Mapgen(mapgenid, params, emerge)
|
: Mapgen(mapgenid, params, emerge)
|
||||||
{
|
{
|
||||||
this->emerge = emerge;
|
this->m_emerge = emerge;
|
||||||
this->bmgr = emerge->biomemgr;
|
this->bmgr = emerge->biomemgr;
|
||||||
|
|
||||||
//// amount of elements to skip for the next index
|
//// amount of elements to skip for the next index
|
||||||
@ -215,7 +215,7 @@ void MapgenV7::makeChunk(BlockMakeData *data) {
|
|||||||
full_node_min = (blockpos_min - 1) * MAP_BLOCKSIZE;
|
full_node_min = (blockpos_min - 1) * MAP_BLOCKSIZE;
|
||||||
full_node_max = (blockpos_max + 2) * MAP_BLOCKSIZE - v3s16(1, 1, 1);
|
full_node_max = (blockpos_max + 2) * MAP_BLOCKSIZE - v3s16(1, 1, 1);
|
||||||
|
|
||||||
blockseed = emerge->getBlockSeed(full_node_min); //////use getBlockSeed2()!
|
blockseed = m_emerge->getBlockSeed(full_node_min); //////use getBlockSeed2()!
|
||||||
|
|
||||||
// Make some noise
|
// Make some noise
|
||||||
calculateNoise();
|
calculateNoise();
|
||||||
@ -241,10 +241,10 @@ void MapgenV7::makeChunk(BlockMakeData *data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate the registered decorations
|
// Generate the registered decorations
|
||||||
emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Generate the registered ores
|
// Generate the registered ores
|
||||||
emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
|
m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Sprinkle some dust on top after everything else was generated
|
// Sprinkle some dust on top after everything else was generated
|
||||||
dustTopNodes();
|
dustTopNodes();
|
||||||
|
@ -52,7 +52,7 @@ struct MapgenV7Params : public MapgenSpecificParams {
|
|||||||
|
|
||||||
class MapgenV7 : public Mapgen {
|
class MapgenV7 : public Mapgen {
|
||||||
public:
|
public:
|
||||||
EmergeManager *emerge;
|
EmergeManager *m_emerge;
|
||||||
BiomeManager *bmgr;
|
BiomeManager *bmgr;
|
||||||
|
|
||||||
int ystride;
|
int ystride;
|
||||||
|
Loading…
Reference in New Issue
Block a user