Mgfractal: Add 3D and 4D fractals
[oweals/minetest.git] / src / mapnode.h
index ec21a201404fbdfde7f09eaf21e863359443666f..7cc25c60cfabde4b70036e1b80667ad67f69ebad 100644 (file)
@@ -139,12 +139,15 @@ struct MapNode
        */
        u8 param2;
 
+       MapNode()
+       { }
+
        MapNode(const MapNode & n)
        {
                *this = n;
        }
 
-       MapNode(content_t content = CONTENT_AIR, u8 a_param1=0, u8 a_param2=0)
+       MapNode(content_t content, u8 a_param1=0, u8 a_param2=0)
                : param0(content),
                  param1(a_param1),
                  param2(a_param2)
@@ -189,6 +192,14 @@ struct MapNode
        }
 
        void setLight(enum LightBank bank, u8 a_light, INodeDefManager *nodemgr);
+
+       /**
+        * Check if the light value for night differs from the light value for day.
+        *
+        * @return If the light values are equal, returns true; otherwise false
+        */
+       bool isLightDayNightEq(INodeDefManager *nodemgr) const;
+
        u8 getLight(enum LightBank bank, INodeDefManager *nodemgr) const;
 
        /**
@@ -206,7 +217,7 @@ struct MapNode
         * @pre f != NULL
         * @pre f->param_type == CPT_LIGHT
         */
-       u8 getLightNoChecks(LightBank bank, const ContentFeatures *f);
+       u8 getLightNoChecks(LightBank bank, const ContentFeatures *f) const;
 
        bool getLightBanks(u8 &lightday, u8 &lightnight, INodeDefManager *nodemgr) const;