aboutsummaryrefslogtreecommitdiff
path: root/src/mapnode.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-06-17 23:20:31 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-06-17 23:20:31 +0300
commit682c9d8e7d05ca7462eda7fee9b07fb6ad94d860 (patch)
treef3bda59d590598729992dea75a84b22f55ab3648 /src/mapnode.h
parentdf5affe836080d35a0e89d2799cb1b525fcdd6ce (diff)
downloadminetest-682c9d8e7d05ca7462eda7fee9b07fb6ad94d860.tar.gz
minetest-682c9d8e7d05ca7462eda7fee9b07fb6ad94d860.tar.bz2
minetest-682c9d8e7d05ca7462eda7fee9b07fb6ad94d860.zip
Moved stuff from mapblock{h,cpp} to mapblock_mesh.{h,cpp} and content_mapblock.{h,cpp}
Diffstat (limited to 'src/mapnode.h')
-rw-r--r--src/mapnode.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mapnode.h b/src/mapnode.h
index aa3fa3960..d975a50c4 100644
--- a/src/mapnode.h
+++ b/src/mapnode.h
@@ -648,7 +648,24 @@ struct MapNode
}
};
+/*
+ Gets lighting value at face of node
+
+ Parameters must consist of air and !air.
+ Order doesn't matter.
+ If either of the nodes doesn't exist, light is 0.
+
+ parameters:
+ daynight_ratio: 0...1000
+ n: getNodeParent(p)
+ n2: getNodeParent(p + face_dir)
+ face_dir: axis oriented unit vector from p to p2
+
+ returns encoded light value.
+*/
+u8 getFaceLight(u32 daynight_ratio, MapNode n, MapNode n2,
+ v3s16 face_dir);
#endif