summaryrefslogtreecommitdiffstats
path: root/source/ChunkDef.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-18 12:42:47 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-18 12:42:47 +0200
commit7aa87d18189536e548e02bfd1e2a6e368f2f7fb1 (patch)
tree3bc18b6d22ea27181a5e43ddba15ddc17cc81fbb /source/ChunkDef.h
parentAdded basic spawn eggs (patch contributed by Luksor) (diff)
downloadcuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.gz
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.bz2
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.lz
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.xz
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.zst
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.zip
Diffstat (limited to '')
-rw-r--r--source/ChunkDef.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/source/ChunkDef.h b/source/ChunkDef.h
index db3bf4740..44103e659 100644
--- a/source/ChunkDef.h
+++ b/source/ChunkDef.h
@@ -106,17 +106,20 @@ enum EMCSBiome
class cChunkDef
{
public:
- 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;
+ 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,
+ } ;
/// The type used for any heightmap operations and storage; idx = x + Width * z
typedef HEIGHTTYPE HeightMap[Width * Width];