summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
Diffstat (limited to 'src/Generating')
-rw-r--r--src/Generating/Caves.cpp12
-rw-r--r--src/Generating/ChunkDesc.cpp4
-rw-r--r--src/Generating/ChunkDesc.h4
-rw-r--r--src/Generating/CompoGen.cpp4
-rw-r--r--src/Generating/Ravines.cpp12
-rw-r--r--src/Generating/RoughRavines.cpp4
6 files changed, 20 insertions, 20 deletions
diff --git a/src/Generating/Caves.cpp b/src/Generating/Caves.cpp
index 0d22d5b96..39497b45f 100644
--- a/src/Generating/Caves.cpp
+++ b/src/Generating/Caves.cpp
@@ -105,9 +105,9 @@ public:
cChunkDef::HeightMap & a_HeightMap
);
- #ifdef _DEBUG
+ #ifndef NDEBUG
AString ExportAsSVG(int a_Color, int a_OffsetX, int a_OffsetZ) const;
- #endif // _DEBUG
+ #endif // !NDEBUG
} ;
typedef std::vector<cCaveTunnel *> cCaveTunnels;
@@ -530,7 +530,7 @@ void cCaveTunnel::ProcessChunk(
} // for itr - m_Points[]
/*
- #ifdef _DEBUG
+ #ifndef NDEBUG
// For debugging purposes, outline the shape of the cave using glowstone, after carving the entire cave:
for (cCaveDefPoints::const_iterator itr = m_Points.begin(), end = m_Points.end(); itr != end; ++itr)
{
@@ -545,7 +545,7 @@ void cCaveTunnel::ProcessChunk(
cChunkDef::SetBlock(a_BlockTypes, DifX, itr->m_BlockY, DifZ, E_BLOCK_GLOWSTONE);
}
} // for itr - m_Points[]
- #endif // _DEBUG
+ #endif // !NDEBUG
//*/
}
@@ -553,7 +553,7 @@ void cCaveTunnel::ProcessChunk(
-#ifdef _DEBUG
+#ifndef NDEBUG
AString cCaveTunnel::ExportAsSVG(int a_Color, int a_OffsetX, int a_OffsetZ) const
{
AString SVG;
@@ -568,7 +568,7 @@ AString cCaveTunnel::ExportAsSVG(int a_Color, int a_OffsetX, int a_OffsetZ) cons
SVG.append("\"/>\n");
return SVG;
}
-#endif // _DEBUG
+#endif // !NDEBUG
diff --git a/src/Generating/ChunkDesc.cpp b/src/Generating/ChunkDesc.cpp
index 340e3f805..b4b8e8868 100644
--- a/src/Generating/ChunkDesc.cpp
+++ b/src/Generating/ChunkDesc.cpp
@@ -647,7 +647,7 @@ void cChunkDesc::CompressBlockMetas(cChunkDef::BlockNibbles & a_DestMetas)
-#ifdef _DEBUG
+#ifndef NDEBUG
void cChunkDesc::VerifyHeightmap(void)
{
@@ -669,7 +669,7 @@ void cChunkDesc::VerifyHeightmap(void)
} // for x
}
-#endif // _DEBUG
+#endif // !NDEBUG
diff --git a/src/Generating/ChunkDesc.h b/src/Generating/ChunkDesc.h
index a488d2a96..d10159dc9 100644
--- a/src/Generating/ChunkDesc.h
+++ b/src/Generating/ChunkDesc.h
@@ -229,10 +229,10 @@ public:
/** Compresses the metas from the BlockArea format (1 meta per byte) into regular format (2 metas per byte) */
void CompressBlockMetas(cChunkDef::BlockNibbles & a_DestMetas);
- #ifdef _DEBUG
+ #ifndef NDEBUG
/** Verifies that the heightmap corresponds to blocktype contents; if not, asserts on that column */
void VerifyHeightmap(void);
- #endif // _DEBUG
+ #endif // !NDEBUG
private:
cChunkCoords m_Coords;
diff --git a/src/Generating/CompoGen.cpp b/src/Generating/CompoGen.cpp
index f17846359..7cc8fa095 100644
--- a/src/Generating/CompoGen.cpp
+++ b/src/Generating/CompoGen.cpp
@@ -364,13 +364,13 @@ cCompoGenCache::~cCompoGenCache()
void cCompoGenCache::ComposeTerrain(cChunkDesc & a_ChunkDesc, const cChunkDesc::Shape & a_Shape)
{
- #ifdef _DEBUG
+ #ifndef NDEBUG
if (((m_NumHits + m_NumMisses) % 1024) == 10)
{
// LOGD("CompoGenCache: %d hits, %d misses, saved %.2f %%", m_NumHits, m_NumMisses, 100.0 * m_NumHits / (m_NumHits + m_NumMisses));
// LOGD("CompoGenCache: Avg cache chain length: %.2f", static_cast<float>(m_TotalChain) / m_NumHits);
}
- #endif // _DEBUG
+ #endif // !NDEBUG
int ChunkX = a_ChunkDesc.GetChunkX();
int ChunkZ = a_ChunkDesc.GetChunkZ();
diff --git a/src/Generating/Ravines.cpp b/src/Generating/Ravines.cpp
index a9574a8b7..0714bde9b 100644
--- a/src/Generating/Ravines.cpp
+++ b/src/Generating/Ravines.cpp
@@ -63,10 +63,10 @@ public:
cRavine(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_Size, cNoise & a_Noise);
- #ifdef _DEBUG
+ #ifndef NDEBUG
/** Exports itself as a SVG line definition */
AString ExportAsSVG(int a_Color, int a_OffsetX = 0, int a_OffsetZ = 0) const;
- #endif // _DEBUG
+ #endif // !NDEBUG
protected:
// cGridStructGen::cStructure overrides:
@@ -277,7 +277,7 @@ void cStructGenRavines::cRavine::FinishLinear(void)
-#ifdef _DEBUG
+#ifndef NDEBUG
AString cStructGenRavines::cRavine::ExportAsSVG(int a_Color, int a_OffsetX, int a_OffsetZ) const
{
AString SVG;
@@ -318,7 +318,7 @@ AString cStructGenRavines::cRavine::ExportAsSVG(int a_Color, int a_OffsetX, int
}
return SVG;
}
-#endif // _DEBUG
+#endif // !NDEBUG
@@ -349,13 +349,13 @@ void cStructGenRavines::cRavine::DrawIntoChunk(cChunkDesc & a_ChunkDesc)
int DifZ = BlockStartZ - itr->m_BlockZ; // substitution for faster calc
for (int x = 0; x < cChunkDef::Width; x++) for (int z = 0; z < cChunkDef::Width; z++)
{
- #ifdef _DEBUG
+ #ifndef NDEBUG
// DEBUG: Make the ravine shapepoints visible on a single layer (so that we can see with Minutor what's going on)
if ((DifX + x == 0) && (DifZ + z == 0))
{
a_ChunkDesc.SetBlockType(x, 4, z, E_BLOCK_LAPIS_ORE);
}
- #endif // _DEBUG
+ #endif // !NDEBUG
int DistSq = (DifX + x) * (DifX + x) + (DifZ + z) * (DifZ + z);
if (DistSq <= RadiusSq)
diff --git a/src/Generating/RoughRavines.cpp b/src/Generating/RoughRavines.cpp
index fe425757f..a39f7922d 100644
--- a/src/Generating/RoughRavines.cpp
+++ b/src/Generating/RoughRavines.cpp
@@ -181,13 +181,13 @@ protected:
float DifZ = BlockStartZ - itr->m_Z; // substitution for faster calc
for (int x = 0; x < cChunkDef::Width; x++) for (int z = 0; z < cChunkDef::Width; z++)
{
- #ifdef _DEBUG
+ #ifndef NDEBUG
// DEBUG: Make the roughravine shapepoints visible on a single layer (so that we can see with Minutor what's going on)
if ((FloorC(DifX + x) == 0) && (FloorC(DifZ + z) == 0))
{
a_ChunkDesc.SetBlockType(x, 4, z, E_BLOCK_LAPIS_ORE);
}
- #endif // _DEBUG
+ #endif // !NDEBUG
// If the column is outside the enlarged radius, bail out completely
float DistSq = (DifX + x) * (DifX + x) + (DifZ + z) * (DifZ + z);