diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-18 15:39:42 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-18 15:39:42 +0200 |
commit | 99c9b2e11d17b9c0d0fa9e62119ed3d13f96beda (patch) | |
tree | 937fbf38e19c44ecc0fe7f901916b0f817b6a02a /source/ChunkDef.h | |
parent | Made constants in cChunkDef enums, compilation fixes for gcc. (diff) | |
download | cuberite-99c9b2e11d17b9c0d0fa9e62119ed3d13f96beda.tar cuberite-99c9b2e11d17b9c0d0fa9e62119ed3d13f96beda.tar.gz cuberite-99c9b2e11d17b9c0d0fa9e62119ed3d13f96beda.tar.bz2 cuberite-99c9b2e11d17b9c0d0fa9e62119ed3d13f96beda.tar.lz cuberite-99c9b2e11d17b9c0d0fa9e62119ed3d13f96beda.tar.xz cuberite-99c9b2e11d17b9c0d0fa9e62119ed3d13f96beda.tar.zst cuberite-99c9b2e11d17b9c0d0fa9e62119ed3d13f96beda.zip |
Diffstat (limited to 'source/ChunkDef.h')
-rw-r--r-- | source/ChunkDef.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/source/ChunkDef.h b/source/ChunkDef.h index 44103e659..db3bf4740 100644 --- a/source/ChunkDef.h +++ b/source/ChunkDef.h @@ -106,20 +106,17 @@ enum EMCSBiome class cChunkDef { public: - enum - { - Width = 16, - Height = 256, - NumBlocks = Width * Height * Width, - BlockDataSize = NumBlocks * 2 + (NumBlocks / 2), // 2.5 * numblocks - - // Offsets to individual components in the joined blockdata array - MetaOffset = NumBlocks, - LightOffset = MetaOffset + NumBlocks / 2, - SkyLightOffset = LightOffset + NumBlocks / 2, - - INDEX_OUT_OF_RANGE = 0xffffffff, - } ; + static const int Width = 16; + static const int Height = 256; + static const int NumBlocks = Width * Height * Width; + static const int BlockDataSize = NumBlocks * 2 + (NumBlocks / 2); // 2.5 * numblocks + + // Offsets to individual components in the joined blockdata array + static const int MetaOffset = NumBlocks; + static const int LightOffset = MetaOffset + NumBlocks / 2; + static const int SkyLightOffset = LightOffset + NumBlocks / 2; + + static const unsigned int INDEX_OUT_OF_RANGE = 0xffffffff; /// The type used for any heightmap operations and storage; idx = x + Width * z typedef HEIGHTTYPE HeightMap[Width * Width]; |