Merge branch 'master' into portals

Conflicts:
	src/Chunk.cpp
	src/Entities/Entity.h
	src/Entities/Player.h
This commit is contained in:
Tiger Wang
2014-06-21 22:14:23 +01:00
103 changed files with 5739 additions and 3568 deletions
+15 -8
View File
@@ -135,7 +135,9 @@ cBioGenCache::cBioGenCache(cBiomeGen * a_BioGenToCache, int a_CacheSize) :
cBioGenCache::~cBioGenCache()
{
delete[] m_CacheData;
m_CacheData = NULL;
delete[] m_CacheOrder;
m_CacheOrder = NULL;
}
@@ -745,7 +747,12 @@ cBioGenTwoLevel::cBioGenTwoLevel(int a_Seed) :
m_VoronoiSmall(a_Seed + 2000),
m_DistortX(a_Seed + 3000),
m_DistortZ(a_Seed + 4000),
m_Noise(a_Seed + 5000)
m_Noise1(a_Seed + 5001),
m_Noise2(a_Seed + 5002),
m_Noise3(a_Seed + 5003),
m_Noise4(a_Seed + 5004),
m_Noise5(a_Seed + 5005),
m_Noise6(a_Seed + 5006)
{
}
@@ -767,12 +774,12 @@ void cBioGenTwoLevel::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap
int BlockZ = BaseZ + z * 4;
float BlockXF = (float)(16 * BlockX) / 128;
float BlockZF = (float)(16 * BlockZ) / 128;
double NoiseX = m_Noise.CubicNoise3D(BlockXF / 16, BlockZF / 16, 1000);
NoiseX += 0.5 * m_Noise.CubicNoise3D(BlockXF / 8, BlockZF / 8, 2000);
NoiseX += 0.08 * m_Noise.CubicNoise3D(BlockXF, BlockZF, 3000);
double NoiseZ = m_Noise.CubicNoise3D(BlockXF / 16, BlockZF / 16, 4000);
NoiseZ += 0.5 * m_Noise.CubicNoise3D(BlockXF / 8, BlockZF / 8, 5000);
NoiseZ += 0.08 * m_Noise.CubicNoise3D(BlockXF, BlockZF, 6000);
double NoiseX = m_Noise1.CubicNoise2D(BlockXF / 16, BlockZF / 16);
NoiseX += 0.5 * m_Noise2.CubicNoise2D(BlockXF / 8, BlockZF / 8);
NoiseX += 0.08 * m_Noise3.CubicNoise2D(BlockXF, BlockZF);
double NoiseZ = m_Noise4.CubicNoise2D(BlockXF / 16, BlockZF / 16);
NoiseZ += 0.5 * m_Noise5.CubicNoise2D(BlockXF / 8, BlockZF / 8);
NoiseZ += 0.08 * m_Noise6.CubicNoise2D(BlockXF, BlockZF);
DistortX[4 * x][4 * z] = BlockX + (int)(64 * NoiseX);
DistortZ[4 * x][4 * z] = BlockZ + (int)(64 * NoiseZ);
@@ -786,8 +793,8 @@ void cBioGenTwoLevel::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap
{
for (int x = 0; x < cChunkDef::Width; x++)
{
int BiomeGroup = m_VoronoiLarge.GetValueAt(DistortX[x][z], DistortZ[x][z]) / 7;
int MinDist1, MinDist2;
int BiomeGroup = m_VoronoiLarge.GetValueAt(DistortX[x][z], DistortZ[x][z], MinDist1, MinDist2) / 7;
int BiomeIdx = m_VoronoiSmall.GetValueAt(DistortX[x][z], DistortZ[x][z], MinDist1, MinDist2) / 11;
cChunkDef::SetBiome(a_BiomeMap, x, z, SelectBiome(BiomeGroup, BiomeIdx, (MinDist1 < MinDist2 / 4) ? 0 : 1));
}
+6 -1
View File
@@ -261,7 +261,12 @@ protected:
/// The noise used to distort the inupt Z coord
cPerlinNoise m_DistortZ;
cNoise m_Noise;
cNoise m_Noise1;
cNoise m_Noise2;
cNoise m_Noise3;
cNoise m_Noise4;
cNoise m_Noise5;
cNoise m_Noise6;
// cBiomeGen overrides:
+5 -5
View File
@@ -125,7 +125,7 @@ public:
int m_BlockX;
int m_BlockZ;
cCaveSystem(int a_OriginX, int a_OriginZ, int a_MaxOffset, int a_Size, cNoise & a_Noise);
cCaveSystem(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_MaxOffset, int a_Size, cNoise & a_Noise);
~cCaveSystem();
protected:
@@ -574,8 +574,8 @@ AString cCaveTunnel::ExportAsSVG(int a_Color, int a_OffsetX, int a_OffsetZ) cons
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cStructGenWormNestCaves::cCaveSystem:
cStructGenWormNestCaves::cCaveSystem::cCaveSystem(int a_OriginX, int a_OriginZ, int a_MaxOffset, int a_Size, cNoise & a_Noise) :
super(a_OriginX, a_OriginZ),
cStructGenWormNestCaves::cCaveSystem::cCaveSystem(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_MaxOffset, int a_Size, cNoise & a_Noise) :
super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_Size(a_Size)
{
int Num = 1 + a_Noise.IntNoise2DInt(a_OriginX, a_OriginZ) % 3;
@@ -690,9 +690,9 @@ int cStructGenWormNestCaves::cCaveSystem::GetRadius(cNoise & a_Noise, int a_Orig
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cStructGenWormNestCaves:
cGridStructGen::cStructurePtr cStructGenWormNestCaves::CreateStructure(int a_OriginX, int a_OriginZ)
cGridStructGen::cStructurePtr cStructGenWormNestCaves::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
{
return cStructurePtr(new cCaveSystem(a_OriginX, a_OriginZ, m_MaxOffset, m_Size, m_Noise));
return cStructurePtr(new cCaveSystem(a_GridX, a_GridZ, a_OriginX, a_OriginZ, m_MaxOffset, m_Size, m_Noise));
}
+2 -2
View File
@@ -69,7 +69,7 @@ class cStructGenWormNestCaves :
typedef cGridStructGen super;
public:
cStructGenWormNestCaves(int a_Seed, int a_Size = 64, int a_Grid = 96, int a_MaxOffset = 128) :
super(a_Seed, a_Grid, a_Grid, a_Size + a_MaxOffset, a_Size + a_MaxOffset, 100),
super(a_Seed, a_Grid, a_Grid, a_MaxOffset, a_MaxOffset, a_Size, a_Size, 100),
m_Noise(a_Seed),
m_Size(a_Size),
m_MaxOffset(a_MaxOffset),
@@ -86,7 +86,7 @@ protected:
int m_Grid; // average spacing of the nests
// cGridStructGen override:
virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override;
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
} ;
+2
View File
@@ -672,7 +672,9 @@ cCompoGenCache::cCompoGenCache(cTerrainCompositionGen & a_Underlying, int a_Cach
cCompoGenCache::~cCompoGenCache()
{
delete[] m_CacheData;
m_CacheData = NULL;
delete[] m_CacheOrder;
m_CacheOrder = NULL;
}
+27 -14
View File
@@ -26,6 +26,7 @@
#include "POCPieceGenerator.h"
#include "RainbowRoadsGen.h"
#include "Ravines.h"
#include "TestRailsGen.h"
#include "UnderwaterBaseGen.h"
#include "VillageGen.h"
@@ -343,12 +344,13 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
else if (NoCaseCompare(*itr, "MineShafts") == 0)
{
int GridSize = a_IniFile.GetValueSetI("Generator", "MineShaftsGridSize", 512);
int MaxOffset = a_IniFile.GetValueSetI("Generator", "MineShaftsMaxOffset", 256);
int MaxSystemSize = a_IniFile.GetValueSetI("Generator", "MineShaftsMaxSystemSize", 160);
int ChanceCorridor = a_IniFile.GetValueSetI("Generator", "MineShaftsChanceCorridor", 600);
int ChanceCrossing = a_IniFile.GetValueSetI("Generator", "MineShaftsChanceCrossing", 200);
int ChanceStaircase = a_IniFile.GetValueSetI("Generator", "MineShaftsChanceStaircase", 200);
m_FinishGens.push_back(new cStructGenMineShafts(
Seed, GridSize, MaxSystemSize,
Seed, GridSize, MaxOffset, MaxSystemSize,
ChanceCorridor, ChanceCrossing, ChanceStaircase
));
}
@@ -362,9 +364,10 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
}
else if (NoCaseCompare(*itr, "NetherForts") == 0)
{
int GridSize = a_IniFile.GetValueSetI("Generator", "NetherFortsGridSize", 512);
int MaxDepth = a_IniFile.GetValueSetI("Generator", "NetherFortsMaxDepth", 12);
m_FinishGens.push_back(new cNetherFortGen(Seed, GridSize, MaxDepth));
int GridSize = a_IniFile.GetValueSetI("Generator", "NetherFortsGridSize", 512);
int MaxOffset = a_IniFile.GetValueSetI("Generator", "NetherFortMaxOffset", 128);
int MaxDepth = a_IniFile.GetValueSetI("Generator", "NetherFortsMaxDepth", 12);
m_FinishGens.push_back(new cNetherFortGen(Seed, GridSize, MaxOffset, MaxDepth));
}
else if (NoCaseCompare(*itr, "OreNests") == 0)
{
@@ -380,10 +383,11 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
}
else if (NoCaseCompare(*itr, "RainbowRoads") == 0)
{
int GridSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsGridSize", 512);
int MaxDepth = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxDepth", 30);
int MaxSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxSize", 260);
m_FinishGens.push_back(new cRainbowRoadsGen(Seed, GridSize, MaxDepth, MaxSize));
int GridSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsGridSize", 512);
int MaxOffset = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxOffset", 128);
int MaxDepth = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxDepth", 30);
int MaxSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxSize", 260);
m_FinishGens.push_back(new cRainbowRoadsGen(Seed, GridSize, MaxOffset, MaxDepth, MaxSize));
}
else if (NoCaseCompare(*itr, "Ravines") == 0)
{
@@ -397,25 +401,31 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
{
m_FinishGens.push_back(new cFinishGenSprinkleFoliage(Seed));
}
else if (NoCaseCompare(*itr, "TestRails") == 0)
{
m_FinishGens.push_back(new cTestRailsGen(Seed, 100, 1, 7, 50));
}
else if (NoCaseCompare(*itr, "Trees") == 0)
{
m_FinishGens.push_back(new cStructGenTrees(Seed, m_BiomeGen, m_HeightGen, m_CompositionGen));
}
else if (NoCaseCompare(*itr, "UnderwaterBases") == 0)
{
int GridSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseGridSize", 1024);
int MaxDepth = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxDepth", 7);
int MaxSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxSize", 128);
m_FinishGens.push_back(new cUnderwaterBaseGen(Seed, GridSize, MaxDepth, MaxSize, *m_BiomeGen));
int GridSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseGridSize", 1024);
int MaxOffset = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxOffset", 128);
int MaxDepth = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxDepth", 7);
int MaxSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxSize", 128);
m_FinishGens.push_back(new cUnderwaterBaseGen(Seed, GridSize, MaxOffset, MaxDepth, MaxSize, *m_BiomeGen));
}
else if (NoCaseCompare(*itr, "Villages") == 0)
{
int GridSize = a_IniFile.GetValueSetI("Generator", "VillageGridSize", 384);
int MaxOffset = a_IniFile.GetValueSetI("Generator", "VillageMaxOffset", 128);
int MaxDepth = a_IniFile.GetValueSetI("Generator", "VillageMaxDepth", 2);
int MaxSize = a_IniFile.GetValueSetI("Generator", "VillageMaxSize", 128);
int MinDensity = a_IniFile.GetValueSetI("Generator", "VillageMinDensity", 50);
int MaxDensity = a_IniFile.GetValueSetI("Generator", "VillageMaxDensity", 80);
m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxDepth, MaxSize, MinDensity, MaxDensity, *m_BiomeGen, *m_HeightGen));
m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxOffset, MaxDepth, MaxSize, MinDensity, MaxDensity, *m_BiomeGen, *m_HeightGen));
}
else if (NoCaseCompare(*itr, "WaterLakes") == 0)
{
@@ -428,7 +438,10 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
}
else if (NoCaseCompare(*itr, "WormNestCaves") == 0)
{
m_FinishGens.push_back(new cStructGenWormNestCaves(Seed));
int Size = a_IniFile.GetValueSetI("Generator", "WormNestCavesSize", 64);
int Grid = a_IniFile.GetValueSetI("Generator", "WormNestCavesGrid", 96);
int MaxOffset = a_IniFile.GetValueSetI("Generator", "WormNestMaxOffset", 32);
m_FinishGens.push_back(new cStructGenWormNestCaves(Seed, Size, Grid, MaxOffset));
}
else
{
+20 -15
View File
@@ -21,8 +21,8 @@ class cEmptyStructure :
typedef cGridStructGen::cStructure super;
public:
cEmptyStructure(int a_OriginX, int a_OriginZ) :
super(a_OriginX, a_OriginZ)
cEmptyStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) :
super(a_GridX, a_GridZ, a_OriginX, a_OriginZ)
{
}
@@ -40,17 +40,20 @@ protected:
cGridStructGen::cGridStructGen(
int a_Seed,
int a_GridSizeX, int a_GridSizeZ,
int a_MaxOffsetX, int a_MaxOffsetZ,
int a_MaxStructureSizeX, int a_MaxStructureSizeZ,
size_t a_MaxCacheSize
) :
m_Seed(a_Seed),
m_Noise(a_Seed),
m_GridSizeX(a_GridSizeX),
m_GridSizeZ(a_GridSizeZ),
m_MaxOffsetX(a_MaxOffsetX),
m_MaxOffsetZ(a_MaxOffsetZ),
m_MaxStructureSizeX(a_MaxStructureSizeX),
m_MaxStructureSizeZ(a_MaxStructureSizeZ),
m_MaxCacheSize(a_MaxCacheSize)
{
size_t NumStructuresPerQuery = (size_t)((m_MaxStructureSizeX / m_GridSizeX + 1) * (m_MaxStructureSizeZ / m_GridSizeZ + 1));
size_t NumStructuresPerQuery = (size_t)(((m_MaxStructureSizeX + m_MaxOffsetX) / m_GridSizeX + 1) * ((m_MaxStructureSizeZ + m_MaxOffsetZ) / m_GridSizeZ + 1));
if (NumStructuresPerQuery > m_MaxCacheSize)
{
m_MaxCacheSize = NumStructuresPerQuery * 4;
@@ -68,10 +71,10 @@ cGridStructGen::cGridStructGen(
void cGridStructGen::GetStructuresForChunk(int a_ChunkX, int a_ChunkZ, cStructurePtrs & a_Structures)
{
// Calculate the min and max grid coords of the structures to be returned:
int MinBlockX = a_ChunkX * cChunkDef::Width - m_MaxStructureSizeX;
int MinBlockZ = a_ChunkZ * cChunkDef::Width - m_MaxStructureSizeZ;
int MaxBlockX = a_ChunkX * cChunkDef::Width + m_MaxStructureSizeX + cChunkDef::Width - 1;
int MaxBlockZ = a_ChunkZ * cChunkDef::Width + m_MaxStructureSizeZ + cChunkDef::Width - 1;
int MinBlockX = a_ChunkX * cChunkDef::Width - m_MaxStructureSizeX - m_MaxOffsetX;
int MinBlockZ = a_ChunkZ * cChunkDef::Width - m_MaxStructureSizeZ - m_MaxOffsetZ;
int MaxBlockX = a_ChunkX * cChunkDef::Width + m_MaxStructureSizeX + m_MaxOffsetX + cChunkDef::Width - 1;
int MaxBlockZ = a_ChunkZ * cChunkDef::Width + m_MaxStructureSizeZ + m_MaxOffsetZ + cChunkDef::Width - 1;
int MinGridX = MinBlockX / m_GridSizeX;
int MinGridZ = MinBlockZ / m_GridSizeZ;
int MaxGridX = (MaxBlockX + m_GridSizeX - 1) / m_GridSizeX;
@@ -85,8 +88,8 @@ void cGridStructGen::GetStructuresForChunk(int a_ChunkX, int a_ChunkZ, cStructur
for (cStructurePtrs::iterator itr = m_Cache.begin(), end = m_Cache.end(); itr != end;)
{
if (
((*itr)->m_OriginX >= MinX) && ((*itr)->m_OriginX < MaxX) &&
((*itr)->m_OriginZ >= MinZ) && ((*itr)->m_OriginZ < MaxZ)
((*itr)->m_GridX >= MinX) && ((*itr)->m_GridX < MaxX) &&
((*itr)->m_GridZ >= MinZ) && ((*itr)->m_GridZ < MaxZ)
)
{
// want
@@ -103,14 +106,14 @@ void cGridStructGen::GetStructuresForChunk(int a_ChunkX, int a_ChunkZ, cStructur
// Create those structures that haven't been in the cache:
for (int x = MinGridX; x < MaxGridX; x++)
{
int OriginX = x * m_GridSizeX;
int GridX = x * m_GridSizeX;
for (int z = MinGridZ; z < MaxGridZ; z++)
{
int OriginZ = z * m_GridSizeZ;
int GridZ = z * m_GridSizeZ;
bool Found = false;
for (cStructurePtrs::const_iterator itr = a_Structures.begin(), end = a_Structures.end(); itr != end; ++itr)
{
if (((*itr)->m_OriginX == OriginX) && ((*itr)->m_OriginZ == OriginZ))
if (((*itr)->m_GridX == GridX) && ((*itr)->m_GridZ == GridZ))
{
Found = true;
break;
@@ -118,10 +121,12 @@ void cGridStructGen::GetStructuresForChunk(int a_ChunkX, int a_ChunkZ, cStructur
} // for itr - a_Structures[]
if (!Found)
{
cStructurePtr Structure = CreateStructure(OriginX, OriginZ);
int OriginX = GridX + ((m_Noise.IntNoise2DInt(GridX + 3, GridZ + 5) / 7) % (m_MaxOffsetX * 2)) - m_MaxOffsetX;
int OriginZ = GridZ + ((m_Noise.IntNoise2DInt(GridX + 5, GridZ + 3) / 7) % (m_MaxOffsetZ * 2)) - m_MaxOffsetZ;
cStructurePtr Structure = CreateStructure(GridX, GridZ, OriginX, OriginZ);
if (Structure.get() == NULL)
{
Structure.reset(new cEmptyStructure(OriginX, OriginZ));
Structure.reset(new cEmptyStructure(GridX, GridZ, OriginX, OriginZ));
}
a_Structures.push_back(Structure);
}
+27 -6
View File
@@ -10,6 +10,7 @@
#pragma once
#include "ComposableGenerator.h"
#include "../Noise.h"
@@ -19,7 +20,12 @@
Defines a grid in the XZ space with predefined cell size in each direction. Each cell then receives exactly
one structure (provided by the descendant class). The structure is placed within the cell, but doesn't need
to be bounded by the cell, it can be well outside the cell; the generator uses the MaxStructureSize parameter
to determine how far away from the cell the structure can be at most.
to determine how far away from the cell the structure can be at most. Each structure has an offset from the
grid's center point, the offset is generated randomly from a range given to this class as a parameter.
Each structure thus contains the coords of its grid center (m_GridX, m_GridZ) and the actual origin from
which it's built (m_OriginX, m_OriginZ).
This class provides a cache for the structures generated for successive chunks and manages that cache. It
also provides the cFinishGen override that uses the cache to actually generate the structure into chunk data.
@@ -43,12 +49,17 @@ public:
class cStructure
{
public:
/** The origin (the coords of the gridpoint for which the structure is generated) */
/** The grid point for which the structure is generated. */
int m_GridX, m_GridZ;
/** The origin (the coords for which the structure is generated) */
int m_OriginX, m_OriginZ;
/** Creates a structure that has its originset at the specified coords. */
cStructure (int a_OriginX, int a_OriginZ) :
/** Creates a structure that has its origin set at the specified coords. */
cStructure (int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) :
m_GridX(a_GridX),
m_GridZ(a_GridZ),
m_OriginX(a_OriginX),
m_OriginZ(a_OriginZ)
{
@@ -70,20 +81,30 @@ public:
cGridStructGen(
int a_Seed,
int a_GridSizeX, int a_GridSizeZ,
int a_MaxOffsetX, int a_MaxOffsetZ,
int a_MaxStructureSizeX, int a_MaxStructureSizeZ,
size_t a_MaxCacheSize
);
protected:
/** Seed for generating the semi-random grid. */
/** Seed for generating grid offsets and also available for descendants. */
int m_Seed;
/** The noise used for generating grid offsets. */
cNoise m_Noise;
/** The size of each grid's cell in the X axis */
int m_GridSizeX;
/** The size of each grid's cell in the Z axis */
int m_GridSizeZ;
/** The maximum offset of the structure's origin from the grid midpoint, in X coord. */
int m_MaxOffsetX;
/** The maximum offset of the structure's origin from the grid midpoint, in Z coord. */
int m_MaxOffsetZ;
/** Maximum theoretical size of the structure in the X axis.
This limits the structures considered for a single chunk, so the lesser the number, the better performance.
Structures large than this may get cropped. */
@@ -115,7 +136,7 @@ protected:
// Functions for the descendants to override:
/** Create a new structure at the specified gridpoint */
virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) = 0;
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) = 0;
} ;
+2
View File
@@ -142,7 +142,9 @@ cHeiGenCache::cHeiGenCache(cTerrainHeightGen & a_HeiGenToCache, int a_CacheSize)
cHeiGenCache::~cHeiGenCache()
{
delete[] m_CacheData;
m_CacheData = NULL;
delete[] m_CacheOrder;
m_CacheOrder = NULL;
}
+9 -7
View File
@@ -248,7 +248,8 @@ public:
/** Creates and generates the entire system */
cMineShaftSystem(
int a_OriginX, int a_OriginZ, int a_GridSize, int a_MaxSystemSize, cNoise & a_Noise,
int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ,
int a_GridSize, int a_MaxSystemSize, cNoise & a_Noise,
int a_ProbLevelCorridor, int a_ProbLevelCrossing, int a_ProbLevelStaircase
);
@@ -278,10 +279,11 @@ public:
// cStructGenMineShafts::cMineShaftSystem:
cStructGenMineShafts::cMineShaftSystem::cMineShaftSystem(
int a_OriginX, int a_OriginZ, int a_GridSize, int a_MaxSystemSize, cNoise & a_Noise,
int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ,
int a_GridSize, int a_MaxSystemSize, cNoise & a_Noise,
int a_ProbLevelCorridor, int a_ProbLevelCrossing, int a_ProbLevelStaircase
) :
super(a_OriginX, a_OriginZ),
super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_GridSize(a_GridSize),
m_MaxRecursion(8), // TODO: settable
m_ProbLevelCorridor(a_ProbLevelCorridor),
@@ -1280,10 +1282,10 @@ void cMineShaftStaircase::ProcessChunk(cChunkDesc & a_ChunkDesc)
// cStructGenMineShafts:
cStructGenMineShafts::cStructGenMineShafts(
int a_Seed, int a_GridSize, int a_MaxSystemSize,
int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxSystemSize,
int a_ChanceCorridor, int a_ChanceCrossing, int a_ChanceStaircase
) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxSystemSize, a_MaxSystemSize, 100),
super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSystemSize, a_MaxSystemSize, 100),
m_Noise(a_Seed),
m_GridSize(a_GridSize),
m_MaxSystemSize(a_MaxSystemSize),
@@ -1297,9 +1299,9 @@ cStructGenMineShafts::cStructGenMineShafts(
cGridStructGen::cStructurePtr cStructGenMineShafts::CreateStructure(int a_OriginX, int a_OriginZ)
cGridStructGen::cStructurePtr cStructGenMineShafts::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
{
return cStructurePtr(new cMineShaftSystem(a_OriginX, a_OriginZ, m_GridSize, m_MaxSystemSize, m_Noise, m_ProbLevelCorridor, m_ProbLevelCrossing, m_ProbLevelStaircase));
return cStructurePtr(new cMineShaftSystem(a_GridX, a_GridZ, a_OriginX, a_OriginZ, m_GridSize, m_MaxSystemSize, m_Noise, m_ProbLevelCorridor, m_ProbLevelCrossing, m_ProbLevelStaircase));
}
+2 -2
View File
@@ -23,7 +23,7 @@ class cStructGenMineShafts :
public:
cStructGenMineShafts(
int a_Seed, int a_GridSize, int a_MaxSystemSize,
int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxSystemSize,
int a_ChanceCorridor, int a_ChanceCrossing, int a_ChanceStaircase
);
@@ -43,7 +43,7 @@ protected:
int m_ProbLevelStaircase; ///< Probability level of a branch object being the staircase, minus Crossing
// cGridStructGen overrides:
virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override;
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
} ;
+9 -6
View File
@@ -26,8 +26,8 @@ public:
cPlacedPieces m_Pieces;
cNetherFort(cNetherFortGen & a_ParentGen, int a_OriginX, int a_OriginZ, int a_GridSize, int a_MaxDepth, int a_Seed) :
super(a_OriginX, a_OriginZ),
cNetherFort(cNetherFortGen & a_ParentGen, int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_GridSize, int a_MaxDepth, int a_Seed) :
super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_ParentGen(a_ParentGen),
m_GridSize(a_GridSize),
m_Seed(a_Seed)
@@ -108,8 +108,8 @@ cPrefabPiecePool cNetherFortGen::m_PiecePool(g_NetherFortPrefabs, g_NetherFortPr
cNetherFortGen::cNetherFortGen(int a_Seed, int a_GridSize, int a_MaxDepth) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxDepth * 10, a_MaxDepth * 10, 200),
cNetherFortGen::cNetherFortGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxDepth * 10, a_MaxDepth * 10, 200),
m_MaxDepth(a_MaxDepth)
{
/*
@@ -124,8 +124,11 @@ cNetherFortGen::cNetherFortGen(int a_Seed, int a_GridSize, int a_MaxDepth) :
cGridStructGen::cStructurePtr cNetherFortGen::CreateStructure(int a_OriginX, int a_OriginZ)
cGridStructGen::cStructurePtr cNetherFortGen::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
{
return cStructurePtr(new cNetherFort(*this, a_OriginX, a_OriginZ, m_GridSizeX, m_MaxDepth, m_Seed));
return cStructurePtr(new cNetherFort(*this, a_GridX, a_GridZ, a_OriginX, a_OriginZ, m_GridSizeX, m_MaxDepth, m_Seed));
}
+2 -2
View File
@@ -23,7 +23,7 @@ class cNetherFortGen :
typedef cGridStructGen super;
public:
cNetherFortGen(int a_Seed, int a_GridSize, int a_MaxDepth);
cNetherFortGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth);
protected:
friend class cNetherFortPerfTest; // fwd: NetherFortGen.cpp
@@ -37,7 +37,7 @@ protected:
// cGridStructGen overrides:
virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override;
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
} ;
File diff suppressed because it is too large Load Diff
+276 -108
View File
@@ -129,6 +129,176 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Farm:
// The data has been exported from the gallery Plains, area index 166, ID 554, created by Aloe_vera
{
// Size:
11, 7, 13, // SizeX = 11, SizeY = 7, SizeZ = 13
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
10, 6, 12, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 3: 0\n" /* dirt */
"b: 60: 7\n" /* tilleddirt */
"c: 8: 0\n" /* water */
"d: 43: 0\n" /* doubleslab */
"e: 44: 0\n" /* step */
"f: 59: 7\n" /* crops */
"g: 83: 0\n" /* reedblock */
"h:113: 0\n" /* netherbrickfence */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "mmmmmmmmmmm"
/* 1 */ "maaaaaaaaam"
/* 2 */ "maaaaaaaaam"
/* 3 */ "maaaaaaaaam"
/* 4 */ "maaaaaaaaam"
/* 5 */ "maaaaaaaaam"
/* 6 */ "maaaaaaaaam"
/* 7 */ "maaaaaaaaam"
/* 8 */ "maaaaaaaaam"
/* 9 */ "maaaaaaaaam"
/* 10 */ "maaaaaaaaam"
/* 11 */ "maaaaaaaaam"
/* 12 */ "mmmmmmmmmmm"
// Level 1
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "mmmmmmmmmmm"
/* 1 */ "maaaaaaaaam"
/* 2 */ "mabbbbbbbam"
/* 3 */ "mabbbbbbbam"
/* 4 */ "mabbbbbbbam"
/* 5 */ "mabbbbbbbam"
/* 6 */ "mabcccccaam"
/* 7 */ "mabbbbbbbam"
/* 8 */ "mabbbbbbbam"
/* 9 */ "mabbbbbbbam"
/* 10 */ "mabbbbbbbam"
/* 11 */ "maaaaaaaaam"
/* 12 */ "mmmmmmmmmmm"
// Level 2
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "..........."
/* 1 */ ".deeeeeeed."
/* 2 */ ".efffffffe."
/* 3 */ ".efffffffe."
/* 4 */ ".efffffffe."
/* 5 */ ".efgggggfe."
/* 6 */ ".eg.....ge."
/* 7 */ ".efgggggfe."
/* 8 */ ".efffffffe."
/* 9 */ ".efffffffe."
/* 10 */ ".efffffffe."
/* 11 */ ".deeeeeeed."
/* 12 */ "..........."
// Level 3
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "..........."
/* 1 */ ".h.......h."
/* 2 */ "..........."
/* 3 */ "..........."
/* 4 */ "..........."
/* 5 */ "...ggggg..."
/* 6 */ "..g.....g.."
/* 7 */ "...ggggg..."
/* 8 */ "..........."
/* 9 */ "..........."
/* 10 */ "..........."
/* 11 */ ".h.......h."
/* 12 */ "..........."
// Level 4
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "..........."
/* 1 */ ".h.......h."
/* 2 */ "..........."
/* 3 */ "..........."
/* 4 */ "..........."
/* 5 */ "...ggggg..."
/* 6 */ "..g.....g.."
/* 7 */ "...ggggg..."
/* 8 */ "..........."
/* 9 */ "..........."
/* 10 */ "..........."
/* 11 */ ".h.......h."
/* 12 */ "..........."
// Level 5
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "..........."
/* 1 */ ".h.......h."
/* 2 */ "..........."
/* 3 */ "..........."
/* 4 */ "..........."
/* 5 */ "..........."
/* 6 */ "..........."
/* 7 */ "..........."
/* 8 */ "..........."
/* 9 */ "..........."
/* 10 */ "..........."
/* 11 */ ".h.......h."
/* 12 */ "..........."
// Level 6
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ ".h.......h."
/* 1 */ "hhh.....hhh"
/* 2 */ ".h.......h."
/* 3 */ "..........."
/* 4 */ "..........."
/* 5 */ "..........."
/* 6 */ "..........."
/* 7 */ "..........."
/* 8 */ "..........."
/* 9 */ "..........."
/* 10 */ ".h.......h."
/* 11 */ "hhh.....hhh"
/* 12 */ ".h.......h.",
// Connectors:
"-1: 10, 2, 6: 5\n" /* Type -1, direction X+ */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // Farm
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Forge:
// The data has been exported from the gallery Plains, area index 79, ID 145, created by Aloe_vera
@@ -2025,12 +2195,12 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// Level 1
/* z\x* 0123456 */
/* 0 */ "bbbbbbb"
/* 1 */ "bbbbbbb"
/* 2 */ "bbbbbbb"
/* 3 */ "bbbabbb"
/* 4 */ "bbbbbbb"
/* 5 */ "bbbbbbb"
/* 0 */ "bmmmmmm"
/* 1 */ "bmmmmmm"
/* 2 */ "bmmmmmm"
/* 3 */ "bmmmmmm"
/* 4 */ "bmmmmmm"
/* 5 */ "bmmmmmm"
/* 6 */ "bbbbbbb"
// Level 2
@@ -3005,159 +3175,157 @@ const cPrefab::sDef g_JapaneseVillageStartingPrefabs[] =
"a: 1: 0\n" /* stone */
"b: 4: 0\n" /* cobblestone */
"c: 8: 0\n" /* water */
"d: 3: 0\n" /* dirt */
"e: 2: 0\n" /* grass */
"f: 13: 0\n" /* gravel */
"g: 67: 1\n" /* stairs */
"h: 67: 2\n" /* stairs */
"i: 67: 0\n" /* stairs */
"j: 67: 3\n" /* stairs */
"k: 85: 0\n" /* fence */
"l: 44: 8\n" /* step */
"m: 19: 0\n" /* sponge */
"n: 44: 0\n" /* step */
"o: 43: 0\n" /* doubleslab */,
"d: 13: 0\n" /* gravel */
"e: 67: 1\n" /* stairs */
"f: 67: 2\n" /* stairs */
"g: 67: 0\n" /* stairs */
"h: 67: 3\n" /* stairs */
"i: 85: 0\n" /* fence */
"j: 44: 8\n" /* step */
"k: 44: 0\n" /* step */
"l: 43: 0\n" /* doubleslab */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "aaaaaaa"
/* 2 */ "aaaaaaa"
/* 3 */ "aaaaaaa"
/* 4 */ "aaaaaaa"
/* 5 */ "aaaaaaa"
/* 6 */ "aaaaaaa"
/* 0 */ "mmmmmmm"
/* 1 */ "maaaaam"
/* 2 */ "maaaaam"
/* 3 */ "maaaaam"
/* 4 */ "maaaaam"
/* 5 */ "maaaaam"
/* 6 */ "mmmmmmm"
// Level 1
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "abbbbba"
/* 2 */ "abcc.ba"
/* 3 */ "abcccba"
/* 4 */ "abcccba"
/* 5 */ "abbbbba"
/* 6 */ "aaaaaaa"
/* 0 */ "mmmmmmm"
/* 1 */ "mbbbbbm"
/* 2 */ "mbcc.bm"
/* 3 */ "mbcccbm"
/* 4 */ "mbcccbm"
/* 5 */ "mbbbbbm"
/* 6 */ "mmmmmmm"
// Level 2
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "abbbbba"
/* 2 */ "abcccba"
/* 3 */ "abcccba"
/* 4 */ "abcccba"
/* 5 */ "abbbbba"
/* 6 */ "aaaaaaa"
/* 0 */ "mmmmmmm"
/* 1 */ "mbbbbbm"
/* 2 */ "mbcccbm"
/* 3 */ "mbcccbm"
/* 4 */ "mbcccbm"
/* 5 */ "mbbbbbm"
/* 6 */ "mmmmmmm"
// Level 3
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "abbbbba"
/* 2 */ "abcccba"
/* 3 */ "abcccba"
/* 4 */ "abcccba"
/* 5 */ "abbbbba"
/* 6 */ "aaaaaaa"
/* 0 */ "mmmmmmm"
/* 1 */ "mbbbbbm"
/* 2 */ "mbcccbm"
/* 3 */ "mbcccbm"
/* 4 */ "mbcccbm"
/* 5 */ "mbbbbbm"
/* 6 */ "mmmmmmm"
// Level 4
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "abbbbba"
/* 2 */ "abcccba"
/* 3 */ "abcccba"
/* 4 */ "abcccba"
/* 5 */ "abbbbba"
/* 6 */ "aaaaaaa"
/* 0 */ "mmmmmmm"
/* 1 */ "mbbbbbm"
/* 2 */ "mbcccbm"
/* 3 */ "mbcccbm"
/* 4 */ "mbcccbm"
/* 5 */ "mbbbbbm"
/* 6 */ "mmmmmmm"
// Level 5
/* z\x* 0123456 */
/* 0 */ "ddddddd"
/* 1 */ "dbbbbbd"
/* 2 */ "dbcccbd"
/* 3 */ "dbcccbd"
/* 4 */ "dbcccbd"
/* 5 */ "dbbbbbd"
/* 6 */ "ddddddd"
/* 0 */ "mmmmmmm"
/* 1 */ "mbbbbbm"
/* 2 */ "mbcccbm"
/* 3 */ "mbcccbm"
/* 4 */ "mbcccbm"
/* 5 */ "mbbbbbm"
/* 6 */ "mmmmmmm"
// Level 6
/* z\x* 0123456 */
/* 0 */ "ddddddd"
/* 1 */ "dbbbbbd"
/* 2 */ "dbcccbd"
/* 3 */ "dbcccbd"
/* 4 */ "dbcccbd"
/* 5 */ "dbbbbbd"
/* 6 */ "ddddddd"
/* 0 */ "mmmmmmm"
/* 1 */ "mbbbbbm"
/* 2 */ "mbcccbm"
/* 3 */ "mbcccbm"
/* 4 */ "mbcccbm"
/* 5 */ "mbbbbbm"
/* 6 */ "mmmmmmm"
// Level 7
/* z\x* 0123456 */
/* 0 */ "ddddddd"
/* 1 */ "dbbbbbd"
/* 2 */ "dbcccbd"
/* 3 */ "dbcccbd"
/* 4 */ "dbcccbd"
/* 5 */ "dbbbbbd"
/* 6 */ "ddddddd"
/* 0 */ "mmbbbmm"
/* 1 */ "mbbbbbm"
/* 2 */ "bbcccbb"
/* 3 */ "bbcccbb"
/* 4 */ "bbcccbb"
/* 5 */ "mbbbbbm"
/* 6 */ "mmbbbmm"
// Level 8
/* z\x* 0123456 */
/* 0 */ "eefffee"
/* 1 */ "ebbbbbe"
/* 2 */ "fbcccbf"
/* 3 */ "fbcccbf"
/* 4 */ "fbcccbf"
/* 5 */ "ebbbbbe"
/* 6 */ "eefffee"
/* 0 */ "mmdddmm"
/* 1 */ "mbbbbbm"
/* 2 */ "dbcccbd"
/* 3 */ "dbcccbd"
/* 4 */ "dbcccbd"
/* 5 */ "mbbbbbm"
/* 6 */ "mmdddmm"
// Level 9
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".bghib."
/* 2 */ ".j...j."
/* 3 */ ".i...g."
/* 4 */ ".h...h."
/* 5 */ ".bgjib."
/* 6 */ "......."
/* 0 */ "mm...mm"
/* 1 */ "mbefgbm"
/* 2 */ ".h...h."
/* 3 */ ".g...e."
/* 4 */ ".f...f."
/* 5 */ "mbehgbm"
/* 6 */ "mm...mm"
// Level 10
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".k...k."
/* 0 */ "mm...mm"
/* 1 */ "mi...im"
/* 2 */ "......."
/* 3 */ "......."
/* 4 */ "......."
/* 5 */ ".k...k."
/* 6 */ "......."
/* 5 */ "mi...im"
/* 6 */ "mm...mm"
// Level 11
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".k...k."
/* 0 */ "mm...mm"
/* 1 */ "mi...im"
/* 2 */ "......."
/* 3 */ "......."
/* 4 */ "......."
/* 5 */ ".k...k."
/* 6 */ "......."
/* 5 */ "mi...im"
/* 6 */ "mm...mm"
// Level 12
/* z\x* 0123456 */
/* 0 */ ".lnnnl."
/* 1 */ "loooool"
/* 2 */ "nooooon"
/* 3 */ "nooooon"
/* 4 */ "nooooon"
/* 5 */ "loooool"
/* 6 */ ".lnnnl."
/* 0 */ "mjkkkjm"
/* 1 */ "jlllllj"
/* 2 */ "klllllk"
/* 3 */ "klllllk"
/* 4 */ "klllllk"
/* 5 */ "jlllllj"
/* 6 */ "mjkkkjm"
// Level 13
/* z\x* 0123456 */
/* 0 */ "n.....n"
/* 0 */ "k.....k"
/* 1 */ "......."
/* 2 */ "..nnn.."
/* 3 */ "..non.."
/* 4 */ "..nnn.."
/* 2 */ "..kkk.."
/* 3 */ "..klk.."
/* 4 */ "..kkk.."
/* 5 */ "......."
/* 6 */ "n.....n",
/* 6 */ "k.....k",
// Connectors:
"2: 0, 9, 3: 4\n" /* Type 2, direction X- */
+217 -214
View File
@@ -362,29 +362,29 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
// Level 0
/* z\x* 11111 */
/* * 012345678901234 */
/* 0 */ "aaaaaaaaaaaaaaa"
/* 0 */ "aaaaaaabaaaaaaa"
/* 1 */ "aaaaaaaaaaaaaaa"
/* 2 */ "aaaaaaaaaaaaaaa"
/* 3 */ "aaaaaaaaaaaaaaa"
/* 4 */ "aaaaaaaaaaaaaaa"
/* 5 */ "aaaaaaaaaaaaaaa"
/* 6 */ "aaaaaaaaaaaaaaa"
/* 7 */ "aaaaaaaaaaaaaaa"
/* 8 */ "aaaaaaaaaaaaaaa"
// Level 1
/* z\x* 11111 */
/* * 012345678901234 */
/* 0 */ "aaaaaaabaaaaaaa"
/* 1 */ "aaaaaaabaaaaaaa"
/* 2 */ "aaaaaaabaaaaaaa"
/* 3 */ "aaaaaaabaaaaaaa"
/* 4 */ "aaaaaaabaaaaaaa"
/* 5 */ "aaaaaaabaaaaaaa"
/* 6 */ "aaaaaaabaaaaaaa"
/* 7 */ "aaaaaaabaaaaaaa"
/* 8 */ "aaaaaaabaaaaaaa"
// Level 1
/* z\x* 11111 */
/* * 012345678901234 */
/* 0 */ "aaaaaaamaaaaaaa"
/* 1 */ "aaaaaaamaaaaaaa"
/* 2 */ "aaaaaaamaaaaaaa"
/* 3 */ "aaaaaaamaaaaaaa"
/* 4 */ "aaaaaaamaaaaaaa"
/* 5 */ "aaaaaaamaaaaaaa"
/* 6 */ "aaaaaaamaaaaaaa"
/* 7 */ "aaaaaaamaaaaaaa"
/* 8 */ "aaaaaaamaaaaaaa"
// Level 2
/* z\x* 11111 */
/* * 012345678901234 */
@@ -509,12 +509,12 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
"d: 67: 1\n" /* stairs */
"e: 17: 0\n" /* tree */
"f: 5: 0\n" /* wood */
"g: 64: 6\n" /* wooddoorblock */
"g: 64: 2\n" /* wooddoorblock */
"h: 10: 0\n" /* lava */
"i: 54: 2\n" /* chest */
"j: 61: 2\n" /* furnace */
"k:102: 0\n" /* glasspane */
"l: 64:12\n" /* wooddoorblock */
"l: 64: 8\n" /* wooddoorblock */
"m: 19: 0\n" /* sponge */
"n:139: 0\n" /* cobblestonewall */
"o:101: 0\n" /* ironbars */
@@ -2544,7 +2544,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
true,
// DefaultWeight:
100,
20,
// DepthWeight:
"",
@@ -2746,8 +2746,8 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
"d: 67: 1\n" /* stairs */
"e: 17: 0\n" /* tree */
"f: 5: 0\n" /* wood */
"g: 64: 7\n" /* wooddoorblock */
"h: 64:12\n" /* wooddoorblock */
"g: 64: 3\n" /* wooddoorblock */
"h: 64: 8\n" /* wooddoorblock */
"i:102: 0\n" /* glasspane */
"j: 53: 2\n" /* woodstairs */
"k: 53: 7\n" /* woodstairs */
@@ -3000,9 +3000,9 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
"d: 67: 1\n" /* stairs */
"e: 17: 0\n" /* tree */
"f: 5: 0\n" /* wood */
"g: 64: 7\n" /* wooddoorblock */
"g: 64: 3\n" /* wooddoorblock */
"h:102: 0\n" /* glasspane */
"i: 64:12\n" /* wooddoorblock */
"i: 64: 8\n" /* wooddoorblock */
"j: 53: 2\n" /* woodstairs */
"k: 53: 7\n" /* woodstairs */
"l: 50: 3\n" /* torch */
@@ -3141,31 +3141,32 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
"k: 85: 0\n" /* fence */
"l: 53: 0\n" /* woodstairs */
"m: 19: 0\n" /* sponge */
"n: 64: 6\n" /* wooddoorblock */
"n: 64: 2\n" /* wooddoorblock */
"o: 64: 4\n" /* wooddoorblock */
"p:102: 0\n" /* glasspane */
"q: 72: 0\n" /* woodplate */
"r: 64:12\n" /* wooddoorblock */
"s: 53: 5\n" /* woodstairs */
"t: 53: 4\n" /* woodstairs */
"u: 50: 1\n" /* torch */
"v: 50: 2\n" /* torch */,
"r: 64: 8\n" /* wooddoorblock */
"s: 64:12\n" /* wooddoorblock */
"t: 53: 5\n" /* woodstairs */
"u: 53: 4\n" /* woodstairs */
"v: 50: 1\n" /* torch */
"w: 50: 2\n" /* torch */,
// Block data:
// Level 0
/* z\x* */
/* * 0123456789 */
/* 0 */ ".........."
/* 1 */ ".aaaaa...."
/* 2 */ ".aaaaa...."
/* 3 */ ".aaaaabbbb"
/* 0 */ "mmmmmmmmmm"
/* 1 */ "maaaaammmm"
/* 2 */ "maaaaammmm"
/* 3 */ "maaaaabbbb"
/* 4 */ "aaaaaabbbb"
/* 5 */ "aaaaaabbbb"
/* 6 */ "aaaaaabbbb"
/* 7 */ ".aaaaabbbb"
/* 8 */ ".aaaaabbbb"
/* 9 */ ".aaaaa...."
/* 10 */ ".........."
/* 7 */ "maaaaabbbb"
/* 8 */ "maaaaabbbb"
/* 9 */ "maaaaammmm"
/* 10 */ "mmmmmmmmmm"
// Level 1
/* z\x* */
@@ -3205,7 +3206,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 2 */ ".p.q.pmmmm"
/* 3 */ ".p...p...."
/* 4 */ ".c...c...."
/* 5 */ ".r...r...."
/* 5 */ ".r...s...."
/* 6 */ ".c...c...."
/* 7 */ ".p...p...."
/* 8 */ ".p...p...."
@@ -3215,47 +3216,47 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
// Level 4
/* z\x* */
/* * 0123456789 */
/* 0 */ "ls...tjmmm"
/* 0 */ "lt...ujmmm"
/* 1 */ "licccijmmm"
/* 2 */ "lc...cjmmm"
/* 3 */ "lc...cj..."
/* 4 */ "lcu.vcj..."
/* 4 */ "lcv.wcj..."
/* 5 */ "lc...cj..."
/* 6 */ "lcu.vcj..."
/* 6 */ "lcv.wcj..."
/* 7 */ "lc...cj..."
/* 8 */ "lc...cj..."
/* 9 */ "licccijmmm"
/* 10 */ "ls...tjmmm"
/* 10 */ "lt...ujmmm"
// Level 5
/* z\x* */
/* * 0123456789 */
/* 0 */ "mls.tjmmmm"
/* 1 */ "mlcccjmmmm"
/* 2 */ "mlc.cjmmmm"
/* 3 */ "mlc.cjm..."
/* 4 */ "mlc.cjm..."
/* 5 */ "mlc.cjm..."
/* 6 */ "mlc.cjm..."
/* 7 */ "mlc.cjm..."
/* 8 */ "mlc.cjm..."
/* 9 */ "mlcccjmmmm"
/* 10 */ "mls.tjmmmm"
/* 0 */ ".lt.uj.mmm"
/* 1 */ ".lcccj.mmm"
/* 2 */ ".lc.cj.mmm"
/* 3 */ ".lc.cj...."
/* 4 */ ".lc.cj...."
/* 5 */ ".lc.cj...."
/* 6 */ ".lc.cj...."
/* 7 */ ".lc.cj...."
/* 8 */ ".lc.cj...."
/* 9 */ ".lcccj.mmm"
/* 10 */ ".lt.uj.mmm"
// Level 6
/* z\x* */
/* * 0123456789 */
/* 0 */ "mmlcjmmmmm"
/* 1 */ "mmlcjmmmmm"
/* 2 */ "mmlcjmmmmm"
/* 3 */ "mmlcjmm..."
/* 4 */ "mmlcjmm..."
/* 5 */ "mmlcjmm..."
/* 6 */ "mmlcjmm..."
/* 7 */ "mmlcjmm..."
/* 8 */ "mmlcjmm..."
/* 9 */ "mmlcjmmmmm"
/* 10 */ "mmlcjmmmmm",
/* 0 */ "..lcj..mmm"
/* 1 */ "..lcj..mmm"
/* 2 */ "..lcj..mmm"
/* 3 */ "..lcj....."
/* 4 */ "..lcj....."
/* 5 */ "..lcj....."
/* 6 */ "..lcj....."
/* 7 */ "..lcj....."
/* 8 */ "..lcj....."
/* 9 */ "..lcj..mmm"
/* 10 */ "..lcj..mmm",
// Connectors:
"-1: 0, 1, 5: 4\n" /* Type -1, direction X- */,
@@ -3626,7 +3627,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
// Level 0
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "aaabbbbaaaa"
/* 0 */ "aaaabbbaaaa"
/* 1 */ "abbbbbbbbba"
/* 2 */ "abbbbbbbbba"
/* 3 */ "abbbbbbbbba"
@@ -4509,10 +4510,10 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 4 */ ".aaaaaaaaa."
/* 5 */ ".aaaaaaaaa."
/* 6 */ ".....aaaaa."
/* 7 */ ".....aaaaa."
/* 8 */ ".....aaaaa."
/* 9 */ ".....aaaaa."
/* 10 */ "..........."
/* 7 */ "mmmm.aaaaa."
/* 8 */ "mmmm.aaaaa."
/* 9 */ "mmmm.aaaaa."
/* 10 */ "mmmm......."
// Level 2
/* z\x* 1 */
@@ -4524,10 +4525,10 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 4 */ ".f.......f."
/* 5 */ ".efffe...f."
/* 6 */ ".....f...f."
/* 7 */ ".....f...f."
/* 8 */ ".....f...f."
/* 9 */ ".....efffe."
/* 10 */ "..........."
/* 7 */ "mmmm.f...f."
/* 8 */ "mmmm.f...f."
/* 9 */ "mmmm.efffe."
/* 10 */ "mmmm......."
// Level 3
/* z\x* 1 */
@@ -4539,10 +4540,10 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 4 */ ".h.......h."
/* 5 */ ".ehhhe...f."
/* 6 */ ".....h...h."
/* 7 */ ".....h...h."
/* 8 */ ".....h...h."
/* 9 */ ".....ehhhe."
/* 10 */ "..........."
/* 7 */ "mmmm.h...h."
/* 8 */ "mmmm.h...h."
/* 9 */ "mmmm.ehhhe."
/* 10 */ "mmmm......."
// Level 4
/* z\x* 1 */
@@ -4554,10 +4555,10 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 4 */ ".f...o...fl"
/* 5 */ "pfffffq.rfl"
/* 6 */ "sssssf...fl"
/* 7 */ "....tf...fl"
/* 8 */ "....tf...fl"
/* 9 */ "....tfffffl"
/* 10 */ "....tu...vl"
/* 7 */ "mmmmtf...fl"
/* 8 */ "mmmmtf...fl"
/* 9 */ "mmmmtfffffl"
/* 10 */ "mmmmtu...vl"
// Level 5
/* z\x* 1 */
@@ -4569,10 +4570,10 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 4 */ "pffffff.fl."
/* 5 */ "ssssssf.fl."
/* 6 */ ".....tf.fl."
/* 7 */ ".....tf.fl."
/* 8 */ ".....tf.fl."
/* 9 */ ".....tfffl."
/* 10 */ ".....tu.vl."
/* 7 */ "mmmm.tf.fl."
/* 8 */ "mmmm.tf.fl."
/* 9 */ "mmmm.tfffl."
/* 10 */ "mmmm.tu.vl."
// Level 6
/* z\x* 1 */
@@ -4584,10 +4585,10 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 4 */ "sssssstfl.."
/* 5 */ "......tfl.."
/* 6 */ "......tfl.."
/* 7 */ "......tfl.."
/* 8 */ "......tfl.."
/* 9 */ "......tfl.."
/* 10 */ "......tfl..",
/* 7 */ "mmmm..tfl.."
/* 8 */ "mmmm..tfl.."
/* 9 */ "mmmm..tfl.."
/* 10 */ "mmmm..tfl..",
// Connectors:
"-1: 5, 1, 0: 2\n" /* Type -1, direction Z- */,
@@ -4837,9 +4838,9 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
// Level 1
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ ".aaaaa..."
/* 5 */ ".aaaaab.."
@@ -4847,15 +4848,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".aaaaad.."
/* 8 */ ".aaaaa..."
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 2
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ ".efffe..."
/* 5 */ ".f...f..."
@@ -4863,15 +4864,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".f...f..."
/* 8 */ ".efffe..."
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 3
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ ".ejjje..."
/* 5 */ ".j...f..."
@@ -4879,15 +4880,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".j...f..."
/* 8 */ ".ejjje..."
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 4
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ ".efffe..."
/* 5 */ ".f..nf..."
@@ -4895,15 +4896,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".f..nf..k"
/* 8 */ ".efffe..o"
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 5
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ ".epppe..."
/* 5 */ ".q...q..."
@@ -4911,15 +4912,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".q...q..k"
/* 8 */ ".epppe..o"
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 6
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ ".efffe..."
/* 5 */ ".f...f..."
@@ -4927,15 +4928,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".f...f..o"
/* 8 */ ".efffe..o"
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 7
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ ".ejjje..."
/* 5 */ ".j...j..."
@@ -4943,15 +4944,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".j...j..o"
/* 8 */ ".ejjje..."
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 8
/* z\x* 012345678 */
/* 0 */ "........o"
/* 1 */ "........o"
/* 2 */ "........o"
/* 0 */ "mmmmmmm.o"
/* 1 */ "mmmmmmm.o"
/* 2 */ "mmmmmmm.o"
/* 3 */ "........."
/* 4 */ ".efffe..."
/* 5 */ ".f...f..k"
@@ -4959,15 +4960,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".f...f..o"
/* 8 */ ".efffe..."
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 9
/* z\x* 012345678 */
/* 0 */ "........k"
/* 1 */ "........k"
/* 2 */ "........o"
/* 0 */ "mmmmmmm.k"
/* 1 */ "mmmmmmm.k"
/* 2 */ "mmmmmmm.o"
/* 3 */ "........o"
/* 4 */ ".epppe..o"
/* 5 */ ".q...q..k"
@@ -4975,15 +4976,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".q...q..k"
/* 8 */ ".epppe..k"
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 10
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........k"
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.k"
/* 3 */ "rrrrrrr.k"
/* 4 */ "sfffffs.o"
/* 5 */ ".f...f..o"
@@ -4991,15 +4992,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ ".f...f..o"
/* 8 */ "tffffft.o"
/* 9 */ "uuuuuuu.k"
/* 10 */ "........k"
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.k"
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 11
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ "rrrrrrr.k"
/* 5 */ "sfffffs.k"
@@ -5007,15 +5008,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ "tffffft.k"
/* 8 */ "uuuuuuu.o"
/* 9 */ "........o"
/* 10 */ "........o"
/* 11 */ "........k"
/* 12 */ "........k"
/* 10 */ "mmmmmmm.o"
/* 11 */ "mmmmmmm.k"
/* 12 */ "mmmmmmm.k"
// Level 12
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ "........."
/* 5 */ "rrrrrrr.o"
@@ -5023,15 +5024,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ "uuuuuuu.k"
/* 8 */ "........."
/* 9 */ "........."
/* 10 */ "........o"
/* 11 */ "........o"
/* 12 */ "........o"
/* 10 */ "mmmmmmm.o"
/* 11 */ "mmmmmmm.o"
/* 12 */ "mmmmmmm.o"
// Level 13
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ "........."
/* 5 */ "........o"
@@ -5039,15 +5040,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ "........."
/* 8 */ "........."
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 14
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ "........o"
/* 5 */ "........o"
@@ -5055,15 +5056,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ "........."
/* 8 */ "........."
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 15
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ "........o"
/* 5 */ "........k"
@@ -5071,15 +5072,15 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ "........."
/* 8 */ "........."
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ "........."
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm.."
// Level 16
/* z\x* 012345678 */
/* 0 */ "........."
/* 1 */ "........."
/* 2 */ "........."
/* 0 */ "mmmmmmm.."
/* 1 */ "mmmmmmm.."
/* 2 */ "mmmmmmm.."
/* 3 */ "........."
/* 4 */ "........o"
/* 5 */ "........k"
@@ -5087,9 +5088,9 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
/* 7 */ "........."
/* 8 */ "........."
/* 9 */ "........."
/* 10 */ "........."
/* 11 */ "........."
/* 12 */ ".........",
/* 10 */ "mmmmmmm.."
/* 11 */ "mmmmmmm.."
/* 12 */ "mmmmmmm..",
// Connectors:
"-1: 8, 1, 6: 5\n" /* Type -1, direction X+ */,
@@ -5472,13 +5473,15 @@ const cPrefab::sDef g_PlainsVillageStartingPrefabs[] =
"l: 66: 7\n" /* tracks */
"m: 19: 0\n" /* sponge */
"n: 50: 2\n" /* torch */
"o: 2: 0\n" /* grass */
"p: 53: 2\n" /* woodstairs */
"q: 77: 1\n" /* stonebutton */
"r: 27: 0\n" /* poweredrail */
"s: 53: 7\n" /* woodstairs */
"t: 53: 6\n" /* woodstairs */
"u: 53: 3\n" /* woodstairs */,
"o: 4: 0\n" /* cobblestone */
"p: 2: 0\n" /* grass */
"q: 13: 0\n" /* gravel */
"r: 53: 2\n" /* woodstairs */
"s: 77: 1\n" /* stonebutton */
"t: 27: 0\n" /* poweredrail */
"u: 53: 7\n" /* woodstairs */
"v: 53: 6\n" /* woodstairs */
"w: 53: 3\n" /* woodstairs */,
// Block data:
// Level 0
@@ -5783,28 +5786,28 @@ const cPrefab::sDef g_PlainsVillageStartingPrefabs[] =
// Level 30
/* z\x* 0123456 */
/* 0 */ "mmmmmmm"
/* 0 */ "mmooomm"
/* 1 */ "mmmammm"
/* 2 */ "mm...mm"
/* 3 */ "ma..aam"
/* 4 */ "mmfgamm"
/* 2 */ "om...mo"
/* 3 */ "oa..aao"
/* 4 */ "omfgamo"
/* 5 */ "mmmammm"
/* 6 */ "mmmmmmm"
/* 6 */ "mmooomm"
// Level 31
/* z\x* 0123456 */
/* 0 */ "ooomooo"
/* 1 */ "oaaaaao"
/* 2 */ "oa.aaao"
/* 3 */ "oa..iao"
/* 4 */ "oa..jao"
/* 5 */ "oaaaaao"
/* 6 */ "ooooooo"
/* 0 */ "ppqqqpp"
/* 1 */ "paaaaap"
/* 2 */ "qa.aaaq"
/* 3 */ "qa..iaq"
/* 4 */ "qa..jaq"
/* 5 */ "paaaaap"
/* 6 */ "ppqqqpp"
// Level 32
/* z\x* 0123456 */
/* 0 */ "...p..."
/* 1 */ ".aqrba."
/* 0 */ "...r..."
/* 1 */ ".astba."
/* 2 */ "...fl.."
/* 3 */ "......."
/* 4 */ "......."
@@ -5833,31 +5836,31 @@ const cPrefab::sDef g_PlainsVillageStartingPrefabs[] =
// Level 35
/* z\x* 0123456 */
/* 0 */ "ppppppp"
/* 1 */ "saaaaas"
/* 0 */ "rrrrrrr"
/* 1 */ "uaaaaau"
/* 2 */ ".a...a."
/* 3 */ ".a...a."
/* 4 */ ".a...a."
/* 5 */ "taaaaat"
/* 6 */ "uuuuuuu"
/* 5 */ "vaaaaav"
/* 6 */ "wwwwwww"
// Level 36
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "ppppppp"
/* 2 */ "saaaaas"
/* 1 */ "rrrrrrr"
/* 2 */ "uaaaaau"
/* 3 */ ".aaaaa."
/* 4 */ "taaaaat"
/* 5 */ "uuuuuuu"
/* 4 */ "vaaaaav"
/* 5 */ "wwwwwww"
/* 6 */ "......."
// Level 37
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "......."
/* 2 */ "ppppppp"
/* 2 */ "rrrrrrr"
/* 3 */ "aaaaaaa"
/* 4 */ "uuuuuuu"
/* 4 */ "wwwwwww"
/* 5 */ "......."
/* 6 */ ".......",
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+484
View File
@@ -0,0 +1,484 @@
// TestRailsPrefabs.cpp
// Defines the prefabs in the group TestRails
// NOTE: This file has been generated automatically by GalExport!
// Any manual changes will be overwritten by the next automatic export!
#include "Globals.h"
#include "TestRailsPrefabs.h"
const cPrefab::sDef g_TestRailsPrefabs[] =
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ActivatorRail:
// The data has been exported from the gallery Plains, area index 251, ID 746, created by Aloe_vera
{
// Size:
7, 3, 7, // SizeX = 7, SizeY = 3, SizeZ = 7
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
6, 2, 6, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 1: 0\n" /* stone */
"b: 5: 0\n" /* wood */
"c:157: 0\n" /* activatorrail */
"d:157: 2\n" /* activatorrail */
"e:157: 3\n" /* activatorrail */
"f:157: 5\n" /* activatorrail */
"g: 50: 5\n" /* torch */
"h:157: 4\n" /* activatorrail */
"i:157: 1\n" /* activatorrail */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 0123456 */
/* 0 */ "aaab..."
/* 1 */ "abbbbb."
/* 2 */ "abbb.b."
/* 3 */ "bbbb.bb"
/* 4 */ ".b...b."
/* 5 */ ".bbbbb."
/* 6 */ "...b..."
// Level 1
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".cdbec."
/* 2 */ ".fg..f."
/* 3 */ ".b.g.b."
/* 4 */ ".h...h."
/* 5 */ ".cdbec."
/* 6 */ "......."
// Level 2
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "...i..."
/* 2 */ "......."
/* 3 */ ".c...c."
/* 4 */ "......."
/* 5 */ "...i..."
/* 6 */ ".......",
// Connectors:
"1: 6, 1, 3: 5\n" /* Type 1, direction X+ */
"-1: 6, 1, 3: 5\n" /* Type -1, direction X+ */
"1: 3, 1, 6: 3\n" /* Type 1, direction Z+ */
"-1: 3, 1, 6: 3\n" /* Type -1, direction Z+ */
"1: 0, 1, 3: 4\n" /* Type 1, direction X- */
"-1: 0, 1, 3: 4\n" /* Type -1, direction X- */
"1: 3, 1, 0: 2\n" /* Type 1, direction Z- */
"-1: 3, 1, 0: 2\n" /* Type -1, direction Z- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
false,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // ActivatorRail
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DetectorRail:
// The data has been exported from the gallery Plains, area index 250, ID 745, created by Aloe_vera
{
// Size:
7, 3, 7, // SizeX = 7, SizeY = 3, SizeZ = 7
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
6, 2, 6, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 1: 0\n" /* stone */
"b: 5: 0\n" /* wood */
"c: 28: 0\n" /* detectorrail */
"d: 28: 2\n" /* detectorrail */
"e: 28: 3\n" /* detectorrail */
"f: 28: 5\n" /* detectorrail */
"g: 50: 5\n" /* torch */
"h: 28: 4\n" /* detectorrail */
"i: 28: 1\n" /* detectorrail */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 0123456 */
/* 0 */ "aaab..."
/* 1 */ "abbbbb."
/* 2 */ "abbb.b."
/* 3 */ "bbbb.bb"
/* 4 */ ".b...b."
/* 5 */ ".bbbbb."
/* 6 */ "...b..."
// Level 1
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".cdbec."
/* 2 */ ".fg..f."
/* 3 */ ".b.g.b."
/* 4 */ ".h...h."
/* 5 */ ".cdbec."
/* 6 */ "......."
// Level 2
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "...i..."
/* 2 */ "......."
/* 3 */ ".c...c."
/* 4 */ "......."
/* 5 */ "...i..."
/* 6 */ ".......",
// Connectors:
"1: 6, 1, 3: 5\n" /* Type 1, direction X+ */
"-1: 6, 1, 3: 5\n" /* Type -1, direction X+ */
"1: 3, 1, 0: 2\n" /* Type 1, direction Z- */
"-1: 3, 1, 0: 2\n" /* Type -1, direction Z- */
"1: 0, 1, 3: 4\n" /* Type 1, direction X- */
"-1: 0, 1, 3: 4\n" /* Type -1, direction X- */
"1: 3, 1, 6: 3\n" /* Type 1, direction Z+ */
"-1: 3, 1, 6: 3\n" /* Type -1, direction Z+ */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
false,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // DetectorRail
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PowerRail:
// The data has been exported from the gallery Plains, area index 248, ID 743, created by Aloe_vera
{
// Size:
7, 3, 7, // SizeX = 7, SizeY = 3, SizeZ = 7
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
6, 2, 6, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 1: 0\n" /* stone */
"b: 5: 0\n" /* wood */
"c: 27: 0\n" /* poweredrail */
"d: 27: 2\n" /* poweredrail */
"e: 27: 3\n" /* poweredrail */
"f: 27: 5\n" /* poweredrail */
"g: 50: 5\n" /* torch */
"h: 27: 4\n" /* poweredrail */
"i: 27: 1\n" /* poweredrail */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 0123456 */
/* 0 */ "aaab..."
/* 1 */ "abbbbb."
/* 2 */ "abbb.b."
/* 3 */ "bbbb.bb"
/* 4 */ ".b...b."
/* 5 */ ".bbbbb."
/* 6 */ "...b..."
// Level 1
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".cdbec."
/* 2 */ ".fg..f."
/* 3 */ ".b.g.b."
/* 4 */ ".h...h."
/* 5 */ ".cdbec."
/* 6 */ "......."
// Level 2
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "...i..."
/* 2 */ "......."
/* 3 */ ".c...c."
/* 4 */ "......."
/* 5 */ "...i..."
/* 6 */ ".......",
// Connectors:
"1: 6, 1, 3: 5\n" /* Type 1, direction X+ */
"-1: 6, 1, 3: 5\n" /* Type -1, direction X+ */
"1: 3, 1, 6: 3\n" /* Type 1, direction Z+ */
"-1: 3, 1, 6: 3\n" /* Type -1, direction Z+ */
"1: 0, 1, 3: 4\n" /* Type 1, direction X- */
"-1: 0, 1, 3: 4\n" /* Type -1, direction X- */
"1: 3, 1, 0: 2\n" /* Type 1, direction Z- */
"-1: 3, 1, 0: 2\n" /* Type -1, direction Z- */
"1: 6, 1, 3: 5\n" /* Type 1, direction X+ */
"-1: 6, 1, 3: 5\n" /* Type -1, direction X+ */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
false,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // PowerRail
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// RegularRail:
// The data has been exported from the gallery Plains, area index 247, ID 742, created by Aloe_vera
{
// Size:
7, 3, 7, // SizeX = 7, SizeY = 3, SizeZ = 7
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
6, 2, 6, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 1: 0\n" /* stone */
"b: 5: 0\n" /* wood */
"c: 66: 6\n" /* tracks */
"d: 66: 2\n" /* tracks */
"e: 66: 3\n" /* tracks */
"f: 66: 7\n" /* tracks */
"g: 66: 5\n" /* tracks */
"h: 50: 5\n" /* torch */
"i: 66: 4\n" /* tracks */
"j: 66: 9\n" /* tracks */
"k: 66: 8\n" /* tracks */
"l: 66: 1\n" /* tracks */
"m: 19: 0\n" /* sponge */
"n: 66: 0\n" /* tracks */,
// Block data:
// Level 0
/* z\x* 0123456 */
/* 0 */ "aaab..."
/* 1 */ "abbbbb."
/* 2 */ "abbb.b."
/* 3 */ "bbbb.bb"
/* 4 */ ".b...b."
/* 5 */ ".bbbbb."
/* 6 */ "...b..."
// Level 1
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".cdbef."
/* 2 */ ".gh..g."
/* 3 */ ".b.h.b."
/* 4 */ ".i...i."
/* 5 */ ".jdbek."
/* 6 */ "......."
// Level 2
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "...l..."
/* 2 */ "......."
/* 3 */ ".n...n."
/* 4 */ "......."
/* 5 */ "...l..."
/* 6 */ ".......",
// Connectors:
"1: 6, 1, 3: 5\n" /* Type 1, direction X+ */
"-1: 6, 1, 3: 5\n" /* Type -1, direction X+ */
"1: 3, 1, 6: 3\n" /* Type 1, direction Z+ */
"-1: 3, 1, 6: 3\n" /* Type -1, direction Z+ */
"1: 0, 1, 3: 4\n" /* Type 1, direction X- */
"-1: 0, 1, 3: 4\n" /* Type -1, direction X- */
"1: 3, 1, 0: 2\n" /* Type 1, direction Z- */
"-1: 3, 1, 0: 2\n" /* Type -1, direction Z- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
false,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // RegularRail
}; // g_TestRailsPrefabs
const cPrefab::sDef g_TestRailsStartingPrefabs[] =
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CentralPiece:
// The data has been exported from the gallery Plains, area index 249, ID 744, created by Aloe_vera
{
// Size:
6, 3, 6, // SizeX = 6, SizeY = 3, SizeZ = 6
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
5, 2, 5, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 1: 0\n" /* stone */
"b: 5: 0\n" /* wood */
"c: 66: 6\n" /* tracks */
"d: 66: 2\n" /* tracks */
"e: 66: 3\n" /* tracks */
"f: 66: 7\n" /* tracks */
"g: 66: 5\n" /* tracks */
"h: 50: 5\n" /* torch */
"i: 66: 4\n" /* tracks */
"j: 66: 9\n" /* tracks */
"k: 66: 8\n" /* tracks */
"l: 66: 1\n" /* tracks */
"m: 19: 0\n" /* sponge */
"n: 66: 0\n" /* tracks */,
// Block data:
// Level 0
/* z\x* 012345 */
/* 0 */ "aaab.."
/* 1 */ "abbbbb"
/* 2 */ "abbb.b"
/* 3 */ "bbbb.b"
/* 4 */ ".b...b"
/* 5 */ ".bbbbb"
// Level 1
/* z\x* 012345 */
/* 0 */ "......"
/* 1 */ ".cdbef"
/* 2 */ ".gh..g"
/* 3 */ ".b.h.b"
/* 4 */ ".i...i"
/* 5 */ ".jdbek"
// Level 2
/* z\x* 012345 */
/* 0 */ "......"
/* 1 */ "...l.."
/* 2 */ "......"
/* 3 */ ".n...n"
/* 4 */ "......"
/* 5 */ "...l..",
// Connectors:
"1: 3, 1, 6: 3\n" /* Type 1, direction Z+ */
"1: 0, 1, 3: 4\n" /* Type 1, direction X- */
"-1: 0, 1, 3: 4\n" /* Type -1, direction X- */
"-1: 3, 1, 6: 3\n" /* Type -1, direction Z+ */
"1: 6, 1, 3: 5\n" /* Type 1, direction X+ */
"-1: 6, 1, 3: 5\n" /* Type -1, direction X+ */
"1: 3, 1, 0: 2\n" /* Type 1, direction Z- */
"-1: 3, 1, 0: 2\n" /* Type -1, direction Z- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // CentralPiece
};
// The prefab counts:
const size_t g_TestRailsPrefabsCount = ARRAYCOUNT(g_TestRailsPrefabs);
const size_t g_TestRailsStartingPrefabsCount = ARRAYCOUNT(g_TestRailsStartingPrefabs);
+15
View File
@@ -0,0 +1,15 @@
// TestRailsPrefabs.h
// Declares the prefabs in the group TestRails
#include "../Prefab.h"
extern const cPrefab::sDef g_TestRailsPrefabs[];
extern const cPrefab::sDef g_TestRailsStartingPrefabs[];
extern const size_t g_TestRailsPrefabsCount;
extern const size_t g_TestRailsStartingPrefabsCount;
@@ -366,7 +366,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
true,
// DefaultWeight:
100,
200,
// DepthWeight:
"",
+6 -5
View File
@@ -29,11 +29,12 @@ class cRainbowRoadsGen::cRainbowRoads :
public:
cRainbowRoads(
int a_Seed,
int a_GridX, int a_GridZ,
int a_OriginX, int a_OriginZ,
int a_MaxDepth,
int a_MaxSize
) :
super(a_OriginX, a_OriginZ),
super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_Seed(a_Seed),
m_Noise(a_Seed),
m_MaxSize(a_MaxSize),
@@ -92,8 +93,8 @@ protected:
cRainbowRoadsGen::cRainbowRoadsGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSize) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxSize, a_MaxSize, 100),
cRainbowRoadsGen::cRainbowRoadsGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth, int a_MaxSize) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 100),
m_Noise(a_Seed + 9000),
m_MaxDepth(a_MaxDepth),
m_MaxSize(a_MaxSize)
@@ -104,10 +105,10 @@ cRainbowRoadsGen::cRainbowRoadsGen(int a_Seed, int a_GridSize, int a_MaxDepth, i
cGridStructGen::cStructurePtr cRainbowRoadsGen::CreateStructure(int a_OriginX, int a_OriginZ)
cGridStructGen::cStructurePtr cRainbowRoadsGen::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
{
// Create a base based on the chosen prefabs:
return cStructurePtr(new cRainbowRoads(m_Seed, a_OriginX, a_OriginZ, m_MaxDepth, m_MaxSize));
return cStructurePtr(new cRainbowRoads(m_Seed, a_GridX, a_GridZ, a_OriginX, a_OriginZ, m_MaxDepth, m_MaxSize));
}
+2 -2
View File
@@ -22,7 +22,7 @@ class cRainbowRoadsGen :
typedef cGridStructGen super;
public:
cRainbowRoadsGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSize);
cRainbowRoadsGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth, int a_MaxSize);
protected:
class cRainbowRoads; // fwd: RainbowRoadsGen.cpp
@@ -39,7 +39,7 @@ protected:
// cGridStructGen overrides:
virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override;
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
} ;
+6 -6
View File
@@ -61,7 +61,7 @@ class cStructGenRavines::cRavine :
public:
cRavine(int a_BlockX, int a_BlockZ, int a_Size, cNoise & a_Noise);
cRavine(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_Size, cNoise & a_Noise);
#ifdef _DEBUG
/// Exports itself as a SVG line definition
@@ -81,7 +81,7 @@ protected:
// cStructGenRavines:
cStructGenRavines::cStructGenRavines(int a_Seed, int a_Size) :
super(a_Seed, a_Size, a_Size, a_Size * 2, a_Size * 2, 100),
super(a_Seed, a_Size, a_Size, a_Size, a_Size, a_Size * 2, a_Size * 2, 100),
m_Noise(a_Seed),
m_Size(a_Size)
{
@@ -91,9 +91,9 @@ cStructGenRavines::cStructGenRavines(int a_Seed, int a_Size) :
cGridStructGen::cStructurePtr cStructGenRavines::CreateStructure(int a_OriginX, int a_OriginZ)
cGridStructGen::cStructurePtr cStructGenRavines::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
{
return cStructurePtr(new cRavine(a_OriginX, a_OriginZ, m_Size, m_Noise));
return cStructurePtr(new cRavine(a_GridX, a_GridZ, a_OriginX, a_OriginZ, m_Size, m_Noise));
}
@@ -104,8 +104,8 @@ cGridStructGen::cStructurePtr cStructGenRavines::CreateStructure(int a_OriginX,
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cStructGenRavines::cRavine
cStructGenRavines::cRavine::cRavine(int a_OriginX, int a_OriginZ, int a_Size, cNoise & a_Noise) :
super(a_OriginX, a_OriginZ)
cStructGenRavines::cRavine::cRavine(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_Size, cNoise & a_Noise) :
super(a_GridX, a_GridZ, a_OriginX, a_OriginZ)
{
// Calculate the ravine shape-defining points:
GenerateBaseDefPoints(a_OriginX, a_OriginZ, a_Size, a_Noise);
+1 -1
View File
@@ -32,7 +32,7 @@ protected:
// cGridStructGen overrides:
virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override;
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
} ;
+116
View File
@@ -0,0 +1,116 @@
// TestRailsGen.cpp
// Implements the cTestRailsGen class representing the testing rails generator
#include "Globals.h"
#include "TestRailsGen.h"
#include "Prefabs/TestRailsPrefabs.h"
#include "PieceGenerator.h"
static cPrefabPiecePool g_TestRails(g_TestRailsPrefabs, g_TestRailsPrefabsCount, g_TestRailsStartingPrefabs, g_TestRailsStartingPrefabsCount);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cTestRailsGen::cTestRails:
class cTestRailsGen::cTestRails :
public cGridStructGen::cStructure
{
typedef cGridStructGen::cStructure super;
public:
cTestRails(
int a_Seed,
int a_GridX, int a_GridZ,
int a_OriginX, int a_OriginZ,
int a_MaxDepth,
int a_MaxSize
) :
super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_Seed(a_Seed),
m_Noise(a_Seed),
m_MaxSize(a_MaxSize),
m_Borders(a_OriginX - a_MaxSize, 0, a_OriginZ - a_MaxSize, a_OriginX + a_MaxSize, 255, a_OriginZ + a_MaxSize)
{
// Generate the pieces for this test:
cBFSPieceGenerator pg(g_TestRails, a_Seed);
pg.PlacePieces(a_OriginX, 150, a_OriginZ, a_MaxDepth, m_Pieces);
if (m_Pieces.empty())
{
return;
}
}
~cTestRails()
{
cPieceGenerator::FreePieces(m_Pieces);
}
protected:
/** Seed for the random functions */
int m_Seed;
/** The noise used as a pseudo-random generator */
cNoise m_Noise;
/** Maximum size, in X/Z blocks, of the structure (radius from the origin) */
int m_MaxSize;
/** Borders of the structure - no item may reach out of this cuboid. */
cCuboid m_Borders;
/** The rails pieces, placed by the generator. */
cPlacedPieces m_Pieces;
// cGridStructGen::cStructure overrides:
virtual void DrawIntoChunk(cChunkDesc & a_Chunk) override
{
for (cPlacedPieces::iterator itr = m_Pieces.begin(), end = m_Pieces.end(); itr != end; ++itr)
{
cPrefab & Prefab = (cPrefab &)((*itr)->GetPiece());
Prefab.Draw(a_Chunk, *itr);
} // for itr - m_PlacedPieces[]
}
} ;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cTestRailsGen:
cTestRailsGen::cTestRailsGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth, int a_MaxSize) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 100),
m_Noise(a_Seed + 1000),
m_MaxDepth(a_MaxDepth),
m_MaxSize(a_MaxSize)
{
}
cGridStructGen::cStructurePtr cTestRailsGen::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
{
// Create a base based on the chosen prefabs:
return cStructurePtr(new cTestRails(m_Seed, a_GridX, a_GridZ, a_OriginX, a_OriginZ, m_MaxDepth, m_MaxSize));
}
+47
View File
@@ -0,0 +1,47 @@
// TestRailsGen.h
// Declares the cTestRailsGen class representing the testing rails generator
#pragma once
#include "GridStructGen.h"
#include "PrefabPiecePool.h"
class cTestRailsGen :
public cGridStructGen
{
typedef cGridStructGen super;
public:
cTestRailsGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth, int a_MaxSize);
protected:
class cTestRails; // fwd: TestRailsGen.cpp
/** The noise used for generating random numbers */
cNoise m_Noise;
/** Maximum depth of the generator tree*/
int m_MaxDepth;
/** Maximum size, in X/Z blocks, of the base (radius from the origin) */
int m_MaxSize;
// cGridStructGen overrides:
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
} ;
+6 -5
View File
@@ -29,11 +29,12 @@ class cUnderwaterBaseGen::cUnderwaterBase :
public:
cUnderwaterBase(
int a_Seed,
int a_GridX, int a_GridZ,
int a_OriginX, int a_OriginZ,
int a_MaxDepth,
int a_MaxSize
) :
super(a_OriginX, a_OriginZ),
super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_Seed(a_Seed),
m_Noise(a_Seed),
m_MaxSize(a_MaxSize),
@@ -92,8 +93,8 @@ protected:
cUnderwaterBaseGen::cUnderwaterBaseGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSize, cBiomeGen & a_BiomeGen) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxSize, a_MaxSize, 100),
cUnderwaterBaseGen::cUnderwaterBaseGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth, int a_MaxSize, cBiomeGen & a_BiomeGen) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 100),
m_Noise(a_Seed + 1000),
m_MaxDepth(a_MaxDepth),
m_MaxSize(a_MaxSize),
@@ -105,7 +106,7 @@ cUnderwaterBaseGen::cUnderwaterBaseGen(int a_Seed, int a_GridSize, int a_MaxDept
cGridStructGen::cStructurePtr cUnderwaterBaseGen::CreateStructure(int a_OriginX, int a_OriginZ)
cGridStructGen::cStructurePtr cUnderwaterBaseGen::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
{
// Generate the biomes for the chunk surrounding the origin:
int ChunkX, ChunkZ;
@@ -134,7 +135,7 @@ cGridStructGen::cStructurePtr cUnderwaterBaseGen::CreateStructure(int a_OriginX,
} // for i - Biomes[]
// Create a base based on the chosen prefabs:
return cStructurePtr(new cUnderwaterBase(m_Seed, a_OriginX, a_OriginZ, m_MaxDepth, m_MaxSize));
return cStructurePtr(new cUnderwaterBase(m_Seed, a_GridX, a_GridZ, a_OriginX, a_OriginZ, m_MaxDepth, m_MaxSize));
}
+2 -2
View File
@@ -22,7 +22,7 @@ class cUnderwaterBaseGen :
typedef cGridStructGen super;
public:
cUnderwaterBaseGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSize, cBiomeGen & a_BiomeGen);
cUnderwaterBaseGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth, int a_MaxSize, cBiomeGen & a_BiomeGen);
protected:
class cUnderwaterBase; // fwd: UnderwaterBaseGen.cpp
@@ -42,7 +42,7 @@ protected:
// cGridStructGen overrides:
virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override;
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
} ;
+6 -5
View File
@@ -110,6 +110,7 @@ class cVillageGen::cVillage :
public:
cVillage(
int a_Seed,
int a_GridX, int a_GridZ,
int a_OriginX, int a_OriginZ,
int a_MaxRoadDepth,
int a_MaxSize,
@@ -119,7 +120,7 @@ public:
BLOCKTYPE a_RoadBlock,
BLOCKTYPE a_WaterRoadBlock
) :
super(a_OriginX, a_OriginZ),
super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_Seed(a_Seed),
m_Noise(a_Seed),
m_MaxSize(a_MaxSize),
@@ -358,8 +359,8 @@ static cVillagePiecePool * g_PlainsVillagePools[] =
cVillageGen::cVillageGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSize, int a_MinDensity, int a_MaxDensity, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxSize, a_MaxSize, 100),
cVillageGen::cVillageGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth, int a_MaxSize, int a_MinDensity, int a_MaxDensity, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen) :
super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 100),
m_Noise(a_Seed + 1000),
m_MaxDepth(a_MaxDepth),
m_MaxSize(a_MaxSize),
@@ -374,7 +375,7 @@ cVillageGen::cVillageGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSi
cGridStructGen::cStructurePtr cVillageGen::CreateStructure(int a_OriginX, int a_OriginZ)
cGridStructGen::cStructurePtr cVillageGen::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
{
// Generate the biomes for the chunk surrounding the origin:
int ChunkX, ChunkZ;
@@ -435,7 +436,7 @@ cGridStructGen::cStructurePtr cVillageGen::CreateStructure(int a_OriginX, int a_
{
return cStructurePtr();
}
return cStructurePtr(new cVillage(m_Seed, a_OriginX, a_OriginZ, m_MaxDepth, m_MaxSize, Density, *VillagePrefabs, m_HeightGen, RoadBlock, WaterRoadBlock));
return cStructurePtr(new cVillage(m_Seed, a_GridX, a_GridZ, a_OriginX, a_OriginZ, m_MaxDepth, m_MaxSize, Density, *VillagePrefabs, m_HeightGen, RoadBlock, WaterRoadBlock));
}
+2 -2
View File
@@ -21,7 +21,7 @@ class cVillageGen :
{
typedef cGridStructGen super;
public:
cVillageGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSize, int a_MinDensity, int a_MaxDensity, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen);
cVillageGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth, int a_MaxSize, int a_MinDensity, int a_MaxDensity, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen);
protected:
class cVillage; // fwd: VillageGen.cpp
@@ -49,7 +49,7 @@ protected:
// cGridStructGen overrides:
virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override;
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
} ;