From 1926181cb7c8570fe57ec1b39d4241b9dd156333 Mon Sep 17 00:00:00 2001 From: Alexander Lyons Harkness Date: Sat, 23 Dec 2017 12:49:08 +0000 Subject: Fix style of Tools --- Tools/BlockZapper/Zapper.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'Tools/BlockZapper/Zapper.cpp') diff --git a/Tools/BlockZapper/Zapper.cpp b/Tools/BlockZapper/Zapper.cpp index 304d49770..83c9657ce 100644 --- a/Tools/BlockZapper/Zapper.cpp +++ b/Tools/BlockZapper/Zapper.cpp @@ -15,7 +15,7 @@ -/// The maximum size of an inflated chunk; raw chunk data is 192 KiB, allow 64 KiB more of entities +/** The maximum size of an inflated chunk; raw chunk data is 192 KiB, allow 64 KiB more of entities */ #define CHUNK_INFLATE_MAX 256 KiB @@ -115,7 +115,7 @@ void cZapper::ZapRegionInMCAFile(const cRegion & a_Region, int a_MCAX, int a_MCA int ChunkZ = a_MCAZ * ChunksPerMCAZ + (i / ChunksPerMCAX); LoadChunkData(fIn, HeaderIn[i], ChunkData, ChunkX, ChunkZ); - + if (a_Region.TouchesChunk(ChunkX, ChunkZ)) { ZapRegionInRawChunkData(a_Region, ChunkData, ChunkX, ChunkZ); @@ -218,14 +218,14 @@ void cZapper::ZapRegionInRawChunkData(const cRegion & a_Region, AString & a_Chun return; } ZapRegionInNBTChunk(a_Region, NBT, a_ChunkX, a_ChunkZ); - + cFastNBTWriter Writer; for (int ch = NBT.GetFirstChild(0); ch >= 0; ch = NBT.GetNextSibling(ch)) { SerializeNBTTag(NBT, ch, Writer); } Writer.Finish(); - + /* // DEBUG: Output dst to a file: cFile f2; @@ -251,7 +251,7 @@ void cZapper::ZapRegionInNBTChunk(const cRegion & a_Region, cParsedNBT & a_NBT, fprintf(stderr, "Cannot find Level tag in chunk [%d, %d]'s NBT. Skipping chunk.", a_ChunkX, a_ChunkZ); return; } - + // Create a copy of the region and limit it to the current chunk: int BlockX = a_ChunkX * 16; int BlockZ = a_ChunkZ * 16; @@ -273,7 +273,7 @@ void cZapper::ZapRegionInNBTChunk(const cRegion & a_Region, cParsedNBT & a_NBT, } ZapRegionBlocksInNBT(Local, a_NBT, SectionsTag); } - + if (a_Region.m_ShouldZapEntities) { int EntitiesTag = a_NBT.FindChildByName(LevelTag, "Entities"); @@ -320,7 +320,7 @@ void cZapper::ZapRegionBlocksInNBT(const cRegion & a_Region, cParsedNBT & a_NBT, { ZapRegionInNBTSectionNibbles(a_Region, y, (unsigned char *)(a_NBT.GetData(BlockAddTag))); } - } // for Child - Level/Sections/[] + } // for Child - Level / Sections / [] } @@ -426,7 +426,7 @@ void cZapper::SerializeNBTTag(const cParsedNBT & a_NBT, int a_Tag, cFastNBTWrite a_Writer.EndCompound(); break; } - + default: { ASSERT(!"Unknown NBT tag"); @@ -434,7 +434,3 @@ void cZapper::SerializeNBTTag(const cParsedNBT & a_NBT, int a_Tag, cFastNBTWrite } } } - - - - -- cgit v1.2.3