From 81bf846e648bf757a67699c57f2a9e66f6850416 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 9 Mar 2014 21:58:12 +0100 Subject: ChunkDef: Replaced enums with static const ints. This makes them easier to use in std::min et al. --- src/ChunkDef.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/ChunkDef.h b/src/ChunkDef.h index 7be2fa2df..7876c58e7 100644 --- a/src/ChunkDef.h +++ b/src/ChunkDef.h @@ -62,16 +62,12 @@ typedef unsigned char HEIGHTTYPE; class cChunkDef { public: - enum - { - // Chunk dimensions: - Width = 16, - Height = 256, - NumBlocks = Width * Height * Width, - - /// If the data is collected into a single buffer, how large it needs to be: - BlockDataSize = cChunkDef::NumBlocks * 2 + (cChunkDef::NumBlocks / 2), // 2.5 * numblocks - } ; + // Chunk dimensions: + static const int Width = 16; + static const int Height = 256; + static const int NumBlocks = Width * Height * Width; + /// If the data is collected into a single buffer, how large it needs to be: + static const int BlockDataSize = cChunkDef::NumBlocks * 2 + (cChunkDef::NumBlocks / 2); // 2.5 * numblocks /// 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]; -- cgit v1.2.3