summaryrefslogtreecommitdiffstats
path: root/src/BlockInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/BlockInfo.h')
-rw-r--r--src/BlockInfo.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/BlockInfo.h b/src/BlockInfo.h
index 1e09b0df5..a06c47a47 100644
--- a/src/BlockInfo.h
+++ b/src/BlockInfo.h
@@ -6,27 +6,44 @@
-class BlockInfo
+class cBlockInfo
{
public:
- BlockInfo();
+ cBlockInfo();
/** (Re-)Initializes the internal BlockInfo structures. */
static void Initialize(void);
/** Returns the associated BlockInfo structure. */
- static BlockInfo & GetById(unsigned int a_ID);
+ static cBlockInfo & GetById(unsigned int a_ID);
+
+ /** How much light do the blocks emit on their own? */
NIBBLETYPE m_LightValue;
+
+ /** How much light do the blocks consume? */
NIBBLETYPE m_SpreadLightFalloff;
+ /** Is a block completely transparent? (light doesn't get decreased(?)) */
bool m_Transparent;
+
+ /** Is a block destroyed after a single hit? */
bool m_OneHitDig;
+
+ /** Can a piston break this block? */
bool m_PistonBreakable;
+
+ /** Can this block hold snow atop? */
bool m_IsSnowable;
+
+ /** Does this block require a tool to drop? */
bool m_RequiresSpecialTool;
+
+ /** Is this block solid (player cannot walk through)? */
bool m_IsSolid;
+
+ /** Does this block fully occupy it's voxel - is it a 'full' block? */
bool m_FullyOccupiesVoxel;
@@ -34,7 +51,7 @@ public:
inline static NIBBLETYPE GetSpreadLightFalloff(unsigned int a_ID) { return GetById(a_ID).m_SpreadLightFalloff; }
inline static bool IsTransparent (unsigned int a_ID) { return GetById(a_ID).m_Transparent; }
inline static bool IsOneHitDig (unsigned int a_ID) { return GetById(a_ID).m_OneHitDig; }
- inline static bool IsPistoneBreakable (unsigned int a_ID) { return GetById(a_ID).m_PistonBreakable; }
+ inline static bool IsPistonBreakable (unsigned int a_ID) { return GetById(a_ID).m_PistonBreakable; }
inline static bool IsSnowable (unsigned int a_ID) { return GetById(a_ID).m_IsSnowable; }
inline static bool RequiresSpecialTool (unsigned int a_ID) { return GetById(a_ID).m_RequiresSpecialTool; }
inline static bool IsSolid (unsigned int a_ID) { return GetById(a_ID).m_IsSolid; }
@@ -44,7 +61,7 @@ public:
protected:
// TODO xdot: Change to std::vector to support dynamic block IDs
- static BlockInfo ms_Info[256];
+ static cBlockInfo ms_Info[256];
};