aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-08-19 09:12:54 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2017-08-19 09:12:54 +0200
commitb5f7249a7edc25077d84b27b38552228b92ff763 (patch)
tree26770c25680cc0aebb9d252f8b9d91f5e07ba78a /src/util
parente53d8a75360944a494a56269fc328871cb0a60cc (diff)
downloadminetest-b5f7249a7edc25077d84b27b38552228b92ff763.tar.gz
minetest-b5f7249a7edc25077d84b27b38552228b92ff763.tar.bz2
minetest-b5f7249a7edc25077d84b27b38552228b92ff763.zip
Code modernization: src/m* (part 2)
* empty function * default constructor/destructor * remove unused Map::emergeSector(a,b) * for range-based loops * migrate a dirs[7] table to direction tables * remove various old unused function
Diffstat (limited to 'src/util')
-rw-r--r--src/util/directiontables.cpp11
-rw-r--r--src/util/directiontables.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/util/directiontables.cpp b/src/util/directiontables.cpp
index d6c154842..587b0caf7 100644
--- a/src/util/directiontables.cpp
+++ b/src/util/directiontables.cpp
@@ -30,6 +30,17 @@ const v3s16 g_6dirs[6] =
v3s16(-1, 0, 0) // left
};
+const v3s16 g_7dirs[7] =
+{
+ v3s16(0,0,1), // back
+ v3s16(0,1,0), // top
+ v3s16(1,0,0), // right
+ v3s16(0,0,-1), // front
+ v3s16(0,-1,0), // bottom
+ v3s16(-1,0,0), // left
+ v3s16(0,0,0), // self
+};
+
const v3s16 g_26dirs[26] =
{
// +right, +top, +back
diff --git a/src/util/directiontables.h b/src/util/directiontables.h
index ab5b63217..8464453bc 100644
--- a/src/util/directiontables.h
+++ b/src/util/directiontables.h
@@ -24,6 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
extern const v3s16 g_6dirs[6];
+extern const v3s16 g_7dirs[7];
+
extern const v3s16 g_26dirs[26];
// 26th is (0,0,0)