From 993fd14ddfc881cf5be951df77da0338124d68cc Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 16:33:09 +0200 Subject: Fixed basic whitespace problems. Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines. --- src/ChunkDef.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/ChunkDef.h') diff --git a/src/ChunkDef.h b/src/ChunkDef.h index f89e16ed1..bd6387b74 100644 --- a/src/ChunkDef.h +++ b/src/ChunkDef.h @@ -22,8 +22,8 @@ It will help us when the new chunk format comes out and we need to patch everyth #define ZERO_CHUNK_Y 0 // Used to smoothly convert to new axis ordering. One will be removed when deemed stable. -#define AXIS_ORDER_YZX 1 // Original (1.1-) -#define AXIS_ORDER_XZY 2 // New (1.2+) +#define AXIS_ORDER_YZX 1 // Original (1.1-) +#define AXIS_ORDER_XZY 2 // New (1.2+) #define AXIS_ORDER AXIS_ORDER_XZY @@ -72,7 +72,7 @@ public: /// The type used for any heightmap operations and storage; idx = x + Width * z; Height points to the highest non-air block in the column typedef HEIGHTTYPE HeightMap[Width * Width]; - /** The type used for any biomemap operations and storage inside MCServer, + /** The type used for any biomemap operations and storage inside MCServer, using MCServer biomes (need not correspond to client representation!) idx = x + Width * z // Need to verify this with the protocol spec, currently unknown! */ @@ -148,17 +148,17 @@ public: inline static Vector3i IndexToCoordinate( unsigned int index ) { #if AXIS_ORDER == AXIS_ORDER_XZY - return Vector3i( // 1.2 - index % cChunkDef::Width, // X - index / (cChunkDef::Width * cChunkDef::Width), // Y - (index / cChunkDef::Width) % cChunkDef::Width // Z - ); + return Vector3i( // 1.2 + index % cChunkDef::Width, // X + index / (cChunkDef::Width * cChunkDef::Width), // Y + (index / cChunkDef::Width) % cChunkDef::Width // Z + ); #elif AXIS_ORDER == AXIS_ORDER_YZX - return Vector3i( // 1.1 - index / (cChunkDef::Height * cChunkDef::Width), // X - index % cChunkDef::Height, // Y - (index / cChunkDef::Height) % cChunkDef::Width // Z - ); + return Vector3i( // 1.1 + index / (cChunkDef::Height * cChunkDef::Width), // X + index % cChunkDef::Height, // Y + (index / cChunkDef::Height) % cChunkDef::Width // Z + ); #endif } -- cgit v1.2.3 From 7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 19:13:23 +0200 Subject: Fixed spaces around single-line comments. There should be at least two spaces in front and one space after //-style comments. --- src/ChunkDef.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ChunkDef.h') diff --git a/src/ChunkDef.h b/src/ChunkDef.h index bd6387b74..334f8a6b9 100644 --- a/src/ChunkDef.h +++ b/src/ChunkDef.h @@ -138,9 +138,9 @@ public: { #if AXIS_ORDER == AXIS_ORDER_XZY // For some reason, NOT using the Horner schema is faster. Weird. - return x + (z * cChunkDef::Width) + (y * cChunkDef::Width * cChunkDef::Width); // 1.2 is XZY + return x + (z * cChunkDef::Width) + (y * cChunkDef::Width * cChunkDef::Width); // 1.2 uses XZY #elif AXIS_ORDER == AXIS_ORDER_YZX - return y + (z * cChunkDef::Width) + (x * cChunkDef::Height * cChunkDef::Width); // 1.1 is YZX + return y + (z * cChunkDef::Width) + (x * cChunkDef::Height * cChunkDef::Width); // 1.1 uses YZX #endif } -- cgit v1.2.3