summaryrefslogtreecommitdiff
path: root/src/mapnode.h
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2017-06-03 14:55:10 -0400
committerShadowNinja <shadowninja@minetest.net>2017-06-03 14:55:10 -0400
commitcaecdb681c428c1aab9c0f7eec2570c0460f995c (patch)
treee5115982ea59bbf2343ba9b35bc4a0cfbb56f407 /src/mapnode.h
parent81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (diff)
parent80dc961d24e1964e25d57039ddb2ba639f9f4d22 (diff)
downloadminetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.gz
minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.bz2
minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.zip
Merge 0.4.16 into stable-0.4
Diffstat (limited to 'src/mapnode.h')
-rw-r--r--src/mapnode.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/mapnode.h b/src/mapnode.h
index 0bd61c554..9c56a7e17 100644
--- a/src/mapnode.h
+++ b/src/mapnode.h
@@ -20,14 +20,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef MAPNODE_HEADER
#define MAPNODE_HEADER
-#include "irrlichttypes.h"
-#include "irr_v3d.h"
-#include "irr_aabb3d.h"
+#include "irrlichttypes_bloated.h"
#include "light.h"
#include <string>
#include <vector>
class INodeDefManager;
+class Map;
/*
Naming scheme:
@@ -142,11 +141,6 @@ struct MapNode
MapNode()
{ }
- MapNode(const MapNode & n)
- {
- *this = n;
- }
-
MapNode(content_t content, u8 a_param1=0, u8 a_param2=0)
: param0(content),
param1(a_param1),
@@ -191,6 +185,14 @@ struct MapNode
param2 = p;
}
+ /*!
+ * Returns the color of the node.
+ *
+ * \param f content features of this node
+ * \param color output, contains the node's color.
+ */
+ void getColor(const ContentFeatures &f, video::SColor *color) const;
+
void setLight(enum LightBank bank, u8 a_light, const ContentFeatures &f);
void setLight(enum LightBank bank, u8 a_light, INodeDefManager *nodemgr);
@@ -246,6 +248,13 @@ struct MapNode
void rotateAlongYAxis(INodeDefManager *nodemgr, Rotation rot);
+ /*!
+ * Checks which neighbors does this node connect to.
+ *
+ * \param p coordinates of the node
+ */
+ u8 getNeighbors(v3s16 p, Map *map);
+
/*
Gets list of node boxes (used for rendering (NDT_NODEBOX))
*/